nz.ac.waikato.mcennis.rat.parser.xmlHandler
Class HandlerFactory

java.lang.Object
  extended by nz.ac.waikato.mcennis.rat.AbstractFactory<Handler>
      extended by nz.ac.waikato.mcennis.rat.parser.xmlHandler.HandlerFactory

public class HandlerFactory
extends AbstractFactory<Handler>

Factory class for creating SAX XML parsers for use with the XML Parser class.


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.
 Handler create(Properties props)
          Create the given object using the settings in the Properties object.
 Handler create(java.lang.String classType)
           
 Handler create(java.lang.String classType, Properties parameters)
           
 Parameter getClassParameter()
          Return the parameter containing the name of the default type produced by this object.
static void initialization()
           
static HandlerFactory newInstance()
          Return a reference to a singelton HandlerFactory
 
Methods inherited from class nz.ac.waikato.mcennis.rat.AbstractFactory
addDefaultProperty, addType, 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
Method Detail

newInstance

public static HandlerFactory newInstance()
Return a reference to a singelton HandlerFactory

Returns:
newly created reference to a HandlerFactory

initialization

public static void initialization()

create

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

create

public Handler create(java.lang.String classType)

create

public Handler 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<Handler>
Parameters:
parameters - Properties object that might be merged in
Returns:
will the merged result satisfy property constraints

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

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