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

Inherited by org.corpus_tools.pepper.core.DocumentControllerImpl.

Public Member Functions

SDocument getDocument ()
 Returns the SDocument object, to which this object belongs to. More...
 
void setDocument (SDocument sDocument)
 Sets the SDocument object, to which this object belongs to. More...
 
Identifier getDocumentId ()
 Returns the Identifier of the SDocument object, to which this object belongs to. More...
 
String getGlobalId ()
 Returns a global unique (inside one Salt project) id for the contained SDocument object. More...
 
URI getLocation ()
 Returns location, where to store SDocumentGraph when sleep() was called or load when awake() was called. More...
 
void setLocation (URI location)
 Sets location, where to store SDocumentGraph when sleep() was called or load when awake() was called. More...
 
int getSize_nodes ()
 Stores the number of SNodes a document contains, when it ws send to sleep. More...
 
int getSize_relations ()
 Stores the number of SRelations a document contains, when it ws send to sleep. More...
 
boolean isAsleep ()
 Returns if the SDocumentGraph of contained SDocument is send to sleep or awake. More...
 
void sendToSleep ()
 Notifies the DocumentControllerImpl object, that the contained SDocument or more precisely the SDocumentGraph object could be send to sleep. More...
 
void sendToSleep_FORCE ()
 Sends the DocumentControllerImpl object, that the contained SDocument or more precisely the SDocumentGraph object could be send to sleep as method sendToSleep(). More...
 
void awake ()
 Wakes up the contained SDocument, which means, it the SDocumentGraph of the SDocument will be load to main memory again by calling SDocument#loadSDocumentGraph(). More...
 
List< ModuleControllerImplgetModuleControllers ()
 Returns a list of all ModuleControllerImpl objects, the here contained SDocument object has to pass. More...
 
ModuleController getCurrentModuleController ()
 Returns the module controller, which is currently processing this document. More...
 
void addModuleControllers (ModuleControllerImpl moduleController)
 Adds a further ModuleControllerImpl to internal list of all ModuleControllerImpl objects, the here contained SDocument object has to pass. More...
 
int getNumOfProcessingModules ()
 Returns the number of PepperModule currently processing the SDocument or more precisly the SDocumentGraph contained by this DocumentControllerImpl object. More...
 
void updateStatus (ModuleController moduleController, DOCUMENT_STATUS status)
 Updates the status of a specified of contained SDocument object corresponding to the ModuleControllerImpl matching to the passed id. More...
 
DOCUMENT_STATUS getGlobalStatus ()
 Returns the global status of this object. More...
 
double getProgress ()
 Returns the progress of the contained SDocument for all registered ModuleControllerImpl objects. More...
 
Long getProcessingTime ()
 Returns the processing time of the contained SDocument object, needed by all registered PepperModule, which have already started the process.
 

Member Function Documentation

◆ addModuleControllers()

void org.corpus_tools.pepper.modules.DocumentController.addModuleControllers ( ModuleControllerImpl  moduleController)

Adds a further ModuleControllerImpl to internal list of all ModuleControllerImpl objects, the here contained SDocument object has to pass.


Note: You cannot call this method anymore, if the process has already been started. Which means that the methods updateStatus(String, DOCUMENT_STATUS) has been called.

Parameters
moduleControllerModuleControllerImpl the SDocument also has to pass

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ awake()

void org.corpus_tools.pepper.modules.DocumentController.awake ( )

Wakes up the contained SDocument, which means, it the SDocumentGraph of the SDocument will be load to main memory again by calling SDocument#loadSDocumentGraph().

The counterpart to this method is sleep(). Both methods are synchronized.

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ getCurrentModuleController()

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

Returns the module controller, which is currently processing this document.

Returns
the currently active ModuleController

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ getDocument()

SDocument org.corpus_tools.pepper.modules.DocumentController.getDocument ( )

Returns the SDocument object, to which this object belongs to.

Returns
document id

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ getDocumentId()

Identifier org.corpus_tools.pepper.modules.DocumentController.getDocumentId ( )

Returns the Identifier of the SDocument object, to which this object belongs to.

Returns
document id

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ getGlobalId()

String org.corpus_tools.pepper.modules.DocumentController.getGlobalId ( )

