public class PepperMapperImpl extends Object implements PepperMapper
PepperMapper to be used for further
derivations for specific mapping purposes.| Modifier and Type | Field and Description |
|---|---|
protected PepperMapperController |
controller |
protected Double |
progress
Stores the current progress (between 0 and 1)
|
protected PepperModuleProperties |
props
PepperModuleProperties object containing user customizations to
be observed during the mapping. |
| Constructor and Description |
|---|
PepperMapperImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addProgress(Double progress)
Adds the given progress to the already existing progress of the current
handled
SDocument or SCorpus object. |
org.corpus_tools.salt.common.SCorpus |
getCorpus()
Returns the
SCorpus object to be mapped by this mapper. |
org.corpus_tools.salt.common.SDocument |
getDocument()
Returns the
SDocument object to be mapped by this mapper. |
DOCUMENT_STATUS |
getMappingResult()
Returns the result of the mapping, when finished.
|
List<MappingSubject> |
getMappingSubjects()
Returns a list of all subjects (
SDocument or SCorpus) to
be merged |
PepperMapperController |
getPepperMapperController()
Returns the controller of this mapper, to grant n access to Pepper via
the controller.
|
Double |
getProgress()
This method is invoked by the containing
PepperModule object, to
get the current progress concerning the SDocument or
SCorpus object handled by this object. |
PepperModuleProperties |
getProperties()
Returns the
PepperModuleProperties object containing user
customizations to be observed during the mapping. |
org.eclipse.emf.common.util.URI |
getResourceURI()
Returns
URI of resource. |
protected void |
initialize()
This method initializes this object and is called by the constructor.
|
DOCUMENT_STATUS |
mapSCorpus()
Starts to map a given
SCorpus object, if one is given. |
DOCUMENT_STATUS |
mapSDocument()
Starts to map a given
SDocument object, if one is given. |
protected void |
readXMLResource(DefaultHandler2 contentHandler,
org.eclipse.emf.common.util.URI documentLocation)
Helper method to read an xml file with a
DefaultHandler2
implementation given as contentHandler. |
void |
setCorpus(org.corpus_tools.salt.common.SCorpus sCorpus)
Sets the
SCorpus object to be mapped by this mapper. |
void |
setDocument(org.corpus_tools.salt.common.SDocument sDocument)
Sets the
SDocument object to be mapped by this mapper. |
void |
setMappingResult(DOCUMENT_STATUS mappingResult)
Sets the result of the current mapping, when it is finished.
|
void |
setPepperMapperController(PepperMapperController controller)
Sets the controller of this mapper, to grant n access to Pepper via the
controller.
|
void |
setProgress(Double progress)
Sets the progress of the current handled
SDocument or
SCorpus object. |
void |
setProperties(PepperModuleProperties props)
Sets the
PepperModuleProperties object containing user
customizations to be observed during the mapping. |
void |
setResourceURI(org.eclipse.emf.common.util.URI resourceURI)
Sets
URI of resource. |
protected PepperModuleProperties props
PepperModuleProperties object containing user customizations to
be observed during the mapping.protected volatile Double progress
protected PepperMapperController controller
public List<MappingSubject> getMappingSubjects()
SDocument or SCorpus) to
be mergedgetMappingSubjects in interface PepperMapperMappingSubjectpublic org.eclipse.emf.common.util.URI getResourceURI()
URI of resource. The URI could refer a directory or a
file, which can be a corpus or a document.getResourceURI in interface PepperMapperpublic void setResourceURI(org.eclipse.emf.common.util.URI resourceURI)
URI of resource. The URI could refer a directory or a file,
which can be a corpus or a document.setResourceURI in interface PepperMapperresourceURI - uri of resourcepublic org.corpus_tools.salt.common.SDocument getDocument()
SDocument object to be mapped by this mapper.getDocument in interface PepperMapperSDocument object to be mappedpublic void setDocument(org.corpus_tools.salt.common.SDocument sDocument)
SDocument object to be mapped by this mapper.setDocument in interface PepperMappersDocument - SDocument object to be mappedpublic org.corpus_tools.salt.common.SCorpus getCorpus()
SCorpus object to be mapped by this mapper.getCorpus in interface PepperMapperSCorpus object to be mappedpublic void setCorpus(org.corpus_tools.salt.common.SCorpus sCorpus)
SCorpus object to be mapped by this mapper.setCorpus in interface PepperMappersCorpus - SCorpus object to be mappedpublic PepperModuleProperties getProperties()
PepperModuleProperties object containing user
customizations to be observed during the mapping.getProperties in interface PepperMapperPepperModuleProperties object to be usedpublic void setProperties(PepperModuleProperties props)
PepperModuleProperties object containing user
customizations to be observed during the mapping.setProperties in interface PepperMapperprops - PepperModuleProperties object to be usedpublic void setMappingResult(DOCUMENT_STATUS mappingResult)
setMappingResult in interface PepperMapperpublic DOCUMENT_STATUS getMappingResult()
getMappingResult in interface PepperMapperprotected void initialize()
public DOCUMENT_STATUS mapSDocument()
SDocument object, if one is given.
OVERRIDE THIS METHOD FOR CUSTOMIZED MAPPING.
SDocument, i.e., if this.getDocument() != null!mapSDocument in interface PepperMapperpublic DOCUMENT_STATUS mapSCorpus()
SCorpus object, if one is given.
OVERRIDE THIS METHOD FOR CUSTOMIZED MAPPING.
SCorpus, i.e., if this.getCorpus() != null!mapSCorpus in interface PepperMapperpublic Double getProgress()
PepperModule object, to
get the current progress concerning the SDocument or
SCorpus object handled by this object. A valid value return must
be between 0 and 1 or null if method the PepperModule does not
call the method PepperMapper.setProgress(Double).getProgress in interface PepperMapperpublic void addProgress(Double progress)
SDocument or SCorpus object. This method should
be called by the PepperMapper containing this connector object.addProgress in interface PepperMapperprogress - the progress must be a value between 0 for 0% and 1 for 100%public void setProgress(Double progress)
SDocument or
SCorpus object. This method should be called by the
PepperMapper containing this connector object. OVERRIDE THIS METHOD FOR
CUSTOMIZED MAPPING.setProgress in interface PepperMapperprogress - the progress must be a value between 0 for 0% and 1 for 100%protected void readXMLResource(DefaultHandler2 contentHandler, org.eclipse.emf.common.util.URI documentLocation)
DefaultHandler2
implementation given as contentHandler. It is assumed, that the
file encoding is set to UTF-8.contentHandler - DefaultHandler2 implementationdocumentLocation - location of the xml-filepublic void setPepperMapperController(PepperMapperController controller)
setPepperMapperController in interface PepperMappercontroller - controller for this objectpublic PepperMapperController getPepperMapperController()
getPepperMapperController in interface PepperMapperCopyright © 2009–2018 Humboldt-Universität zu Berlin, INRIA. All rights reserved.