Class PepperConfiguration

  • All Implemented Interfaces:
    Serializable, Cloneable, Map<Object,​Object>

    public class PepperConfiguration
    extends Properties
    This class contains all possible configurations, to take influence on the Pepper process. A configuration is realized as a Property, therefore this class is derived from the general Properties class. It is enhanced for methods to have an easier access to fields to configure the Pepper framework, but you can also find anything necessary when treating this object as a normal Properties object.

    Loading and resolving configuration

    Next to the the mechanisms of loading a prop file or an xml file, this object can also resolve the configuration file by checking the location of the Pepper bundle. It is assumed, that the configuration file is contained in one of two possible locations.
    1. development phase: it is assumed, that the configuration file is stored in PEPPER_SOURCE_HOME/src/main/resoruces
    2. testing phase: it is assumed, that the configuration file is stored in BUNDLE_LOCATION/../BUNDLE_NAME
    Author:
    Florian Zipser
    See Also:
    Serialized Form
    • Field Detail

      • FITNESS_FEATURE_DESC

        public static final String FITNESS_FEATURE_DESC
        link to Pepper developers homepage for fitness features
        See Also:
        Constant Field Values
      • DEFAULT_WORKSPACE

        public static final String DEFAULT_WORKSPACE
        A sub folder in Pepper directory to be used as workspace (to store jobs etc.)
        See Also:
        Constant Field Values
      • PROP_PREFIX

        public static final String PROP_PREFIX
        flag if Pepper shall measure and display the performance of the used PepperModules
        See Also:
        Constant Field Values
      • PROP_COMPUTE_PERFORMANCE

        public static final String PROP_COMPUTE_PERFORMANCE
        flag if Pepper shall measure and display the performance of the used PepperModules
        See Also:
        Constant Field Values
      • PROP_TEMP_FOLDER

        public static final String PROP_TEMP_FOLDER
        Name of the property, which determines a temporary folder, where the framework and all modules can store temporary data.
        See Also:
        Constant Field Values
      • PROP_MAX_AMOUNT_OF_SDOCUMENTS

        public static final String PROP_MAX_AMOUNT_OF_SDOCUMENTS
        the maximal number of currently processed SDocument-objects
        See Also:
        Constant Field Values
      • PROP_MEMORY_POLICY

        public static final String PROP_MEMORY_POLICY
        Name of property to set the memory policy, for instance to configure the behavior of loading documents. See MEMORY_POLICY for more details.
        See Also:
        Constant Field Values
      • PROP_CALL_GC_AFTER_DOCUMENT

        public static final String PROP_CALL_GC_AFTER_DOCUMENT
        Name of property, to determine, if the garbage collector should run after a SDocument has been send to sleep when it waits in DocumentBus between to steps.
        See Also:
        Constant Field Values
      • PROP_KEEP_TEMP_DOCS

        public static final String PROP_KEEP_TEMP_DOCS
        name of the flag to determine whether the temporary created document-graph files should be preserved or deleted after Pepper terminates.
        See Also:
        Constant Field Values
      • PROP_DETAILED_STATUS_REPORT

        public static final String PROP_DETAILED_STATUS_REPORT
        Name of the property to determine Property to determine whether the status report should contain a progress for each module or just the global progress.
        See Also:
        Constant Field Values
      • PROP_WORKSPACE

        public static final String PROP_WORKSPACE
        name of the flag to determine a workspace for pepper, where all jobs are stored by default.
        See Also:
        Constant Field Values
      • PROP_REPORT_INTERVAL

        public static final String PROP_REPORT_INTERVAL
        name of property to determine the time interval of the convert status report
        See Also:
        Constant Field Values
      • ALL_PROP_NAMES

        public static final String[] ALL_PROP_NAMES
        This array contains all properties, which with the Pepper framework can be configured.
      • SOURCES_RESOURCES

        public static final String SOURCES_RESOURCES
        Folder where the resources of a bundle is expected to be. This follows the maven structure of a project
        See Also:
        Constant Field Values
      • FILE_CONF_FOLDER

        public static final String FILE_CONF_FOLDER
        Name of the folder containing configuration files.
        See Also:
        Constant Field Values
      • FILE_CONF_TEST_FILE

        public static final String FILE_CONF_TEST_FILE
        Name of the configuration file for testing.
        See Also:
        Constant Field Values
    • Method Detail

      • load

        public void load​(File configurationFile)
        Loads the configuration from the passed file location
        Parameters:
        configuration -
      • load

        public void load​(org.osgi.service.component.ComponentContext componentContext)
        Resolves the location of the bundle by the given ComponentContext and loads the configuration file. Expects the configuration file to be in one of the two locations:
        1. development phase: it is assumed, that the configuration file is stored in PEPPER_SOURCE_HOME/src/main/resoruces
        2. testing phase: it is assumed, that the configuration file is stored in BUNDLE_LOCATION/../BUNDLE_NAME
        Parameters:
        componentContext -
      • setConfFolder

        protected void setConfFolder​(File confFolder)
        Sets the folder containing the configuration file(s).
        Parameters:
        confFolder -
      • getConfFolder

        public File getConfFolder()
        Returns the folder containing the configuration file(s). If no configuration file is used this method returns null.
        Returns:
      • getTempPath

        public File getTempPath()
        Returns a temporary path, where the entire system and all modules can store temp files. If no temp folder is given by configuration file, the default temporary folder given by the operating system is used.
        Returns:
        path, where to store temporary files
      • getWorkspace

        public File getWorkspace()
        Returns the default workspace for PepperJobImpl objects, if one is given in configuration. If no one is given, the temporary folder is returned.
        Returns:
        workspace to be used to store PepperJobImpl
      • getMemPolicy

        public MEMORY_POLICY getMemPolicy()
        Returns the memory policy for instance to configure the behavior of loading documents. See MEMORY_POLICY for more details.
        Returns:
      • getMaxAmountOfDocuments

        public Integer getMaxAmountOfDocuments()
        Returns the the maximal number of currently processed SDocument-objects
        Returns:
      • getGcAfterDocumentSleep

        public Boolean getGcAfterDocumentSleep()
      • getKeepDocuments

        public Boolean getKeepDocuments()
        name of the flag to determine whether the temporary created document-graph files should be preserved or deleted after Pepper terminates. Default value is false.
      • getReportInterval

        public Integer getReportInterval()
        Flag to determine the time interval of the convert status report
      • getDetaialedStatReport

        public Boolean getDetaialedStatReport()
        Property to determine whether the status report should contain a progress for each module or just the global progress.
        Returns: