Package org.corpus_tools.pepper.modules
Interface PepperMapper
-
- All Known Implementing Classes:
PepperMapperImpl,SaltValidator.ValidatorMapper,TextImporter.TextMapper
public interface PepperMapperThis interface can be used in a threaded environment, where thePepperModuleis used for delegating thread jobs, and a set of PepperMappers are mapping oneSDocumentorSCorpusobject.- Author:
- Florian Zipser
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddProgress(Double progress)Adds the given progress to the already existing progress of the current handledSDocumentorSCorpusobject.org.corpus_tools.salt.common.SCorpusgetCorpus()Returns theSCorpusobject to be mapped by this mapper.org.corpus_tools.salt.common.SDocumentgetDocument()Returns theSDocumentobject to be mapped by this mapper.DOCUMENT_STATUSgetMappingResult()Returns the result of the mapping, when finished.List<MappingSubject>getMappingSubjects()Returns a list of all subjects (SDocumentorSCorpus) to be mergedPepperMapperControllergetPepperMapperController()Returns the controller of this mapper, to grant n access to Pepper via the controller.DoublegetProgress()This method is invoked by the containingPepperModuleobject, to get the current progress concerning theSDocumentorSCorpusobject handled by this object.PepperModulePropertiesgetProperties()Returns thePepperModulePropertiesobject containing user customizations to be observed during the mapping.org.eclipse.emf.common.util.URIgetResourceURI()ReturnsURIof resource.DOCUMENT_STATUSmapSCorpus()Starts to map a givenSCorpusobject, if one is given.DOCUMENT_STATUSmapSDocument()Starts to map a givenSDocumentobject, if one is given.voidsetCorpus(org.corpus_tools.salt.common.SCorpus sCorpus)Sets theSCorpusobject to be mapped by this mapper.voidsetDocument(org.corpus_tools.salt.common.SDocument sDocument)Sets theSDocumentobject to be mapped by this mapper.voidsetMappingResult(DOCUMENT_STATUS mappingResult)Sets the result of the current mapping, when it is finished.voidsetPepperMapperController(PepperMapperController controller)Sets the controller of this mapper, to grant n access to Pepper via the controller.voidsetProgress(Double progress)Sets the progress of the current handledSDocumentorSCorpusobject.voidsetProperties(PepperModuleProperties props)Sets thePepperModulePropertiesobject containing user customizations to be observed during the mapping.voidsetResourceURI(org.eclipse.emf.common.util.URI resourceURI)SetsURIof resource.
-
-
-
Method Detail
-
setPepperMapperController
void setPepperMapperController(PepperMapperController controller)
Sets the controller of this mapper, to grant n access to Pepper via the controller.- Parameters:
controller- controller for this object
-
getPepperMapperController
PepperMapperController getPepperMapperController()
Returns the controller of this mapper, to grant n access to Pepper via the controller.- Returns:
- controller for this object
-
setResourceURI
void setResourceURI(org.eclipse.emf.common.util.URI resourceURI)
SetsURIof resource. The URI could refer a directory or a file, which can be a corpus or a document.- Parameters:
resourceURI- uri of resource
-
getResourceURI
org.eclipse.emf.common.util.URI getResourceURI()
ReturnsURIof resource. The URI could refer a directory or a file, which can be a corpus or a document.- Returns:
- uri of resource
-
getDocument
org.corpus_tools.salt.common.SDocument getDocument()
Returns theSDocumentobject to be mapped by this mapper.- Returns:
SDocumentobject to be mapped
-
getMappingSubjects
List<MappingSubject> getMappingSubjects()
Returns a list of all subjects (SDocumentorSCorpus) to be merged- Returns:
- a list of
MappingSubject
-
setDocument
void setDocument(org.corpus_tools.salt.common.SDocument sDocument)
Sets theSDocumentobject to be mapped by this mapper.- Parameters:
sDocument-SDocumentobject to be mapped
-
getCorpus
org.corpus_tools.salt.common.SCorpus getCorpus()
Returns theSCorpusobject to be mapped by this mapper.- Returns:
SCorpusobject to be mapped
-
setCorpus
void setCorpus(org.corpus_tools.salt.common.SCorpus sCorpus)
Sets theSCorpusobject to be mapped by this mapper.- Parameters:
sCorpus-SCorpusobject to be mapped
-
getProperties
PepperModuleProperties getProperties()
Returns thePepperModulePropertiesobject containing user customizations to be observed during the mapping.- Returns:
PepperModulePropertiesobject to be used
-
setProperties
void setProperties(PepperModuleProperties props)
Sets thePepperModulePropertiesobject containing user customizations to be observed during the mapping.- Parameters:
props-PepperModulePropertiesobject to be used
-
setMappingResult
void setMappingResult(DOCUMENT_STATUS mappingResult)
Sets the result of the current mapping, when it is finished.- Parameters:
status- of mapping
-
getMappingResult
DOCUMENT_STATUS getMappingResult()
Returns the result of the mapping, when finished.- Returns:
- mapping result
-
mapSDocument
DOCUMENT_STATUS mapSDocument()
Starts to map a givenSDocumentobject, if one is given.
-
mapSCorpus
DOCUMENT_STATUS mapSCorpus()
Starts to map a givenSCorpusobject, if one is given.
-
getProgress
Double getProgress()
This method is invoked by the containingPepperModuleobject, to get the current progress concerning theSDocumentorSCorpusobject handled by this object. A valid value return must be between 0 and 1 or null if method thePepperModuledoes not call the methodsetProgress(Double).- Parameters:
sDocumentId- identifier of the requestedSDocumentobject.
-
addProgress
void addProgress(Double progress)
Adds the given progress to the already existing progress of the current handledSDocumentorSCorpusobject. This method should be called by thePepperMappercontaining this connector object.- Parameters:
progress- the progress must be a value between 0 for 0% and 1 for 100%
-
setProgress
void setProgress(Double progress)
Sets the progress of the current handledSDocumentorSCorpusobject. This method should be called by thePepperMappercontaining this connector object.- Parameters:
progress- the progress must be a value between 0 for 0% and 1 for 100%
-
-