ucot
Class ModuleProperties

java.lang.Object
  extended by ucot.ModuleProperties
All Implemented Interfaces:
ModulePropertyInterface
Direct Known Subclasses:
AbbottsHeuristic, Core, DummyHeuristic, DummyInput, DummyParser, DummyUI, GXLOutput, ProcessMlInputAdapter, SimpleInputAdapter, SimpleInputParser, StanfordAdapter

public abstract class ModuleProperties
extends java.lang.Object
implements ModulePropertyInterface

Author:
tujupien

Field Summary
protected  java.util.Properties properties
           
protected  java.net.URL propertiesURL
           
 
Constructor Summary
ModuleProperties()
           
 
Method Summary
 void applyProperties()
          Applies current properties for the module.
 java.util.Properties getProperties()
          Returns module's properties.
private  java.net.URL getPropertiesURL()
          Method for creating the URL from the properties file, which is the same as the class name with an .xml extension.
 java.util.Properties loadDefaultProperties()
          Method which returns the factory default properties for the module.
 void loadProperties()
          Loads settings from the current properties XML file.
 void saveProperties()
          Saves current properties to the properties XML file.
 void setProperties(java.util.Properties properties)
          Sets options for the adapter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertiesURL

protected java.net.URL propertiesURL

properties

protected java.util.Properties properties
Constructor Detail

ModuleProperties

public ModuleProperties()
Method Detail

getPropertiesURL

private java.net.URL getPropertiesURL()
Method for creating the URL from the properties file, which is the same as the class name with an .xml extension.

Returns:
URL to the properties file.

getProperties

public java.util.Properties getProperties()
Description copied from interface: ModulePropertyInterface
Returns module's properties.

Specified by:
getProperties in interface ModulePropertyInterface
Returns:
module's properties.
See Also:
ModulePropertyInterface.getProperties()

setProperties

public void setProperties(java.util.Properties properties)
Description copied from interface: ModulePropertyInterface
Sets options for the adapter. Notice that this does not need to be an perfect set of properties for this module because these properties should be merged to the current properties. So it is possible to change only one property value by giving a new property object with the new value for the given key.

Specified by:
setProperties in interface ModulePropertyInterface
Parameters:
properties - Properties for the adapter.
See Also:
ModulePropertyInterface.setProperties(java.util.Properties)

applyProperties

public void applyProperties()
                     throws BadPropertyValueException
Description copied from interface: ModulePropertyInterface
Applies current properties for the module.

Specified by:
applyProperties in interface ModulePropertyInterface
Throws:
BadPropertyValueException - In this case exception is thrown only if either the given parser or heuristic does not exist.
See Also:
ModulePropertyInterface.applyProperties()

saveProperties

public void saveProperties()
                    throws java.io.IOException
Description copied from interface: ModulePropertyInterface
Saves current properties to the properties XML file.

Specified by:
saveProperties in interface ModulePropertyInterface
Throws:
java.io.IOException - Exception is thrown if something went wrong.
See Also:
ModulePropertyInterface.saveProperties()

loadProperties

public void loadProperties()
                    throws java.io.IOException
Description copied from interface: ModulePropertyInterface
Loads settings from the current properties XML file.

Specified by:
loadProperties in interface ModulePropertyInterface
Throws:
java.io.IOException - Exception is thrown if something went wrong.
See Also:
ModulePropertyInterface.loadProperties()

loadDefaultProperties

public java.util.Properties loadDefaultProperties()
Description copied from interface: ModulePropertyInterface
Method which returns the factory default properties for the module.

Specified by:
loadDefaultProperties in interface ModulePropertyInterface
Returns:
Default properties.
See Also:
ModulePropertyInterface.loadDefaultProperties()