nz.ac.waikato.mcennis.rat.graph
Class GraphFactory

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.AbstractFactory<Graph>
      extended by nz.ac.waikato.mcennis.rat.graph.GraphFactory

public class GraphFactory
extends AbstractFactory<Graph>

Create a Graph object of the given type with the given arguments


Field Summary
static boolean isInitialized
           
 
Fields inherited from class nz.ac.waikato.mcennis.rat.AbstractFactory
map, properties
 
Constructor Summary
protected GraphFactory()
          Creates a new instance of GraphFactory
 
Method Summary
 Graph create(Properties props)
          Create the given object using the settings in the Properties object.
 Graph create(java.lang.String id)
          Create a graph object without directly exposing the underlying types Types of graphs are pulled from the "Graph" key with "GraphID" for their unique ID.
 Graph create(java.lang.String id, Properties parameters)
           
 Parameter getClassParameter()
          Return the parameter containing the name of the default type produced by this object.
 java.lang.String[] getKnownGraphs()
           
static void initialization()
           
static GraphFactory newInstance()
          return a singleton of this type, creating it if necessary
 
Methods inherited from class nz.ac.waikato.mcennis.rat.AbstractFactory
addDefaultProperty, addType, check, check, getKnownTypes, getParameter, getParameter, setDefaultProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isInitialized

public static boolean isInitialized
Constructor Detail

GraphFactory

protected GraphFactory()
Creates a new instance of GraphFactory

Method Detail

newInstance

public static GraphFactory newInstance()
return a singleton of this type, creating it if necessary

Returns:
signelton instance of GraphFactory

initialization

public static void initialization()

create

public Graph create(java.lang.String id)
Create a graph object without directly exposing the underlying types Types of graphs are pulled from the "Graph" key with "GraphID" for their unique ID.

Parameters:
args - parameters for the new graph
Returns:
newly created Graph object

create

public Graph create(java.lang.String id,
                    Properties parameters)

create

public Graph create(Properties props)
Description copied from class: AbstractFactory
Create the given object using the settings in the Properties object. This function is the only global creation object, but each factory should also define a more user-friendly version consisting of a set of commonly used creation parameters as well as a version combining commonly used features with a Properties object. The property may be null. if the creation fails, the factory should log to the Logger the explanation and return null. If at all possible, the factory should provide a reasonable fail-over value rather than return null.

Specified by:
create in class AbstractFactory<Graph>
Parameters:
props - parameters used to control the factory.
Returns:
newly created object or null

getKnownGraphs

public java.lang.String[] getKnownGraphs()

getClassParameter

public Parameter getClassParameter()
Description copied from class: AbstractFactory
Return the parameter containing the name of the default type produced by this object. The parameter will have exactly one value of type String. The type name of this parameter is the type that controls which class of object is produced.

Specified by:
getClassParameter in class AbstractFactory<Graph>
Returns:
parameter containing the default type.

Get Relational Analysis Toolkit at SourceForge.net. Fast, secure and Free Open Source software downloads