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

The interface PepperMapperController is a communicator class between a PepperModule and a PepperMapper object. More...

Inherits Runnable.

Inherited by org.corpus_tools.pepper.impl.PepperMapperControllerImpl.

Public Member Functions

void join () throws InterruptedException
 Thread#join() Waits for this thread to die. More...
 
void start ()
 Calls method map. More...
 
void setUncaughtExceptionHandler (Thread.UncaughtExceptionHandler eh)
 Calls method map. More...
 
DOCUMENT_STATUS getMappingResult ()
 Returns the result of the mapping, when finished. More...
 
List< MappingSubjectgetMappingSubjects ()
 Returns a list of all subjects (SDocument or SCorpus) to be merged. More...
 
Identifier getIdentifier ()
 Returns Identifier object of the SCorpus or SDocument object, which is contained by containing PepperMapper. More...
 
void setIdentifier (Identifier sElementId)
 Set Identifier object of the SCorpus or SDocument object, which is contained by containing PepperMapper. More...
 
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. More...
 
void map ()
 This method starts the PepperMapper object. More...
 
void setPepperMapper (PepperMapper pepperMapper)
 Sets the PepperMapper, controlled by this object. More...
 
PepperMapper getPepperMapper ()
 Returns the PepperMapper, controlled by this object. More...
 
void setPepperModule (PepperModule pepperModule)
 Sets the PepperModule object, which contains the PepperMapperController as a callback reference. More...
 
boolean getPermissionForProcessDoument (DocumentController controller)
 {@inheritDoc PepperJobImpl::getPermissionForProcessDoument(DocumentController)}
 

Detailed Description

The interface 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.

Author
Florian Zipser

Member Function Documentation

◆ getIdentifier()

Identifier org.corpus_tools.pepper.modules.PepperMapperController.getIdentifier ( )

Returns Identifier object of the SCorpus or SDocument object, which is contained by containing PepperMapper.

Returns

Implemented in org.corpus_tools.pepper.impl.PepperMapperControllerImpl.

◆ getMappingResult()

DOCUMENT_STATUS org.corpus_tools.pepper.modules.PepperMapperController.getMappingResult ( )

Returns the result of the mapping, when finished.

Returns
mapping result

Implemented in org.corpus_tools.pepper.impl.PepperMapperControllerImpl.

◆ getMappingSubjects()

List<MappingSubject> org.corpus_tools.pepper.modules.PepperMapperController.getMappingSubjects ( )

Returns a list of all subjects (SDocument or SCorpus) to be merged.

Returns
a list of MappingSubject

Implemented in org.corpus_tools.pepper.impl.PepperMapperControllerImpl.

◆ getPepperMapper()

PepperMapper org.corpus_tools.pepper.modules.PepperMapperController.getPepperMapper ( )

Returns the PepperMapper, controlled by this object.

Returns

Implemented in org.corpus_tools.pepper.impl.PepperMapperControllerImpl.

◆ getProgress()

Double org.corpus_tools.pepper.modules.PepperMapperController.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.

A valid value return must be between 0 and 1 or null if method the PepperModule does not call the method setProgress(Double).
The call is just delegated to PepperMapper#getProgress()

Parameters
sDocumentIdidentifier of the requested SDocument object.

Implemented in org.corpus_tools.pepper.impl.PepperMapperControllerImpl.

◆ join()

void org.corpus_tools.pepper.modules.PepperMapperController.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)

Exceptions
InterruptedException
  • if any thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.

◆ map()

void org.corpus_tools.pepper.modules.PepperMapperController.map ( )

This method starts the PepperMapper object.

If getCorpus() is not null, mapSCorpus() is called, if getDocument() is not null, mapSDocument() is called.

Implemented in org.corpus_tools.pepper.impl.PepperMapperControllerImpl.

◆ setIdentifier()

void org.corpus_tools.pepper.modules.PepperMapperController.setIdentifier ( Identifier  sElementId)

Set Identifier object of the SCorpus or SDocument object, which is contained by containing PepperMapper.

Parameters
sElementId

Implemented in org.corpus_tools.pepper.impl.PepperMapperControllerImpl.

◆ setPepperMapper()

void org.corpus_tools.pepper.modules.PepperMapperController.setPepperMapper ( PepperMapper  pepperMapper)

Sets the PepperMapper, controlled by this object.

Parameters
pepperMapper

Implemented in org.corpus_tools.pepper.impl.PepperMapperControllerImpl.

◆ setPepperModule()

void org.corpus_tools.pepper.modules.PepperMapperController.setPepperModule ( PepperModule  pepperModule)

Sets the 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)

Parameters
pepperModulecontaining PepperModule object

Implemented in org.corpus_tools.pepper.impl.PepperMapperControllerImpl.

◆ setUncaughtExceptionHandler()

void org.corpus_tools.pepper.modules.PepperMapperController.setUncaughtExceptionHandler ( Thread.UncaughtExceptionHandler  eh)

Calls method map.

Delegation of Thread#start().

{@inheritDoc Thread::setUncaughtExceptionHandler(java.lang.Thread. UncaughtExceptionHandler)}

◆ start()

void org.corpus_tools.pepper.modules.PepperMapperController.start ( )

Calls method map.

Delegation of 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.

Exceptions
IllegalThreadStateException
  • if the thread was already started.