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

Inherits org.corpus_tools.pepper.common.Pepper.

Classes

class  JobEntry
 

Public Member Functions

PepperConfiguration getConfiguration ()
 Returns set configuration for Pepper. More...
 
void setConfiguration (PepperConfiguration configuration)
 Sets the configuration for Pepper. More...
 
Set< String > findAppropriateImporters (URI corpusPath) throws FileNotFoundException
 Returns the names of importers which can import the data located at the specified corpusPath. More...
 
String createJob ()
 Creates a new PepperJob object for a new conversion process. More...
 
Set< String > getJobIds ()
 Return identifiers of all registered PepperJobImpl objects. More...
 
PepperJob getJob (String id) throws JobNotFoundException
 Returns a PepperJob corresponding to the passed id. More...
 
PepperJobImpl getPepperJobImpl (String id) throws JobNotFoundException
 {@inheritDoc Pepper::getJob(String)}
 
boolean removeJob (String id) throws JobNotFoundException
 Removes the PepperJob corresponding to the passed identifier, if a job exists. More...
 
File getLocation (String id) throws JobNotFoundException
 Returns the location of a job. More...
 
void cleanUp ()
 Cleans up current workspace. More...
 
Collection< PepperModuleDescgetRegisteredImporters ()
 Returns all PepperModuleDesc corresponding to a registered importer. More...
 
Collection< PepperModuleDescgetRegisteredModules ()
 Returns a collection of all PepperModuleDesc corresponding to Pepper modules, which are registered in this Pepper instance. More...
 
ModuleResolver getModuleResolver ()
 Returns the set ModuleResolverImpl object, to resolve PepperModule objects. More...
 
void setModuleResolver (ModuleResolver moduleResolver)
 Sets a ModuleResolverImpl object to resolve PepperModule objects for Pepper jobs. More...
 
void unsetModuleResolver (ModuleResolver moduleResolver)
 Unsets the ModuleResolverImpl reference. More...
 
Collection< ModuleFitnesscheckFitness ()
 Checks the fitness of each registered Pepper module. More...
 
Collection< String > selfTest ()
 Checks if the Pepper framework is ready to run. More...
 
String getRegisteredModulesAsString ()
 Returns a string representation of the method getRegisteredModules(). More...
 
String toString ()
 Returns a string representation of this object. More...
 

Member Function Documentation

◆ checkFitness()

Collection<ModuleFitness> org.corpus_tools.pepper.core.PepperImpl.checkFitness ( )

Checks the fitness of each registered Pepper module.

The fitness of a module indicates in what way a module is docking to the Pepper interface. For instance it checks whether a module provides a contact address of the module'supplier. Or when the module is an importer whether it supports the PepperImporterImpl#isImportable(URI) method.
Further the fitness says whether a module is ready to start.

Returns
a list of fitness entries, one per module, if no module is registered an empty list is returned

Implements org.corpus_tools.pepper.common.Pepper.

◆ cleanUp()

void org.corpus_tools.pepper.core.PepperImpl.cleanUp ( )

Cleans up current workspace.

Removes all non active jobs.

◆ createJob()

String org.corpus_tools.pepper.core.PepperImpl.createJob ( )

Creates a new PepperJob object for a new conversion process.

Returns
identifier of the new created PepperJob

Implements org.corpus_tools.pepper.common.Pepper.

◆ findAppropriateImporters()

Set<String> org.corpus_tools.pepper.core.PepperImpl.findAppropriateImporters ( URI  corpusPath) throws FileNotFoundException

Returns the names of importers which can import the data located at the specified corpusPath.

If no importer was found for importing the returned list is empty, not null.

Parameters
corpusPaththe path which should be checked by each importer
Returns
names of importers how can import the data located at corpusPath

Implements org.corpus_tools.pepper.common.Pepper.

◆ getConfiguration()

PepperConfiguration org.corpus_tools.pepper.core.PepperImpl.getConfiguration ( )

Returns set configuration for Pepper.

Returns

Implements org.corpus_tools.pepper.common.Pepper.

