Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.engine
Class DescriptorWriter

java.lang.Object
  extended byorg.evolvica.engine.DescriptorWriter

public class DescriptorWriter
extends java.lang.Object

Writer for operator descriptors.

Since:
0.6.0
Version:
$Revision: 1.4 $ $Date: 2004/05/26 11:58:23 $
Author:
Andreas Rummler

Constructor Summary
DescriptorWriter()
           
 
Method Summary
static org.w3c.dom.Element createAttributeNode(org.w3c.dom.Document document, AttributeDescriptor descriptor)
          Creates an XML element from a given attribute descriptor.
static org.w3c.dom.Document createDocument(OperatorDescriptor descriptor)
          Creates a XML document from a given algorithm.
static void write(org.w3c.dom.Document document, java.io.OutputStream stream)
          Writes an XML algorithm document to an output stream.
static void write(org.w3c.dom.Document document, java.net.URI uri)
          Writes an XML document to the given URI.
static void write(OperatorDescriptor descriptor, java.io.OutputStream stream)
          Writes an operator descriptor to an output stream.
static void write(OperatorDescriptor descriptor, java.net.URI uri)
          Writes an operator descriptor to the given URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptorWriter

public DescriptorWriter()
Method Detail

write

public static void write(org.w3c.dom.Document document,
                         java.net.URI uri)
                  throws SerializationException
Writes an XML document to the given URI.

Parameters:
document - XML document
uri - URI to write to (must be a directory, but is not checked!)
Throws:
SerializationException - thrown in case the serialization fails

write

public static void write(org.w3c.dom.Document document,
                         java.io.OutputStream stream)
                  throws SerializationException
Writes an XML algorithm document to an output stream.

Parameters:
document - document to write
stream - output stream to write to
Throws:
SerializationException - thrown in case the serialization fails

write

public static void write(OperatorDescriptor descriptor,
                         java.io.OutputStream stream)
                  throws SerializationException
Writes an operator descriptor to an output stream.

Parameters:
descriptor - descriptor to be written
stream - output stream to write to
Throws:
SerializationException - thrown in case the XML document could not be created

write

public static void write(OperatorDescriptor descriptor,
                         java.net.URI uri)
                  throws SerializationException
Writes an operator descriptor to the given URI.

Parameters:
descriptor - descriptor to be written
uri - URI to write to
Throws:
SerializationException - thrown in case the XML document could not be created

createDocument

public static org.w3c.dom.Document createDocument(OperatorDescriptor descriptor)
                                           throws javax.xml.parsers.ParserConfigurationException,
                                                  javax.xml.parsers.FactoryConfigurationError
Creates a XML document from a given algorithm.

Parameters:
descriptor - operator descriptor to be converted into an XML document
Returns:
XML document containing the algorithm description
Throws:
SerializationException - thrown in case the document could not be created
javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.FactoryConfigurationError

createAttributeNode

public static org.w3c.dom.Element createAttributeNode(org.w3c.dom.Document document,
                                                      AttributeDescriptor descriptor)
Creates an XML element from a given attribute descriptor.

Parameters:
document - XML document used for element creation
descriptor - attribute descriptor
Returns:
created XML element

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

Copyright © 2000-2004 Technical University of Ilmenau, Department Electronic Circuits and Systems