planet.commonapi.results
Interface ResultsFactory

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ResultsFactoryImpl

public interface ResultsFactory
extends java.io.Serializable

Its objective is build any required element to build a graph.

Any future implementation must contain the no argument constructor.

Author:
Jordi Pujol 21/02/2005

Method Summary
 ResultsConstraint buildConstraint()
          Build the Constraint specified in the properties file.
 ResultsEdge buildEdge(Id source, Id target, boolean directed, java.lang.String fill)
          Build an edge with the specified values.
 ResultsGenerator buildGenerator()
          Builds the Generator specified in the properties file.
 ResultsFactory setValues(java.lang.Class resultsEdge, java.lang.Class resultsConstraint, java.lang.Class resultsGenerator)
          Sets the initial values for this ResultsFactory.
 

Method Detail

setValues

public ResultsFactory setValues(java.lang.Class resultsEdge,
                                java.lang.Class resultsConstraint,
                                java.lang.Class resultsGenerator)
                         throws InitializationException
Sets the initial values for this ResultsFactory.

Parameters:
resultsEdge - Class reference of the current ResultsEdge implementation.
resultsConstraint - Class reference of the current ResultsConstraint implementation.
resultsGenerator - Class reference of the current ResultsGenerator implementation.
Returns:
The same instance once it has been updated.
Throws:
InitializationException - if some error occurs during the initialization process.

buildEdge

public ResultsEdge buildEdge(Id source,
                             Id target,
                             boolean directed,
                             java.lang.String fill)
                      throws InitializationException
Build an edge with the specified values.

Parameters:
source - Source node Id.
target - Destination node Id.
directed - true when the edge is directed. false in other case.
fill - Fill color in "#RRGGBB" format.
Returns:
An instance of the required Edge implementation.
Throws:
InitializationException - if an error occurs during the initialization.

buildGenerator

public ResultsGenerator buildGenerator()
                                throws InitializationException
Builds the Generator specified in the properties file.

Returns:
The required Generator.
Throws:
InitializationException - if an error occurs during the initialization.

buildConstraint

public ResultsConstraint buildConstraint()
                                  throws InitializationException
Build the Constraint specified in the properties file.

Returns:
The Constraint.
Throws:
InitializationException - if an error occurs during the initialization.