Pepper
3.6.0
A highly extensible plattform for conversion and manipulationoflinguisticdata.
|
This class represents all properties to customize Pepper. More...
Inherits org.corpus_tools.pepper.common.PepperConfiguration.
Public Member Functions | |
PepperStarterConfiguration () | |
Creates a PepperStarterConfiguration object, without setting any property. | |
PepperStarterConfiguration (File propertiesFile) | |
Creates a PepperStarterConfiguration object, using the given file to read the properties to be load into the new created object. More... | |
void | load () |
For test purposes, properties are load from the file FILE_PEPPER_TEST_PROP, which is assumed to be in the FILE_PEPPER_CONF folder in the pepper home path. More... | |
void | load (File propertiesFile) |
Loads pepper properties from given file. More... | |
String | getPlugInPath () |
Returns the plugIn path, where to find the OSGi bundles. More... | |
List< String > | getDropInPaths () |
Returns the dropin paths, where to find the OSGi bundles. More... | |
String | getPepperEMail () |
Returns the eMail address of SaltNPepper. More... | |
String | getPepperHomepage () |
Returns the homepage address of SaltNPepper. More... | |
File | getOSGiProfileFile () |
Returns the path of the OSGi profile file. More... | |
String | getSharedPackages () |
Returns the content of property PROP_OSGI_SHAREDPACKAGES. More... | |
int | getConsoleWidth () |
Returns the width of the output console. More... | |
Public Member Functions inherited from org.corpus_tools.pepper.common.PepperConfiguration | |
PepperConfiguration () | |
Standard constructor which initializes this object with default values: More... | |
PepperConfiguration (Properties properties) | |
Initializes a new object and copies all properties of the given Properties object. More... | |
void | load (ComponentContext componentContext) |
Resolves the location of the bundle by the given ComponentContext and loads the configuration file. More... | |
File | getConfFolder () |
Returns the folder containing the configuration file(s). More... | |
File | getTempPath () |
Returns a temporary path, where the entire system and all modules can store temp files. More... | |
File | getWorkspace () |
Returns the default workspace for PepperJobImpl objects, if one is given in configuration. More... | |
MEMORY_POLICY | getMemPolicy () |
Returns the memory policy for instance to configure the behavior of loading documents. More... | |
Integer | getMaxAmountOfDocuments () |
Returns the the maximal number of currently processed SDocument-objects. More... | |
Boolean | getGcAfterDocumentSleep () |
Boolean | getKeepDocuments () |
name of the flag to determine whether the temporary created document-graph files should be preserved or deleted after Pepper terminates. More... | |
Integer | getReportInterval () |
Flag to determine the time interval of the convert status report. | |
Boolean | getDetaialedStatReport () |
Property to determine whether the status report should contain a progress for each module or just the global progress. More... | |
Static Public Member Functions | |
static File | findPepperHome () |
Extracts the home path of pepper and returns it. More... | |
Static Public Attributes | |
static final String | PROP_PREFIX = "pepper." |
prefix of all properties | |
static final String | ENV_PEPPER_HOME = "PEPPER_HOME" |
Name of the environment variable specifying the pepper home path. | |
static final String | PROP_PEPPER_HOME = PROP_PREFIX + "home" |
Name of the system property specifying the pepper home path. | |
static final String | PROP_CONSOLE_WIDTH = PROP_PREFIX + "console.width" |
Name of property to determine the width of outout console. More... | |
static final String | KEY_PEPPER_HOME = "$" + ENV_PEPPER_HOME |
A key for using the a variable for the pepper home path inside of property files. | |
static final String | FILE_PEPPER_PROP = "pepper.properties" |
Name of the file containing all pepper properties. | |
static final String | FILE_PEPPER_TEST_PROP = "pepper-test.properties" |
Name of the file containing all pepper properties. | |
static final String | FILE_PEPPER_CONF = "conf" |
Folder, where to find all configuration files for Pepper. | |
static final String | PROP_PLUGIN_PATH = PROP_PREFIX + "plugin.path" |
name of the property of where to find the plugin path | |
static final String | PROP_DROPIN_PATHS = PROP_PREFIX + "dropin.paths" |
name of the property of where to find the dropin paths (comma seperated) | |
static final String | PROP_OSGI_PROFILE = PROP_PREFIX + "osgi.profile" |
name of the property of the location of the osgi profile | |
static final String | PROP_OSGI_SHAREDPACKAGES = PROP_PREFIX + Constants.FRAMEWORK_SYSTEMPACKAGES |
name of the property of the location of the osgi profile | |
Static Public Attributes inherited from org.corpus_tools.pepper.common.PepperConfiguration | |
static final String | EMAIL = "saltnpepper@lists.hu-berlin.de" |
pepper-eMail address | |
static final String | HOMEPAGE = "http://corpus-tools.org/pepper/" |
pepper-homepage | |
static final String | FITNESS_FEATURE_DESC = "https://korpling.github.io/pepper/doc/fitness.html" |
link to Pepper developers homepage for fitness features | |
static final String | DEFAULT_WORKSPACE = "workspace" |
A sub folder in Pepper directory to be used as workspace (to store jobs etc.) | |
static final String | PROP_PREFIX = "pepper" |
flag if Pepper shall measure and display the performance of the used PepperModules | |
static final String | PROP_COMPUTE_PERFORMANCE = PROP_PREFIX + ".computePerformance" |
flag if Pepper shall measure and display the performance of the used PepperModules | |
static final String | PROP_TEMP_FOLDER = PROP_PREFIX + ".temporaries" |
Name of the property, which determines a temporary folder, where the framework and all modules can store temporary data. | |
static final String | PROP_MAX_AMOUNT_OF_SDOCUMENTS = PROP_PREFIX + ".maxAmountOfProcessedSDocuments" |
the maximal number of currently processed SDocument-objects | |
static final String | PROP_MEMORY_POLICY = PROP_PREFIX + ".memPolicy" |
Name of property to set the memory policy, for instance to configure the behavior of loading documents. More... | |
static final String | PROP_CALL_GC_AFTER_DOCUMENT = PROP_PREFIX + ".gcAfterDocumentSleep" |
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. | |
static final String | PROP_KEEP_TEMP_DOCS = PROP_PREFIX + ".keepTempDocs" |
name of the flag to determine whether the temporary created document-graph files should be preserved or deleted after Pepper terminates. | |
static final String | PROP_DETAILED_STATUS_REPORT = PROP_PREFIX + ".detailedStatusReport" |
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. | |
static final String | PROP_WORKSPACE = PROP_PREFIX + ".workspace" |
name of the flag to determine a workspace for pepper, where all jobs are stored by default. | |
static final String | PROP_REPORT_INTERVAL = PROP_PREFIX + ".reportInterval" |
name of property to determine the time interval of the convert status report | |
static final String[] | ALL_PROP_NAMES = { PROP_COMPUTE_PERFORMANCE, PROP_MAX_AMOUNT_OF_SDOCUMENTS } |
This array contains all properties, which with the Pepper framework can be configured. | |
static final String | ENV_PEPPER_MODULE_RESOURCES = "pepper.modules.resources" |
static final String | PROP_PEPPER_MODULE_RESOURCES = "pepper.modules.resources" |
static final String | SOURCES_RESOURCES = "src/main/resources/" |
Folder where the resources of a bundle is expected to be. More... | |
static final String | FILE_CONF_FOLDER = "conf" |
Name of the folder containing configuration files. | |
static final String | FILE_CONF_FILE = "pepper.properties" |
Name of the configuration file. | |
static final String | FILE_CONF_TEST_FILE = "pepper-test.properties" |
Name of the configuration file for testing. | |
Additional Inherited Members | |
Protected Member Functions inherited from org.corpus_tools.pepper.common.PepperConfiguration | |
void | setConfFolder (File confFolder) |
Sets the folder containing the configuration file(s). More... | |
This class represents all properties to customize Pepper.
This class is derived from the general class Properties and provides some shortcuts to access specific pepper properties. By default the properties are loaded from folder FILE_PEPPER_CONF. If the file FILE_PEPPER_TEST_PROP exists, this one will be taken, otherwise the system tries to load file FILE_PEPPER_PROP. This behavior can be changed by explicitly passing a properties file.
To initialize the configuration, if no File or Properties are passed via the constructor, please call method load() or one of the other load methods.
You can call the simple constructor PepperProperties() having no parameters. This constructor will make use of the pepper home path mechanism and assumes a file named {@value FILE_PEPPER_PROP} in the pepper home path
This class uses a location called pepper home path, where it assumes all resources necessary to run Pepper. If no customization for these resources is given, default values are assumed. The pepper home path if not explicitly given is detected in the following order:
org.corpus_tools.pepper.cli.PepperStarterConfiguration.PepperStarterConfiguration | ( | File | propertiesFile | ) |
Creates a PepperStarterConfiguration object, using the given file to read the properties to be load into the new created object.
propertiesFile | file containing the pepper properties |
|
static |
Extracts the home path of pepper and returns it.
The home path is searched in following order:
int org.corpus_tools.pepper.cli.PepperStarterConfiguration.getConsoleWidth | ( | ) |
Returns the width of the output console.
The width could be either 120 or 80.
List<String> org.corpus_tools.pepper.cli.PepperStarterConfiguration.getDropInPaths | ( | ) |
Returns the dropin paths, where to find the OSGi bundles.
File org.corpus_tools.pepper.cli.PepperStarterConfiguration.getOSGiProfileFile | ( | ) |
Returns the path of the OSGi profile file.
String org.corpus_tools.pepper.cli.PepperStarterConfiguration.getPepperEMail | ( | ) |
Returns the eMail address of SaltNPepper.
String org.corpus_tools.pepper.cli.PepperStarterConfiguration.getPepperHomepage | ( | ) |
Returns the homepage address of SaltNPepper.
String org.corpus_tools.pepper.cli.PepperStarterConfiguration.getPlugInPath | ( | ) |
Returns the plugIn path, where to find the OSGi bundles.
String org.corpus_tools.pepper.cli.PepperStarterConfiguration.getSharedPackages | ( | ) |
Returns the content of property PROP_OSGI_SHAREDPACKAGES.
void org.corpus_tools.pepper.cli.PepperStarterConfiguration.load | ( | ) |
For test purposes, properties are load from the file FILE_PEPPER_TEST_PROP, which is assumed to be in the FILE_PEPPER_CONF folder in the pepper home path.
If this file does not exists, the properties are tried to load from the file FILE_PEPPER_PROP in the same folder.
void org.corpus_tools.pepper.cli.PepperStarterConfiguration.load | ( | File | propertiesFile | ) |
Loads pepper properties from given file.
propertiesFile |
Reimplemented from org.corpus_tools.pepper.common.PepperConfiguration.
|
static |
Name of property to determine the width of outout console.
The width could be either 120 or 80.