Package org.corpus_tools.pepper.common
Class StepDesc
- java.lang.Object
-
- org.corpus_tools.pepper.common.StepDesc
-
- Direct Known Subclasses:
Step
public class StepDesc extends Object
This class represents a description of a single step in Pepper. A step is a conceptual unit, to which exactly onePepperModuleinstance belongs to. Such a step can belong to either the import phase, the manipulation phase or the export phase.
This class is used as a communication bridge between the Pepper framework and the outside. When using Pepper as a library or a service, one can createStepDescobject which an abstract description of which module is to use (by setting the name of module and its version) and in case of the module is an importer or an exporter, the description of the path, where the corpus is located.
The main fields of this class are:name- the name of thePepperModuleto be used to identifyPepperModuleversion- the version of thePepperModuleto be used to identify thePepperModulecorpusDesc- an object describing the corpus to be imported or exported (just in case of thePepperModuleis aPepperImporteror aPepperExporter). This object contains a description of the format (name and version) and a path, where to find the corpus.props- a general property object (see:Properties) to customize the mapping process
- Author:
- Florian Zipser
-
-
Constructor Summary
Constructors Constructor Description StepDesc()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CorpusDescgetCorpusDesc()Returns an object to describe all infos about the corpus to im- or export.MODULE_TYPEgetModuleType()Returns the type of thePepperModuleto be used.StringgetName()Returns the name of thePepperModuleto be used for this step.PropertiesgetProps()Returns the object for temporary storage of customization properties.StringgetVersion()Returns the version of thePepperModuleto be used for this step.StepDescsetCorpusDesc(CorpusDesc corpusDesc)Sets an object to describe all infos about the corpus to im- or export.StepDescsetModuleType(MODULE_TYPE moduleType)Sets the type of thePepperModuleto be used.StepDescsetName(String name)Sets the name of thePepperModuleto be used for this step.StepDescsetProps(Properties props)If#setPepperModule(org.corpus_tools.pepper.modules.PepperModule)was already called, the passedPropertiesobject is used to create aPepperModulePropertiesobject, which is set to givenPepperModule.StepDescsetVersion(String version)Sets the version of thePepperModuleto be used for this step.StringtoString()Returns a string representation of this object.voidtoXML(XMLStreamWriter writer)
-
-
-
Method Detail
-
getModuleType
public MODULE_TYPE getModuleType()
Returns the type of thePepperModuleto be used.- Returns:
- module type
-
setModuleType
public StepDesc setModuleType(MODULE_TYPE moduleType)
Sets the type of thePepperModuleto be used.- Parameters:
moduleType-
-
getName
public String getName()
Returns the name of thePepperModuleto be used for this step.- Returns:
- name of
PepperModule
-
setName
public StepDesc setName(String name)
Sets the name of thePepperModuleto be used for this step.- Parameters:
name- ofPepperModule
-
getVersion
public String getVersion()
Returns the version of thePepperModuleto be used for this step.- Returns:
- version of
PepperModule
-
setVersion
public StepDesc setVersion(String version)
Sets the version of thePepperModuleto be used for this step.- Parameters:
version- ofPepperModule
-
getCorpusDesc
public CorpusDesc getCorpusDesc()
Returns an object to describe all infos about the corpus to im- or export. This includes the following:- location of the corpus
- name of the format, the corpus is in or has to be exported in
- version of the format, the corpus is in or has to be exported in
CorpusDescobject is set, one will be created.- Returns:
-
setCorpusDesc
public StepDesc setCorpusDesc(CorpusDesc corpusDesc)
Sets an object to describe all infos about the corpus to im- or export. This includes the following:- location of the corpus
- name of the format, the corpus is in or has to be exported in
- version of the format, the corpus is in or has to be exported in
- Parameters:
corpusDesc-
-
getProps
public Properties getProps()
Returns the object for temporary storage of customization properties. This object is used to createPepperModuleProperties.- Returns:
-
setProps
public StepDesc setProps(Properties props)
If#setPepperModule(org.corpus_tools.pepper.modules.PepperModule)was already called, the passedPropertiesobject is used to create aPepperModulePropertiesobject, which is set to givenPepperModule.- Parameters:
props- properties to customize processing
-
toXML
public void toXML(XMLStreamWriter writer)
-
-