nz.ac.waikato.mcennis.rat.graph.algorithm
Class AlgorithmFactory

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.AbstractFactory<Algorithm>
      extended by nz.ac.waikato.mcennis.rat.graph.algorithm.AlgorithmFactory

public class AlgorithmFactory
extends AbstractFactory<Algorithm>

Class for generating an algorithm object without explicitly linking which one.


Field Summary
static boolean isInitialized
           
 
Fields inherited from class nz.ac.waikato.mcennis.rat.AbstractFactory
map, properties
 
Constructor Summary
AlgorithmFactory()
          Creates a new instance of AlgorithmFactory
 
Method Summary
 boolean check(Properties parameters)
          Verify, without modifying the underlying property lists, that the given Properties object can be merged with this factory, satisfying all constraints.
 Algorithm create(Properties props)
          Create the given object using the settings in the Properties object.
 Algorithm create(java.lang.String name)
           
 Algorithm create(java.lang.String classType, Properties parameters)
           
 Parameter getClassParameter()
          Return the parameter containing the name of the default type produced by this object.
 java.lang.String[] getKnownAggregatorModules()
           
 java.lang.String[] getKnownClusterModules()
           
 java.lang.String[] getKnownCollaborativeFilteringModules()
           
 java.lang.String[] getKnownDisplayModules()
           
 java.lang.String[] getKnownEvaluationModules()
           
 java.lang.String[] getKnownMachineLearningModules()
           
 java.lang.String[] getKnownOtherModules()
          Creates an algorithm

Algorithm is chosen via the 'algorithm' property.
 java.lang.String[] getKnownPrestigeModules()
           
 java.lang.String[] getKnownSimilarityModules()
           
 Properties getParameter()
          Get all parameters associated with this object.
static void initialization()
           
static AlgorithmFactory newInstance()
          Singleton method for aquiring this instance
 
Methods inherited from class nz.ac.waikato.mcennis.rat.AbstractFactory
addDefaultProperty, addType, check, getKnownTypes, 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

AlgorithmFactory

public AlgorithmFactory()
Creates a new instance of AlgorithmFactory

Method Detail

newInstance

public static AlgorithmFactory newInstance()
Singleton method for aquiring this instance

Returns:
AlgorithmFactory instance.

initialization

public static void initialization()

getKnownOtherModules

public java.lang.String[] getKnownOtherModules()
Creates an algorithm

Algorithm is chosen via the 'algorithm' property. Properties for each algorithm are described in the init method of each algorithm's JavaDoc.
The algorithms provided are:

Parameters:
props - mapof parameters for initialiing the algorithm
Returns:
newly constructed algorithm

getKnownSimilarityModules

public java.lang.String[] getKnownSimilarityModules()

getKnownAggregatorModules

public java.lang.String[] getKnownAggregatorModules()

getKnownPrestigeModules

public java.lang.String[] getKnownPrestigeModules()

getKnownClusterModules

public java.lang.String[] getKnownClusterModules()

getKnownCollaborativeFilteringModules

public java.lang.String[] getKnownCollaborativeFilteringModules()

getKnownDisplayModules

public java.lang.String[] getKnownDisplayModules()

getKnownMachineLearningModules

public java.lang.String[] getKnownMachineLearningModules()

getKnownEvaluationModules

public java.lang.String[] getKnownEvaluationModules()

create

public Algorithm 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<Algorithm>
Parameters:
props - parameters used to control the factory.
Returns:
newly created object or null

create

public Algorithm create(java.lang.String name)

create

public Algorithm create(java.lang.String classType,
                        Properties parameters)

check

public boolean check(Properties parameters)
Description copied from class: AbstractFactory
Verify, without modifying the underlying property lists, that the given Properties object can be merged with this factory, satisfying all constraints. nulls are permitted, resulting in a check of the internal Properties object only.

Overrides:
check in class AbstractFactory<Algorithm>
Parameters:
parameters - Properties object that might be merged in
Returns:
will the merged result satisfy property constraints

getParameter

public Properties getParameter()
Description copied from class: AbstractFactory
Get all parameters associated with this object. By default, this returns a reference, not a copy

Overrides:
getParameter in class AbstractFactory<Algorithm>
Returns:
Properties object backing this factory

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<Algorithm>
Returns:
parameter containing the default type.

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