Returns a global unique (inside one Salt project) id for the contained SDocument object.

This identifier is computed by mthe number of the SCorpusGraph in list, this SDocument object is contained in and the Identifier of the SDocument. Imagine the number of the SCorpusGraph is 1 and the Identifier#getId() is /corpus1/document1, than the returned global id is /1/corpus1/document1.

Returns
a global unique (inside one Salt project) id for the contained SDocument object

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ getGlobalStatus()

DOCUMENT_STATUS org.corpus_tools.pepper.modules.DocumentController.getGlobalStatus ( )

Returns the global status of this object.

The global status is determined by each StepStatus object being contained in this object.

Returns

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ getLocation()

URI org.corpus_tools.pepper.modules.DocumentController.getLocation ( )

Returns location, where to store SDocumentGraph when sleep() was called or load when awake() was called.

Returns
location

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ getModuleControllers()

List<ModuleControllerImpl> org.corpus_tools.pepper.modules.DocumentController.getModuleControllers ( )

Returns a list of all ModuleControllerImpl objects, the here contained SDocument object has to pass.

Returns
a list of all ModuleControllerImpl objects

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ getNumOfProcessingModules()

int org.corpus_tools.pepper.modules.DocumentController.getNumOfProcessingModules ( )

Returns the number of PepperModule currently processing the SDocument or more precisly the SDocumentGraph contained by this DocumentControllerImpl object.

Returns
number of processing PepperModule objects

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ getProgress()

double org.corpus_tools.pepper.modules.DocumentController.getProgress ( )

Returns the progress of the contained SDocument for all registered ModuleControllerImpl objects.

Returns
percentage value between 0 and 1.

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ getSize_nodes()

int org.corpus_tools.pepper.modules.DocumentController.getSize_nodes ( )

Stores the number of SNodes a document contains, when it ws send to sleep.

Returns
number of SNode of the contained document

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ getSize_relations()

int org.corpus_tools.pepper.modules.DocumentController.getSize_relations ( )

Stores the number of SRelations a document contains, when it ws send to sleep.

Returns
number of SRelation of the contained document

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ isAsleep()

boolean org.corpus_tools.pepper.modules.DocumentController.isAsleep ( )

Returns if the SDocumentGraph of contained SDocument is send to sleep or awake.

Returns
true, if SDocumentGraph is asleep, false otherwise.

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ sendToSleep()

void org.corpus_tools.pepper.modules.DocumentController.sendToSleep ( )

Notifies the DocumentControllerImpl object, that the contained SDocument or more precisely the SDocumentGraph object could be send to sleep.

If no PepperModule is currently processing it, the SDocumentGraph is send to sleep. This means, the SDocumentGraph will be stored to local disk and removed from main memory, by calling SDocument#saveSDocumentGraph(org.eclipse.emf.common.util.URI). The counterpart to this method is awake(). Both methods are synchronized.

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ sendToSleep_FORCE()

void org.corpus_tools.pepper.modules.DocumentController.sendToSleep_FORCE ( )

Sends the DocumentControllerImpl object, that the contained SDocument or more precisely the SDocumentGraph object could be send to sleep as method sendToSleep().


But note, this method does not check if the SDocumentGraph is still in use by any other module. Therfore handle with care.

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ setDocument()

void org.corpus_tools.pepper.modules.DocumentController.setDocument ( SDocument  sDocument)

Sets the SDocument object, to which this object belongs to.

Computes the globalId ( see: getGlobalId()). Adds the global id as processing instruction to the SDocument object.

Parameters
sDocumentSDocument object to which this object belongs to

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ setLocation()

void org.corpus_tools.pepper.modules.DocumentController.setLocation ( URI  location)

Sets location, where to store SDocumentGraph when sleep() was called or load when awake() was called.

Parameters
locationlocation as URI

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.

◆ updateStatus()

void org.corpus_tools.pepper.modules.DocumentController.updateStatus ( ModuleController  moduleController,
DOCUMENT_STATUS  status 
)

Updates the status of a specified of contained SDocument object corresponding to the ModuleControllerImpl matching to the passed id.

Parameters
pModuleControllerdetermines the StepStatus object
statusthe status to which the StepStatus shall be set to.

Implemented in org.corpus_tools.pepper.core.DocumentControllerImpl.