◆ getJob()

PepperJob org.corpus_tools.pepper.core.PepperImpl.getJob ( String  id) throws JobNotFoundException

Returns a PepperJob corresponding to the passed id.

Parameters
ididentifier of a PepperJob
Returns
a PepperJob corresponding to the passed id

Implements org.corpus_tools.pepper.common.Pepper.

◆ getJobIds()

Set<String> org.corpus_tools.pepper.core.PepperImpl.getJobIds ( )

Return identifiers of all registered PepperJobImpl objects.

Returns
a list of all job identifiers

◆ getLocation()

File org.corpus_tools.pepper.core.PepperImpl.getLocation ( String  id) throws JobNotFoundException

Returns the location of a job.

Parameters
id
Returns
Exceptions
JobNotFoundException

◆ getModuleResolver()

ModuleResolver org.corpus_tools.pepper.core.PepperImpl.getModuleResolver ( )

Returns the set ModuleResolverImpl object, to resolve PepperModule objects.

Returns
set set ModuleResolverImpl object

◆ getRegisteredImporters()

Collection<PepperModuleDesc> org.corpus_tools.pepper.core.PepperImpl.getRegisteredImporters ( )

Returns all PepperModuleDesc corresponding to a registered importer.

When no importer is registered returns an empty collection, not null.

Returns
all importer fingerprints

Implements org.corpus_tools.pepper.common.Pepper.

◆ getRegisteredModules()

Collection<PepperModuleDesc> org.corpus_tools.pepper.core.PepperImpl.getRegisteredModules ( )

Returns a collection of all PepperModuleDesc corresponding to Pepper modules, which are registered in this Pepper instance.


Note: Depending on the implementation, the computation of this result, can take a time. It could be useful, to store the returned list in case of multiple calls.

Returns
a collection of all PepperModuleDesc objects corresponding to Pepper modules

Implements org.corpus_tools.pepper.common.Pepper.

◆ getRegisteredModulesAsString()

String org.corpus_tools.pepper.core.PepperImpl.getRegisteredModulesAsString ( )

Returns a string representation of the method getRegisteredModules().

Returns
a string representation of all registered modules

Implements org.corpus_tools.pepper.common.Pepper.

◆ removeJob()

boolean org.corpus_tools.pepper.core.PepperImpl.removeJob ( String  id) throws JobNotFoundException

Removes the PepperJob corresponding to the passed identifier, if a job exists.

Parameters
ididentifier of a PepperJob
Returns
true, if job was removed successfully, false otherwise
Exceptions
JobNotFoundException

Implements org.corpus_tools.pepper.common.Pepper.

◆ selfTest()

Collection<String> org.corpus_tools.pepper.core.PepperImpl.selfTest ( )

Checks if the Pepper framework is ready to run.

This means, it checks if everything necessary is given and if all registered modules could be ran. This method can be used as a kind of integration test.

Returns
returns an empty list, if check was positive; if list is not empty, each entry describes a single problem.

Implements org.corpus_tools.pepper.common.Pepper.

◆ setConfiguration()

void org.corpus_tools.pepper.core.PepperImpl.setConfiguration ( PepperConfiguration  configuration)

Sets the configuration for Pepper.

Parameters
configuration

Implements org.corpus_tools.pepper.common.Pepper.

◆ setModuleResolver()

void org.corpus_tools.pepper.core.PepperImpl.setModuleResolver ( ModuleResolver  moduleResolver)

Sets a ModuleResolverImpl object to resolve PepperModule objects for Pepper jobs.

Parameters
moduleResolverModuleResolverImpl object to be used for jobs

◆ toString()

String org.corpus_tools.pepper.core.PepperImpl.toString ( )

Returns a string representation of this object.

Note: This representation cannot be used for serialization/deserialization purposes.

◆ unsetModuleResolver()

void org.corpus_tools.pepper.core.PepperImpl.unsetModuleResolver ( ModuleResolver  moduleResolver)

Unsets the ModuleResolverImpl reference.

This is necessary for OSGi declarative service.