gov.sns.xal.model.alg
Class AlgorithmFactory

java.lang.Object
  |
  +--gov.sns.xal.model.alg.AlgorithmFactory

public final class AlgorithmFactory
extends java.lang.Object

Utility factory class for the online model algorithm objects.


Field Summary
static java.lang.String ATTRTAG_TYPE
          attribute label for type string identifier
static java.lang.String NODETAG_ALG
          data node label for algorithm data
 
Constructor Summary
AlgorithmFactory()
           
 
Method Summary
static IAlgorithm createEmpty(java.lang.String strTypeId)
          Creates a new, empty algorithm object from its type identifier.
static IAlgorithm createFrom(DataAdaptor daptArchive)
          Create and initialize a new algorithm object from a data source exposing the DataAdaptor interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NODETAG_ALG

public static final java.lang.String NODETAG_ALG
data node label for algorithm data

See Also:
Constant Field Values

ATTRTAG_TYPE

public static final java.lang.String ATTRTAG_TYPE
attribute label for type string identifier

See Also:
Constant Field Values
Constructor Detail

AlgorithmFactory

public AlgorithmFactory()
Method Detail

createFrom

public static IAlgorithm createFrom(DataAdaptor daptArchive)
                             throws DataFormatException
Create and initialize a new algorithm object from a data source exposing the DataAdaptor interface. It is assumed that the algorithm described in the daptArchive argument is a subclass of the Tracker algorithm base class, or at least an algorithm registered to the AlgorithmFactory and exposing the IArchive interface for loading parameters.

Parameters:
daptArchive - data source describing algorithm
Returns:
new, initialized IAlgorithm object
Throws:
DataFormatException - the data describing the algorithm is malformed
See Also:
createEmpty(java.lang.String)

createEmpty

public static IAlgorithm createEmpty(java.lang.String strTypeId)
                              throws java.lang.ClassNotFoundException
Creates a new, empty algorithm object from its type identifier.

Parameters:
strTypeId - string type identifier for algorithm
Returns:
new algorithm object
java.lang.ClassNotFoundException