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 PepperMapper
MappingSubject
public 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 PepperMapper
public 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 PepperMapper
resourceURI
- uri of resourcepublic org.corpus_tools.salt.common.SDocument getDocument()
SDocument
object to be mapped by this mapper.getDocument
in interface PepperMapper
SDocument
object to be mappedpublic void setDocument(org.corpus_tools.salt.common.SDocument sDocument)
SDocument
object to be mapped by this mapper.setDocument
in interface PepperMapper
sDocument
- SDocument
object to be mappedpublic org.corpus_tools.salt.common.SCorpus getCorpus()
SCorpus
object to be mapped by this mapper.getCorpus
in interface PepperMapper
SCorpus
object to be mappedpublic void setCorpus(org.corpus_tools.salt.common.SCorpus sCorpus)
SCorpus
object to be mapped by this mapper.setCorpus
in interface PepperMapper
sCorpus
- SCorpus
object to be mappedpublic PepperModuleProperties getProperties()
PepperModuleProperties
object containing user
customizations to be observed during the mapping.getProperties
in interface PepperMapper
PepperModuleProperties
object to be usedpublic void setProperties(PepperModuleProperties props)
PepperModuleProperties
object containing user
customizations to be observed during the mapping.setProperties
in interface PepperMapper
props
- PepperModuleProperties
object to be usedpublic void setMappingResult(DOCUMENT_STATUS mappingResult)
setMappingResult
in interface PepperMapper
public DOCUMENT_STATUS getMappingResult()
getMappingResult
in interface PepperMapper
protected 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 PepperMapper
public 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 PepperMapper
public 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 PepperMapper
public void addProgress(Double progress)
SDocument
or SCorpus
object. This method should
be called by the PepperMapper
containing this connector object.addProgress
in interface PepperMapper
progress
- 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 PepperMapper
progress
- 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 PepperMapper
controller
- controller for this objectpublic PepperMapperController getPepperMapperController()
getPepperMapperController
in interface PepperMapper
Copyright © 2009–2019 Humboldt-Universität zu Berlin, INRIA. All rights reserved.