Package org.corpus_tools.pepper.common
Interface Pepper
-
- All Known Implementing Classes:
PepperImpl
public interface Pepper- Author:
- Florian Zipser
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Collection<ModuleFitness>checkFitness()Checks the fitness of each registered Pepper module.StringcreateJob()Creates a newPepperJobobject for a new conversion process.Set<String>findAppropriateImporters(org.eclipse.emf.common.util.URI corpusPath)Returns the names of importers which can import the data located at the specifiedcorpusPath.PepperConfigurationgetConfiguration()Returns set configuration forPepper.PepperJobgetJob(String id)Returns aPepperJobcorresponding to the passed id.Collection<PepperModuleDesc>getRegisteredImporters()Returns allPepperModuleDesccorresponding to a registered importer.Collection<PepperModuleDesc>getRegisteredModules()Returns a collection of allPepperModuleDesccorresponding to Pepper modules, which are registered in thisPepperinstance.StringgetRegisteredModulesAsString()Returns a string representation of the methodgetRegisteredModules().booleanremoveJob(String id)Removes thePepperJobcorresponding to the passed identifier, if a job exists.Collection<String>selfTest()Deprecated.voidsetConfiguration(PepperConfiguration configuration)Sets the configuration forPepper.
-
-
-
Method Detail
-
getConfiguration
PepperConfiguration getConfiguration()
Returns set configuration forPepper.- Returns:
-
setConfiguration
void setConfiguration(PepperConfiguration configuration)
Sets the configuration forPepper.- Parameters:
configuration-
-
findAppropriateImporters
Set<String> findAppropriateImporters(org.eclipse.emf.common.util.URI corpusPath) throws FileNotFoundException
Returns the names of importers which can import the data located at the specifiedcorpusPath. If no importer was found for importing the returned list is empty, not null.- Parameters:
corpusPath- the path which should be checked by each importer- Returns:
- names of importers how can import the data located at
corpusPath - Throws:
FileNotFoundException
-
createJob
String createJob()
Creates a newPepperJobobject for a new conversion process.- Returns:
- identifier of the new created
PepperJob
-
getJob
PepperJob getJob(String id) throws JobNotFoundException
Returns aPepperJobcorresponding to the passed id.- Parameters:
id- identifier of aPepperJob- Returns:
- a
PepperJobcorresponding to the passed id - Throws:
JobNotFoundException
-
removeJob
boolean removeJob(String id) throws JobNotFoundException
Removes thePepperJobcorresponding to the passed identifier, if a job exists.- Parameters:
id- identifier of aPepperJob- Returns:
- true, if job was removed successfully, false otherwise
- Throws:
JobNotFoundException
-
getRegisteredImporters
Collection<PepperModuleDesc> getRegisteredImporters()
Returns allPepperModuleDesccorresponding to a registered importer. When no importer is registered returns an empty collection, not null.- Returns:
- all importer fingerprints
-
getRegisteredModules
Collection<PepperModuleDesc> getRegisteredModules()
Returns a collection of allPepperModuleDesccorresponding to Pepper modules, which are registered in thisPepperinstance.
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
PepperModuleDescobjects corresponding to Pepper modules
-
getRegisteredModulesAsString
String getRegisteredModulesAsString()
Returns a string representation of the methodgetRegisteredModules().- Returns:
- a string representation of all registered modules
-
selfTest
@Deprecated Collection<String> selfTest()
Deprecated.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.
-
checkFitness
Collection<ModuleFitness> 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 thePepperImporterImpl.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
-
-