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

An object of this types contains a PepperModule and handles as a connector between such an object and the Pepper framework. More...

Inherited by org.corpus_tools.pepper.core.ModuleControllerImpl.

Public Member Functions

String getId ()
 Returns the id of this object. More...
 
PepperModule getPepperModule ()
 Returns the PepperModule object, this controller object is observing. More...
 
PepperJobImpl getJob ()
 Returns the PepperJobImpl object reference of this object. More...
 
void setJob (PepperJobImpl job)
 Sets the PepperJobImpl object reference of this object. More...
 
void setJob_basic (PepperJobImpl job)
 Sets the PepperJobImpl object reference of this object. More...
 
DocumentBus getInputDocumentBus ()
 The DocumentBus object working as input for this ModuleControllerImpl. More...
 
void setInputDocumentBus (DocumentBus inputDocumentBus)
 The DocumentBus object working as input for this ModuleControllerImpl. More...
 
DocumentBus getOutputDocumentBus ()
 All documents which were consumed by the PepperModule contained in this object are set to this output bus, regarding the status, the PepperModule returned. More...
 
void setOutputDocumentBus (DocumentBus outputDocumentBus)
 All documents which were consumed by the PepperModule contained in this object are set to this output bus, regarding the status, the PepperModule returned. More...
 
SCorpusGraph getCorpusGraph ()
 Returns the SCorpusGraph object, the contained PepperImporter is mapping. More...
 
Future<?> importCorpusStructure (SCorpusGraph sCorpusGraph)
 Starts the import of corpus structure via the set PepperImporter object by calling PepperImporter#importCorpusStructure(SCorpusGraph). More...
 
DocumentController next (boolean ignorePermissionForDocument)
 Returns the next DocumentController waiting in the input document bus to be processed by the contained PepperModule. More...
 
DocumentController next ()
 Returns the next DocumentController waiting in the input document bus to be processed by the contained PepperModule. More...
 
void complete (DocumentController documentController)
 Adds the given DocumentController to the output document bus to be processed by the next PepperModule objects. More...
 
void delete (DocumentController documentController)
 Notifies the Pepper framework, that the SDocument being contained in passed DocumentController shall not be processed any further by following Pepper modules. More...
 
Double getProgress (String globalId)
 Returns the progress as a value between 0 and 1 of the contained PepperModule object concerning to the SDocument corresponding to the passed global identifier. More...
 
void setPepperModule (PepperModule newPepperModule)
 Sets the PepperModule object, this controller object is observing. More...
 
void setPepperModule_basic (PepperModule newPepperModule)
 Sets the PepperModule object, this controller object is observing. More...
 

Detailed Description

An object of this types contains a PepperModule and handles as a connector between such an object and the Pepper framework.

Author
Florian Zipser

Member Function Documentation

◆ complete()

void org.corpus_tools.pepper.modules.ModuleController.complete ( DocumentController  documentController)

Adds the given DocumentController to the output document bus to be processed by the next PepperModule objects.

Parameters
documentControllerto be passed to next Pepper module

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ delete()

void org.corpus_tools.pepper.modules.ModuleController.delete ( DocumentController  documentController)

Notifies the Pepper framework, that the SDocument being contained in passed DocumentController shall not be processed any further by following Pepper modules.

Parameters
sElementIdthe id corresponding to the SDocument object, which shall be not further processed

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ getCorpusGraph()

SCorpusGraph org.corpus_tools.pepper.modules.ModuleController.getCorpusGraph ( )

Returns the SCorpusGraph object, the contained PepperImporter is mapping.

This method will only return a non empty object, if the contained PepperModule is an PepperImporter and if importCorpusStructure(SCorpusGraph) was called.

Returns

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ getId()

String org.corpus_tools.pepper.modules.ModuleController.getId ( )

Returns the id of this object.

Returns
the stable id

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ getInputDocumentBus()

DocumentBus org.corpus_tools.pepper.modules.ModuleController.getInputDocumentBus ( )

The DocumentBus object working as input for this ModuleControllerImpl.

All documents on bus will be processed and set to outputDocumentBus

Returns
bus which is input bus

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ getJob()

PepperJobImpl org.corpus_tools.pepper.modules.ModuleController.getJob ( )

