public interface DocumentController
| Modifier and Type | Method and Description |
|---|---|
void |
addModuleControllers(ModuleControllerImpl moduleController)
Adds a further
ModuleControllerImpl to internal list of all
ModuleControllerImpl objects, the here contained
SDocument object has to pass. |
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(). |
ModuleController |
getCurrentModuleController()
Returns the module controller, which is currently processing this
document.
|
org.corpus_tools.salt.common.SDocument |
getDocument()
Returns the
SDocument object, to which this object belongs to. |
org.corpus_tools.salt.graph.Identifier |
getDocumentId()
Returns the
Identifier of the SDocument object, to which
this object belongs to. |
String |
getGlobalId()
Returns a global unique (inside one Salt project) id for the contained
SDocument object. |
DOCUMENT_STATUS |
getGlobalStatus()
Returns the global status of this object.
|
org.eclipse.emf.common.util.URI |
getLocation()
Returns location, where to store
SDocumentGraph when
#sleep() was called or load when awake() was called |
List<ModuleControllerImpl> |
getModuleControllers()
Returns a list of all
ModuleControllerImpl objects, the here
contained SDocument object has to pass. |
int |
getNumOfProcessingModules()
Returns the number of
PepperModule currently processing the
SDocument or more precisly the SDocumentGraph contained
by this DocumentControllerImpl object. |
Long |
getProcessingTime()
Returns the processing time of the contained
SDocument object,
needed by all registered PepperModule, which have already started
the process. |
double |
getProgress()
Returns the progress of the contained
SDocument for all
registered ModuleControllerImpl objects. |
int |
getSize_nodes()
Stores the number of
SNodes a document contains, when it ws send
to sleep. |
int |
getSize_relations()
Stores the number of
SRelations a document contains, when it ws
send to sleep. |
boolean |
isAsleep()
Returns if the
SDocumentGraph of contained SDocument is
send to sleep or awake. |
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(). |
void |
sendToSleep()
Notifies the
DocumentControllerImpl object, that the contained
SDocument or more precisely the SDocumentGraph object
could be send to sleep. |
void |
setDocument(org.corpus_tools.salt.common.SDocument sDocument)
Sets the
SDocument object, to which this object belongs to. |
void |
setLocation(org.eclipse.emf.common.util.URI location)
Sets location, where to store
SDocumentGraph when
#sleep() was called or load when awake() was called. |
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. |
org.corpus_tools.salt.common.SDocument getDocument()
SDocument object, to which this object belongs to.void setDocument(org.corpus_tools.salt.common.SDocument sDocument)
SDocument object, to which this object belongs to.
Computes the globalId ( see: getGlobalId()). Adds the global id
as processing instruction to the SDocument object.sDocument - SDocument object to which this object belongs toorg.corpus_tools.salt.graph.Identifier getDocumentId()
Identifier of the SDocument object, to which
this object belongs to.String getGlobalId()
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.SDocument objectorg.eclipse.emf.common.util.URI getLocation()
SDocumentGraph when
#sleep() was called or load when awake() was calledvoid setLocation(org.eclipse.emf.common.util.URI location)
SDocumentGraph when
#sleep() was called or load when awake() was called.location - location as URIint getSize_nodes()
SNodes a document contains, when it ws send
to sleep.SNode of the contained documentint getSize_relations()
SRelations a document contains, when it ws
send to sleep.SRelation of the contained documentboolean isAsleep()
SDocumentGraph of contained SDocument is
send to sleep or awake.SDocumentGraph is asleep, false otherwise.void sendToSleep()
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.void sendToSleep_FORCE()
DocumentControllerImpl object, that the contained
SDocument or more precisely the SDocumentGraph object
could be send to sleep as method sendToSleep(). SDocumentGraph is still in use by any other module. Therfore
handle with care.void awake()
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.List<ModuleControllerImpl> getModuleControllers()
ModuleControllerImpl objects, the here
contained SDocument object has to pass.ModuleControllerImpl objectsModuleController getCurrentModuleController()
ModuleControllervoid addModuleControllers(ModuleControllerImpl moduleController)
ModuleControllerImpl to internal list of all
ModuleControllerImpl objects, the here contained
SDocument object has to pass. #updateStatus(String, DOCUMENT_STATUS) has been called.moduleController - ModuleControllerImpl the SDocument also has to
passint getNumOfProcessingModules()
PepperModule currently processing the
SDocument or more precisly the SDocumentGraph contained
by this DocumentControllerImpl object.PepperModule objectsvoid updateStatus(ModuleController moduleController, DOCUMENT_STATUS status)
SDocument object
corresponding to the ModuleControllerImpl matching to the passed
id.pModuleController - determines the StepStatus objectstatus - the status to which the StepStatus shall be set to.DOCUMENT_STATUS getGlobalStatus()
StepStatus object being contained in this object.
StepStatus objects status value is
set to DOCUMENT_STATUS.IN_PROGRESS, the global status will be
DOCUMENT_STATUS.IN_PROGRESS.StepStatus objects status value is
set to DOCUMENT_STATUS.DELETED, the global status will be
DOCUMENT_STATUS.DELETED.StepStatus objects status value is
set to DOCUMENT_STATUS.FAILED, the global status will be
DOCUMENT_STATUS.FAILED.StepStatus objects status value is set
to DOCUMENT_STATUS.COMPLETED, the global status will be
DOCUMENT_STATUS.COMPLETED.double getProgress()
SDocument for all
registered ModuleControllerImpl objects.Long getProcessingTime()
SDocument object,
needed by all registered PepperModule, which have already started
the process.Copyright © 2009–2020 Humboldt-Universität zu Berlin, INRIA. All rights reserved.