Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.engine
Class AlgorithmBuilder

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

public final class AlgorithmBuilder
extends java.lang.Object

Algorithm builder.

Since:
0.4.0
Version:
$Revision: 1.11 $ $Date: 2004/05/26 11:58:21 $
Author:
Andreas Rummler

Constructor Summary
AlgorithmBuilder()
          Constructor.
 
Method Summary
 IAlgorithm build(org.w3c.dom.Document document)
          Builds an algorithm from a XML document.
 IAlgorithm build(org.w3c.dom.Document document, java.lang.ClassLoader loader)
          Builds an algorithm from a XML document.
 IAlgorithm build(java.io.InputStream stream)
          Builds an algorithm from the given inputstream.
 IAlgorithm build(java.io.InputStream stream, java.lang.ClassLoader loader)
          Builds an algorithm from the given inputstream.
 IAlgorithm build(java.lang.String uri)
          Builds an algorithm from the resource at the given URI.
 IAlgorithm build(java.lang.String uri, java.lang.ClassLoader loader)
          Builds an algorithm from the resource at the given URI.
 org.w3c.dom.Document buildDocument(java.io.InputStream stream)
          Reads an algorithm description but does not build the algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlgorithmBuilder

public AlgorithmBuilder()
Constructor.

Method Detail

build

public IAlgorithm build(java.lang.String uri)
                 throws SerializationException,
                        org.xml.sax.SAXException,
                        java.io.IOException
Builds an algorithm from the resource at the given URI.

Parameters:
uri - URI pointing to an algorithm description.
Returns:
algorithm built from the given description
Throws:
java.io.IOException - thrown if access to the given description fails
org.xml.sax.SAXException - thrown if the given description is invalid
SerializationException - thrown in case the deserialization of the XML document fails

build

public IAlgorithm build(java.lang.String uri,
                        java.lang.ClassLoader loader)
                 throws SerializationException,
                        org.xml.sax.SAXException,
                        java.io.IOException
Builds an algorithm from the resource at the given URI.

Parameters:
uri - URI pointing to an algorithm description
loader - classloader to use for instantiating the classes
Returns:
algorithm built from the given description
Throws:
java.io.IOException - thrown if access to the given description fails
org.xml.sax.SAXException - thrown if the given description is invalid
SerializationException - thrown in case the deserialization of the XML document fails

build

public IAlgorithm build(java.io.InputStream stream)
                 throws SerializationException,
                        org.xml.sax.SAXException,
                        java.io.IOException
Builds an algorithm from the given inputstream.

Parameters:
stream - input stream
Returns:
algorithm built from the given input stream
Throws:
java.io.IOException - thrown if access to the given description fails
org.xml.sax.SAXException - thrown if the given description is invalid
SerializationException - thrown in case the deserialization of the XML document fails

build

public IAlgorithm build(java.io.InputStream stream,
                        java.lang.ClassLoader loader)
                 throws SerializationException,
                        org.xml.sax.SAXException,
                        java.io.IOException
Builds an algorithm from the given inputstream.

Parameters:
stream - input stream
loader - classloader to use for instantiating the classes
Returns:
algorithm built from the given input stream
Throws:
java.io.IOException - thrown if access to the given description fails
org.xml.sax.SAXException - thrown if the given description is invalid
SerializationException - thrown in case the deserialization of the XML document fails

buildDocument

public org.w3c.dom.Document buildDocument(java.io.InputStream stream)
                                   throws java.io.IOException,
                                          org.xml.sax.SAXException
Reads an algorithm description but does not build the algorithm.

Parameters:
stream - input stream to read the description from
Returns:
XML document containing the algorithm description
Throws:
java.io.IOException - thrown if access to the given description fails
org.xml.sax.SAXException - thrown if the given description is invalid

build

public IAlgorithm build(org.w3c.dom.Document document)
                 throws SerializationException
Builds an algorithm from a XML document.

Parameters:
document - XML document containing an algorithm description
Returns:
built algorithm
Throws:
SerializationException - thrown in case the deserialization of the XML document fails

build

public IAlgorithm build(org.w3c.dom.Document document,
                        java.lang.ClassLoader loader)
                 throws SerializationException
Builds an algorithm from a XML document.

Parameters:
document - XML document containing an algorithm description
loader - class loader to use for instantiating the classes
Returns:
built algorithm
Throws:
SerializationException - thrown in case the deserialization of the XML document fails

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

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