Returns the PepperJobImpl object reference of this object.

Returns
containing PepperJobImpl object

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ getOutputDocumentBus()

DocumentBus org.corpus_tools.pepper.modules.ModuleController.getOutputDocumentBus ( )

All documents which were consumed by the PepperModule contained in this object are set to this output bus, regarding the status, the PepperModule returned.

Returns
bus, which is output bus

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ getPepperModule()

PepperModule org.corpus_tools.pepper.modules.ModuleController.getPepperModule ( )

Returns the PepperModule object, this controller object is observing.

Returns
observed object

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ getProgress()

Double org.corpus_tools.pepper.modules.ModuleController.getProgress ( String  globalId)

Returns the progress as a value between 0 and 1 of the contained PepperModule object concerning to the SDocument corresponding to the passed global identifier.

Parameters
globalIdglobal id for SDocument, note, that this is not the SElementId
Returns
progress of process

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ importCorpusStructure()

Future<?> org.corpus_tools.pepper.modules.ModuleController.importCorpusStructure ( SCorpusGraph  sCorpusGraph)

Starts the import of corpus structure via the set PepperImporter object by calling PepperImporter#importCorpusStructure(SCorpusGraph).

The import runs in a separate thread, which is set as child of current thread. Therefore, don::t forget to call method, this method keeps the focus until, the import of the corpus structure has ended. This enables the calling object to wait until the corpus structure was imported. This method can only be invoked once per time.

Parameters
sCorpusGrapha SCorpusGraph object, in which the PepperImporter shall import the corpus structure.

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ next() [1/2]

DocumentController org.corpus_tools.pepper.modules.ModuleController.next ( )

Returns the next DocumentController waiting in the input document bus to be processed by the contained PepperModule.

Returns
next document controller

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ next() [2/2]

DocumentController org.corpus_tools.pepper.modules.ModuleController.next ( boolean  ignorePermissionForDocument)

Returns the next DocumentController waiting in the input document bus to be processed by the contained PepperModule.

In contrast to pop(String), if ignorePermissionForDocument is set to true this method returns a DocumentController object even if the PepperJob permission does not allow to process a further document. This mechanism can be used, if a PepperModule has an own control mechanism of sending SDocuments to sleep.

Parameters
ignorePermissionForDocumentif set, a document will be returned even if the Pepper job gives no permission
Returns
next document controller

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ setInputDocumentBus()

void org.corpus_tools.pepper.modules.ModuleController.setInputDocumentBus ( DocumentBus  inputDocumentBus)

The DocumentBus object working as input for this ModuleControllerImpl.

All documents on bus will be processed and set to outputDocumentBus

Parameters
inputDocumentBusbus to be used as input bus

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ setJob()

void org.corpus_tools.pepper.modules.ModuleController.setJob ( PepperJobImpl  job)

Sets the PepperJobImpl object reference of this object.

And notifies the reverse method PepperJobImpl, to set the ModuleControllerImpl object to this.

Parameters
jobnew PepperJobImpl object

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ setJob_basic()

void org.corpus_tools.pepper.modules.ModuleController.setJob_basic ( PepperJobImpl  job)

Sets the PepperJobImpl object reference of this object.

Parameters
jobnew PepperJobImpl object

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ setOutputDocumentBus()

void org.corpus_tools.pepper.modules.ModuleController.setOutputDocumentBus ( DocumentBus  outputDocumentBus)

All documents which were consumed by the PepperModule contained in this object are set to this output bus, regarding the status, the PepperModule returned.

Parameters
outputDocumentBusbus to be used as input bus

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ setPepperModule()

void org.corpus_tools.pepper.modules.ModuleController.setPepperModule ( PepperModule  newPepperModule)

Sets the PepperModule object, this controller object is observing.

Also sets the inverse method PepperModule#setPepperModuleController_basic(ModuleControllerImpl)

Parameters
newPepperModulenew object to observe

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.

◆ setPepperModule_basic()

void org.corpus_tools.pepper.modules.ModuleController.setPepperModule_basic ( PepperModule  newPepperModule)

Sets the PepperModule object, this controller object is observing.

Parameters
newPepperModulenew object to observe

Implemented in org.corpus_tools.pepper.core.ModuleControllerImpl.