Pepper
3.6.0
A highly extensible plattform for conversion and manipulationoflinguisticdata.
|
This class is a container for a set of PepperModuleProperty objects. More...
Inherits Serializable.
Inherited by org.corpus_tools.pepper.modules.coreModules.DOTManipulatorProperties, and org.corpus_tools.pepper.modules.coreModules.SaltValidatorProperties.
Public Member Functions | |
PepperModuleProperties () | |
Creates instance of PepperModuleProperties and initializes it with a set of customization properties. More... | |
void | addProperties (URI propURI) |
Loads the given file via Properties#load(java.io.InputStream) and adds all properties given in the passed Property object. More... | |
Properties | getProperties () |
Returns a new Properties object containing all property names and their values. More... | |
void | setPropertyValues (File propFile) |
Loads the given file via Properties#load(java.io.InputStream) and adds all properties given in the passed Property object. More... | |
void | setPropertyValues (Properties properties) |
Adds all properties given in the passed Property object. More... | |
boolean | checkProperties () |
Checks if all properties marked as required are really set. More... | |
boolean | checkProperty (PepperModuleProperty<?> prop) |
Checks if the value of given property, when marked as required is really set. More... | |
void | addProperty (PepperModuleProperty<?> property) |
Adds the given PepperModuleProperty object to the internal list. More... | |
PepperModuleProperty<?> | getProperty (String propName) |
Returns a PepperModuleProperty object corresponding to the given property name. More... | |
Collection< String > | getPropertyNames () |
Returns all property names registered in that object, and therefore usable for the corresponding PepperModule. More... | |
Collection< PepperModuleProperty<?> > | getPropertyDesctriptions () |
Returns all registered PepperModuleProperty objects, which are usable for the corresponding PepperModule. More... | |
void | removePropertyValue (String propName) |
Removes the value of the property with the passed property name from the properties. More... | |
List< Character > | stringToCharList (String input) |
Expects a list of characters encoded as a String. More... | |
String | toString () |
Protected Attributes | |
Map< String, PepperModuleProperty<?> > | pepperModuleProperties = null |
Internal map to map all PepperModuleProperty objects to their name. | |
This class is a container for a set of PepperModuleProperty objects.
This class also offers some methods for accessing and maintaining the objects.
org.corpus_tools.pepper.modules.PepperModuleProperties.PepperModuleProperties | ( | ) |
Creates instance of PepperModuleProperties and initializes it with a set of customization properties.
These properties are:
void org.corpus_tools.pepper.modules.PepperModuleProperties.addProperties | ( | URI | propURI | ) |
Loads the given file via Properties#load(java.io.InputStream) and adds all properties given in the passed Property object.
That means, the corresponding PepperModuleProperty will be searched and its value will be set to the one found in the passed Properties object. If no corresponding PepperModuleProperties object corresponds to one of the properties contained in the passed Property object, a new one will be created.
void org.corpus_tools.pepper.modules.PepperModuleProperties.addProperty | ( | PepperModuleProperty<?> | property | ) |
Adds the given PepperModuleProperty object to the internal list.
property |
boolean org.corpus_tools.pepper.modules.PepperModuleProperties.checkProperties | ( | ) |
Checks if all properties marked as required are really set.
Throws a PepperModulePropertyException if a required value is not set.
boolean org.corpus_tools.pepper.modules.PepperModuleProperties.checkProperty | ( | PepperModuleProperty<?> | prop | ) |
Checks if the value of given property, when marked as required is really set.
Throws a PepperModulePropertyException if a required value is not set.
Properties org.corpus_tools.pepper.modules.PepperModuleProperties.getProperties | ( | ) |
Returns a new Properties object containing all property names and their values.
PepperModuleProperty<?> org.corpus_tools.pepper.modules.PepperModuleProperties.getProperty | ( | String | propName | ) |
Returns a PepperModuleProperty object corresponding to the given property name.
propName | name of the property |
Collection<PepperModuleProperty<?> > org.corpus_tools.pepper.modules.PepperModuleProperties.getPropertyDesctriptions | ( | ) |
Returns all registered PepperModuleProperty objects, which are usable for the corresponding PepperModule.
Collection<String> org.corpus_tools.pepper.modules.PepperModuleProperties.getPropertyNames | ( | ) |
Returns all property names registered in that object, and therefore usable for the corresponding PepperModule.
void org.corpus_tools.pepper.modules.PepperModuleProperties.removePropertyValue | ( | String | propName | ) |
Removes the value of the property with the passed property name from the properties.
propName | name of the property to be removed |
void org.corpus_tools.pepper.modules.PepperModuleProperties.setPropertyValues | ( | File | propFile | ) |
Loads the given file via Properties#load(java.io.InputStream) and adds all properties given in the passed Property object.
That means, the corresponding PepperModuleProperty will be searched and its value will be set to the one found in the passed Properties object. If no corresponding PepperModuleProperties object corresponds to one of the properties contained in the passed Property object, a new one will be created.
void org.corpus_tools.pepper.modules.PepperModuleProperties.setPropertyValues | ( | Properties | properties | ) |
Adds all properties given in the passed Property object.
That means, the corresponding PepperModuleProperty will be searched and its value will be set to the one found in the passed Properties object. If no corresponding PepperModuleProperties object corresponds to one of the properties contained in the passed Property object, a new one will be created.
List<Character> org.corpus_tools.pepper.modules.PepperModuleProperties.stringToCharList | ( | String | input | ) |
Expects a list of characters encoded as a String.
The String is split and returned as a list of characters. The list must be build like this:
LIST: ITEM (,ITEM)*
ITEM: 'CHARACTER'
For instance the passed String "'a', 'b', 'c'" is returned as a list containing 'a', 'b' and 'c'. In case of the characters "'" or "\" are used as items, they must be escaped as "\'" or "\\".