Class PepperImpl

  • All Implemented Interfaces:
    Pepper

    public class PepperImpl
    extends Object
    implements Pepper
    • Constructor Detail

      • PepperImpl

        public PepperImpl()
    • Method Detail

      • findAppropriateImporters

        public Set<String> findAppropriateImporters​(org.eclipse.emf.common.util.URI corpusPath)
                                             throws FileNotFoundException
        Description copied from interface: Pepper
        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.
        Specified by:
        findAppropriateImporters in interface Pepper
        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

        public String createJob()
        Description copied from interface: Pepper
        Creates a new PepperJob object for a new conversion process.
        Specified by:
        createJob in interface Pepper
        Returns:
        identifier of the new created PepperJob
      • getJobIds

        public Set<String> getJobIds()
        Return identifiers of all registered PepperJobImpl objects.
        Returns:
        a list of all job identifiers
      • cleanUp

        public void cleanUp()
        Cleans up current workspace. Removes all non active jobs.
      • getRegisteredModules

        public Collection<PepperModuleDesc> getRegisteredModules()
        Description copied from interface: Pepper
        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.
        Specified by:
        getRegisteredModules in interface Pepper
        Returns:
        a collection of all PepperModuleDesc objects corresponding to Pepper modules
      • unsetModuleResolver

        public void unsetModuleResolver​(ModuleResolver moduleResolver)
        Unsets the ModuleResolverImpl reference. This is necessary for OSGi declarative service.
      • checkFitness

        public Collection<ModuleFitness> checkFitness()
        Description copied from interface: Pepper
        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.
        Specified by:
        checkFitness in interface Pepper
        Returns:
        a list of fitness entries, one per module, if no module is registered an empty list is returned
      • selfTest

        public Collection<String> selfTest()
        Description copied from interface: Pepper
        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.
        Specified by:
        selfTest in interface Pepper
        Returns:
        returns an empty list, if check was positive; if list is not empty, each entry describes a single problem.
      • toString

        public String toString()
        Returns a string representation of this object. Note: This representation cannot be used for serialization/deserialization purposes.
        Overrides:
        toString in class Object