Pepper  3.6.0
A highly extensible plattform for conversion and manipulationoflinguisticdata.
org.corpus_tools.pepper.modules.PepperModuleProperties Class Reference

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 ()
 

Static Public Attributes

static final String PROP_AFTER_ADD_SLAYER = PREFIX_PEPPER_AFTER + "addSLayer"
 
static final String PROP_AFTER_COPY_RES = PREFIX_PEPPER_AFTER + "copyRes"
 
static final String PROP_BEFORE_ADD_SLAYER = PREFIX_PEPPER_BEFORE + "addSLayer"
 
static final String PROP_BEFORE_READ_META = PREFIX_PEPPER_BEFORE + "readMeta"
 
static final String PROP_AFTER_REPORT_CORPUSGRAPH = PREFIX_PEPPER_AFTER + "reportCorpusGraph"
 
static final String PROP_AFTER_RENAME_ANNOTATIONS = PREFIX_PEPPER_AFTER + "renameAnnos"
 
static final String PROP_AFTER_REMOVE_ANNOTATIONS = PREFIX_PEPPER_AFTER + "removeAnnos"
 
static final String PROP_AFTER_TOKENIZE = PREFIX_PEPPER_AFTER + "tokenize"
 

Protected Attributes

Map< String, PepperModuleProperty<?> > pepperModuleProperties = null
 Internal map to map all PepperModuleProperty objects to their name.
 

Detailed Description

This class is a container for a set of PepperModuleProperty objects.

This class also offers some methods for accessing and maintaining the objects.

Author
Florian Zipser

Constructor & Destructor Documentation

◆ PepperModuleProperties()

org.corpus_tools.pepper.modules.PepperModuleProperties.PepperModuleProperties ( )

Creates instance of PepperModuleProperties and initializes it with a set of customization properties.

These properties are:

Member Function Documentation

◆ addProperties()

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.

◆ addProperty()

void org.corpus_tools.pepper.modules.PepperModuleProperties.addProperty ( PepperModuleProperty<?>  property)

Adds the given PepperModuleProperty object to the internal list.

Parameters
property

◆ checkProperties()

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.

◆ checkProperty()

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.

◆ getProperties()

Properties org.corpus_tools.pepper.modules.PepperModuleProperties.getProperties ( )

Returns a new Properties object containing all property names and their values.

Returns
new Properties object

◆ getProperty()

PepperModuleProperty<?> org.corpus_tools.pepper.modules.PepperModuleProperties.getProperty ( String  propName)

Returns a PepperModuleProperty object corresponding to the given property name.

Parameters
propNamename of the property
Returns
PepperModuleProperty object

◆ getPropertyDesctriptions()

Collection<PepperModuleProperty<?> > org.corpus_tools.pepper.modules.PepperModuleProperties.getPropertyDesctriptions ( )

Returns all registered PepperModuleProperty objects, which are usable for the corresponding PepperModule.

Returns

◆ getPropertyNames()

Collection<String> org.corpus_tools.pepper.modules.PepperModuleProperties.getPropertyNames ( )

Returns all property names registered in that object, and therefore usable for the corresponding PepperModule.

Returns

◆ removePropertyValue()

void org.corpus_tools.pepper.modules.PepperModuleProperties.removePropertyValue ( String  propName)

Removes the value of the property with the passed property name from the properties.

Parameters
propNamename of the property to be removed

◆ setPropertyValues() [1/2]

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.

◆ setPropertyValues() [2/2]

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.

◆ stringToCharList()

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 "\\".

Returns
the isToTokenize