Pepper  3.6.0
A highly extensible plattform for conversion and manipulationoflinguisticdata.
org.corpus_tools.pepper.core.InitialDocumentBus Class Reference

TODO make docu. More...

Inherits org.corpus_tools.pepper.core.DocumentBus.

Public Member Functions

 InitialDocumentBus (String outputModuleControllerId)
 Creates an object of this type and sets the passes the given input controller and output controller. More...
 
 InitialDocumentBus (List< String > outputModuleControllerIds)
 Creates an object of this type and sets the passes the given input controller and output controller. More...
 
void put (DocumentController documentController)
 Adds the given DocumentController object to the queue. More...
 
- Public Member Functions inherited from org.corpus_tools.pepper.core.DocumentBus
 DocumentBus (String inputModuleControllerId, String outputModuleControllerId)
 Creates an object of this type and sets the passes the given input controller and output controller. More...
 
 DocumentBus (String inputModuleControllerId, List< String > outputModuleControllerIds)
 Creates an object of this type and sets the passes the given input controller and output controller. More...
 
 DocumentBus (List< String > inputModuleControllerIds, String outputModuleControllerId)
 Creates an object of this type and sets the passes the given input controller and output controller. More...
 
 DocumentBus (List< String > inputModuleControllerIds, List< String > outputModuleControllerIds)
 Creates an object of this type and sets all passed in- and output ModuleController objects. More...
 
List< String > getOutputControllerIds ()
 Returns a list of Ids belonging to ModuleController objects, which are on the output side of this queue. More...
 
List< String > getInputControllerIds ()
 Returns a list of Ids belonging to ModuleController objects on the input side. More...
 
String getId ()
 Creates an id for this object. More...
 
PepperJobImpl getPepperJob ()
 Returns the PepperJob object containing this object. More...
 
void setPepperJob (PepperJobImpl pepperJob)
 Sets the PepperJob object containing this object. More...
 
Hashtable< String, ConcurrentLinkedQueue< DocumentController > > getDocumentBus ()
 Returns the table, which is the central management object of the DocumentBus. More...
 
MEMORY_POLICY getMemPolicy ()
 Returns the set memory policy. More...
 
void setMemPolicy (MEMORY_POLICY memPolicy)
 Sets the memory policy. More...
 
void finish (String inputControllerId)
 Sets the entry corresponding to given id to status finished, which means, that when all listed ModuleController objects on input side, are set to status finish, this queue is finished and no further documents are passed to ModuleController objects on output side. More...
 
boolean isFinished ()
 Returns true, whether all input ModuleController objects called the finish(String) method and set this object to status finish. More...
 
DocumentController pop (String outputControllerId)
 Returns a DocumentController object, which is on first place of the internal queue (regarding the FIFO principle). More...
 
DocumentController pop (String outputControllerId, boolean ignorePermissionForDocument)
 Returns a DocumentController object, which is on first place of the internal queue (regarding the FIFO principle). More...
 
String toString ()
 returns a String representation of this object. More...
 

Static Protected Attributes

static final String ID_INTITIAL = "initial"
 id for the initial document bus, which is input for importers
 

Additional Inherited Members

- Protected Member Functions inherited from org.corpus_tools.pepper.core.DocumentBus
void init (List< String > inputModuleControllerIds, List< String > outputModuleControllerIds)
 Creates an object of this type and passes all output ModuleController objects. More...
 
void initDocumentBus (List< String > outputModuleControllerIds)
 Initializes the table, which is the central management object of the DocumentBus. More...
 
- Protected Attributes inherited from org.corpus_tools.pepper.core.DocumentBus
List< String > outputModuleControllerIds = null
 A list of Ids belonging to ModuleController objects, which are on the output side of this queue. More...
 
List< String > inputModuleControllerIds = null
 A list of Ids belonging to ModuleController objects on the input side. More...
 
String id = null
 Id of this object.
 
volatile Hashtable< String, ConcurrentLinkedQueue< DocumentController > > documentBus = null
 This table is the central management object of the DocumentBus. More...
 
volatile MEMORY_POLICY memPolicy = MEMORY_POLICY.MODERATE
 
ReentrantLock lock = new ReentrantLock(true)
 This lock is used for creating the condition waitUntilAllDocumentsArePut to let the pop(String) method wait until all documents have been put.
 
Condition waitUntilAllDocumentsArePut = lock.newCondition()
 Used to let the pop(String) method wait until all documents have been put.
 

Detailed Description

TODO make docu.

Author
Florian Zipser

Constructor & Destructor Documentation

◆ InitialDocumentBus() [1/2]

org.corpus_tools.pepper.core.InitialDocumentBus.InitialDocumentBus ( String  outputModuleControllerId)

Creates an object of this type and sets the passes the given input controller and output controller.

Parameters
inputModuleControllerIdidentifier of controller, which produces documents for this bus
outputModuleControllerIdidentifier of controller, which consumes documents for this bus

◆ InitialDocumentBus() [2/2]

org.corpus_tools.pepper.core.InitialDocumentBus.InitialDocumentBus ( List< String >  outputModuleControllerIds)

Creates an object of this type and sets the passes the given input controller and output controller.

Parameters
inputModuleControllerIdidentifier of controller, which produces documents for this bus
outputModuleControllerIdslist of identifier of controller, which consumes documents for this bus

Member Function Documentation

◆ put()

void org.corpus_tools.pepper.core.InitialDocumentBus.put ( DocumentController  documentController)

Adds the given DocumentController object to the queue.

Parameters
documentControllerthe DocumentController object to be added to the queue.

Reimplemented from org.corpus_tools.pepper.core.DocumentBus.