Pepper
3.6.0
A highly extensible plattform for conversion and manipulationoflinguisticdata.
|
The ModuleResolverImpl realizes a bridge between the Pepper framework and the OSGi environment. More...
Inherits org.corpus_tools.pepper.core.ModuleResolver.
Public Member Functions | |||
ModuleResolverImpl () | |||
TODO make docu. | |||
ComponentContext | getComponentContext () | ||
Returns the ComponentContext of the OSGi environment the bundle was started in.
| |||
void | activate (ComponentContext componentContext) | ||
Sets the ComponentContext of the OSGi environment the bundle was started in.
| |||
String | getStatus () | ||
Returns a status description as String.The returned String contains the number of all available PepperModule objects in a readable format.
| |||
void | addPepperImporterComponentFactory (ComponentFactory pepperImporterComponentFactory) | ||
This method is called by OSGi framework and adds all registered ComponentFactory objects having the name PepperImporterComponentFactory to this object.All ComponentFactory objects are stored in an internal object pepperImporterComponentFactories | |||
void | removePepperImporterComponentFactory (ComponentFactory pepperImporterComponentFactory) | ||
TODO make docu. | |||
List< ComponentFactory > | getPepperImporterComponentFactories () | ||
TODO make docu. | |||
void | addPepperManipulatorComponentFactory (ComponentFactory pepperManipulatorComponentFactory) | ||
This method is called by OSGi framework and adds all registered ComponentFactory objects having the name PepperManipulatorComponentFactory to this object.All ComponentFactory objects are stored in an internal object pepperManipulatorComponentFactories. | |||
void | removePepperManipulatorComponentFactory (ComponentFactory pepperManipulatorComponentFactory) | ||
TODO make docu. | |||
List< ComponentFactory > | getPepperManipulatorComponentFactories () | ||
TODO make docu. | |||
void | addPepperExporterComponentFactory (ComponentFactory pepperExporterComponentFactory) | ||
This method is called by OSGi framework and adds all registered ComponentFactory objects having the name PepperExporterComponentFactory to this object.All ComponentFactory objects are stored in the internal object list pepperExporterComponentFactories.
| |||
void | removePepperExporterComponentFactory (ComponentFactory pepperExporterComponentFactory) | ||
TODO make some docu. | |||
List< ComponentFactory > | getPepperExporterComponentFactories () | ||
TODO make docu. | |||
synchronized void | setConfiguration (PepperConfiguration pepperConfiguration) | ||
Sets the configuration object for this object.
| |||
PepperConfiguration | getConfiguration () | ||
Returns the configuration object for this converter object.If no PepperConfiguration object was set, an automatic detection of configuration file will be started.
| |||
List< PepperImporter > | getPepperImporters () | ||
Creates an instance of PepperImporter for each listed ComponentFactory in list pepperImporterComponentFactories and returns that list.This PepperModuleResolver instance does not store any link to the created object, so it can be used and removed as the caller like. Thus each call creates a new list containing new objects.
| |||
List< PepperManipulator > | getPepperManipulators () | ||
Creates an instance of PepperManipulator for each listed ComponentFactory in list pepperManipulatorComponentFactories and returns that list.This PepperModuleResolver instance does not store any link to the created object, so it can be used and removed as the caller like. Thus each call creates a new list containing new objects.
| |||
List< PepperExporter > | getPepperExporters () | ||
Creates an instance of PepperExporter for each listed ComponentFactory in list pepperExporterComponentFactories and returns that list.This PepperModuleResolver instance does not store any link to the created object, so it can be used and removed as the caller like. Thus each call creates a new list containing new objects.
| |||
PepperModule | getPepperModule (StepDesc stepDesc) | ||
Returns a PepperModule object matching to the given StepDesc.A new instance of the specific PepperImporter class is created and returned. No references to the returned object will be stored in this PepperModuleResolver object. When calling getPepperModule(ImporterParams) a new instance of PepperModule is created.
| |||
PepperImporter | getPepperImporter (StepDesc stepDesc) | ||
Returns a PepperImporter object matching to the given ImporterParams.A new instance of the specific PepperImporter class is created and returned. No references to the returned object will be stored in this PepperModuleResolver object. When calling getPepperImporter(ImporterParams) a new instance of PepperImporter is created.
| |||
PepperManipulator | getPepperManipulator (StepDesc stepDesc) | ||
Creates an instance of PepperManipulator for each listed ComponentFactory in list pepperManipulatorComponentFactories and returns that list.This PepperModuleResolver instance does not store any link to the created object, so it can be used and removed as the caller like. Thus each call creates a new list containing new objects.
| |||
PepperExporter | getPepperExporter (StepDesc stepDesc) | ||
Creates an instance of PepperExporter for each listed ComponentFactory in list pepperExporterComponentFactories and returns that list.This PepperModuleResolver instance does not store any link to the created object, so it can be used and removed as the caller like. Thus each call creates a new list containing new objects.
| |||
String | toString () | ||
TODO make docu. | |||
Static Public Attributes | |
static final String | PROP_OSGI_BUNDLES = "osgi.bundles" |
name of system property to determine the locations of OSGi bundles | |
Static Public Attributes inherited from org.corpus_tools.pepper.core.ModuleResolver | |
static final String | RESOURCES = ".resources" |
Protected Member Functions | |
void | setResources (PepperModule module) |
Sets resources to a given PepperModule-object. More... | |
String | retrieveResourcePathFromBundle (PepperModule module) |
Retrieves the path, where the bundle is located and extracts the path, where resources are estimated. More... | |
void | setTemporaries (PepperModule module, int number) |
Sets a temporary folder for each PepperModule to store temporary files if necessary. More... | |
Protected Attributes | |
ComponentFactory | pepperImporterComponentFactory = null |
This unnecessary variable must be initialized, because of restrictions of the maven osgi scr plugin. More... | |
List< ComponentFactory > | pepperImporterComponentFactories |
TODO make docu. | |
ComponentFactory | pepperManipulatorComponentFactory |
This unnecessary variable must be initialized, because of restrictions of the maven osgi scr plugin. More... | |
List< ComponentFactory > | pepperManipulatorComponentFactories |
TODO make docu. | |
ComponentFactory | pepperExporterComponentFactory |
This unnecessary variable must be initialized, because of restrictions of the maven osgi scr plugin. More... | |
List< ComponentFactory > | pepperExporterComponentFactories |
TODO make docu. | |
The ModuleResolverImpl realizes a bridge between the Pepper framework and the OSGi environment.
Through OSGi declarative services all PepperModule no matter if PepperImporter, PepperExporter or PepperManipulator, all of them are registered in the ModuleResolverImpl. The main task of this class is to get a description of a PepperModule and to resolve a real instance of that PepperModule.
|
protected |
Retrieves the path, where the bundle is located and extracts the path, where resources are estimated.
|
protected |
Sets resources to a given PepperModule-object.
The policy of computing the resource path is the following:
module |
|
|
protected |
Sets a temporary folder for each PepperModule to store temporary files if necessary.
The general temporary folder could either be given via the property PepperConfiguration#PROP_TEMP_FOLDER or if this is not set, resolved by via using the temporary folder provided by the OS.
The specific temporary folder is given by the general temporary folder + a subfolder for the modules name and a subfolder for the number of the instance of the current module.
module |
|
number |
|
|
protected |
This unnecessary variable must be initialized, because of restrictions of the maven osgi scr plugin.
Here it is not possible to use a list as osgi-reference. (this is a workaround)
|
protected |
This unnecessary variable must be initialized, because of restrictions of the maven osgi scr plugin.
Here it is not possible to use a list as osgi-reference. (this is a workaround)
|
protected |
This unnecessary variable must be initialized, because of restrictions of the maven osgi scr plugin.
Here it is not possible to use a list as osgi-reference. (this is a workaround)