nz.ac.waikato.mcennis.rat.dataAquisition
Class DataAquisitionFactory

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.AbstractFactory<DataAquisition>
      extended by nz.ac.waikato.mcennis.rat.dataAquisition.DataAquisitionFactory

public class DataAquisitionFactory
extends AbstractFactory<DataAquisition>

Class for creating DataAquisition Objects


Field Summary
static boolean isInitialized
           
 
Fields inherited from class nz.ac.waikato.mcennis.rat.AbstractFactory
map, properties
 
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.
 DataAquisition create(Properties props)
          Create the given object using the settings in the Properties object.
 DataAquisition create(java.lang.String name)
          Return a new Data Aquisition module with the given key with default parameters.
 DataAquisition create(java.lang.String name, Properties parameters)
          Return a new Data Aquisition module with the given key with the given parameters.
 Parameter getClassParameter()
          Return the parameter containing the name of the default type produced by this object.
 java.lang.String[] getKnownModules()
          Creates a new DataAquisition object using the 'aquisition' property.
 Properties getParameter()
          Get all parameters associated with this object.
static void initialization()
          acquire a reference to this singleton
static DataAquisitionFactory newInstance()
          Create a new factory with proper initialization.
 
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
Method Detail

initialization

public static void initialization()
acquire a reference to this singleton


newInstance

public static DataAquisitionFactory newInstance()
Create a new factory with proper initialization.

Returns:
singelton factory

getKnownModules

public java.lang.String[] getKnownModules()
Creates a new DataAquisition object using the 'aquisition' property. See the init() function of each object for parameter info.

Parameters:
props - key-value pairs used to configure
Returns:
DataAquisition object requested

create

public DataAquisition create(java.lang.String name)
Return a new Data Aquisition module with the given key with default parameters. If the key is null or not present, a warning is issued and a FileReader2Pass is returned.

Parameters:
name - key of the Data Aquisition Algorithm to return
Returns:
Data Aquisition Module

create

public DataAquisition create(java.lang.String name,
                             Properties parameters)
Return a new Data Aquisition module with the given key with the given parameters. If the key is null or not present, a warning is issued and a FileReader2Pass is returned. The default parameters are used if the parameters are null.

Parameters:
name - key of the Data Aquisition Algorithm to return
parameters - parameters to use to create the module
Returns:
Data Aquisition Module

create

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

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

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