public interface PepperMapperController extends Runnable
PepperMapperController is a communicator class between
a PepperModule and a PepperMapper object. The aim of this
class is to provide some fields, which can be set by the PepperMapper
and be read by the PepperModule object. It does not contain any
reference to the PepperMapper object. This mechanism is used, to make
sure that in case of a forgotten clean up, the PepperMapper object
can be removed by the java garbage collector and does not overfill the main
memory.| Modifier and Type | Method and Description |
|---|---|
org.corpus_tools.salt.graph.Identifier |
getIdentifier()
Returns
Identifier object of the SCorpus or
SDocument object, which is contained by containing
PepperMapper. |
DOCUMENT_STATUS |
getMappingResult()
Returns the result of the mapping, when finished.
|
List<MappingSubject> |
getMappingSubjects()
Returns a list of all subjects (
SDocument or SCorpus) to
be merged |
PepperMapper |
getPepperMapper()
Returns the
PepperMapper, controlled by this object. |
boolean |
getPermissionForProcessDoument(DocumentController controller) |
Double |
getProgress()
This method is invoked by the containing
PepperModule object, to
get the current progress concerning the SDocument or
SCorpus object handled by this object. |
void |
join()
Thread.join() Waits for this thread to die. |
void |
map()
This method starts the
PepperMapper object. |
void |
setIdentifier(org.corpus_tools.salt.graph.Identifier sElementId)
Set
Identifier object of the SCorpus or SDocument
object, which is contained by containing PepperMapper. |
void |
setPepperMapper(PepperMapper pepperMapper)
Sets the
PepperMapper, controlled by this object. |
void |
setPepperModule(PepperModule pepperModule)
Sets the
PepperModule object, which contains the
PepperMapperController as a callback reference. |
void |
setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler eh)
Calls method map.
|
void |
start()
Calls method map.
|
void join() throws InterruptedException
Thread.join() Waits for this thread to die. An invocation of this
method behaves in exactly the same way as the invocation join(0)InterruptedException - - if any thread has interrupted the current thread. The
interrupted status of the current thread is cleared when this
exception is thrown.void start()
Thread.start().
Causes this thread to begin execution; the Java Virtual Machine calls the
run method of this thread. The result is that two threads are running
concurrently: the current thread (which returns from the call to the
start method) and the other thread (which executes its run method). It is
never legal to start a thread more than once. In particular, a thread may
not be restarted once it has completed execution.IllegalThreadStateException - - if the thread was already started.void setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler eh)
Thread.start().
DOCUMENT_STATUS getMappingResult()
List<MappingSubject> getMappingSubjects()
SDocument or SCorpus) to
be mergedMappingSubjectorg.corpus_tools.salt.graph.Identifier getIdentifier()
Identifier object of the SCorpus or
SDocument object, which is contained by containing
PepperMapper.void setIdentifier(org.corpus_tools.salt.graph.Identifier sElementId)
Identifier object of the SCorpus or SDocument
object, which is contained by containing PepperMapper.sElementId - Double getProgress()
PepperModule object, to
get the current progress concerning the SDocument or
SCorpus object handled by this object. A valid value return must
be between 0 and 1 or null if method the PepperModule does not
call the method #setProgress(Double).PepperMapper.getProgress()sDocumentId - identifier of the requested SDocument object.void map()
PepperMapper object. If
#getCorpus() is not null, #mapSCorpus() is called, if
#getDocument() is not null, #mapSDocument() is called.void setPepperMapper(PepperMapper pepperMapper)
PepperMapper, controlled by this object.pepperMapper - PepperMapper getPepperMapper()
PepperMapper, controlled by this object.void setPepperModule(PepperModule pepperModule)
PepperModule object, which contains the
PepperMapperController as a callback reference. This is
necessary, that the PepperMapperController can notify the
containing object that its job is done via calling
PepperModule.done(PepperMapperController)pepperModule - containing PepperModule objectboolean getPermissionForProcessDoument(DocumentController controller)
Copyright © 2009–2021 Humboldt-Universität zu Berlin, INRIA. All rights reserved.