Difference between revisions of "Understanding Filter Configurations"
m (1 revision imported)
Latest revision as of 19:12, 4 June 2016
A filter configuration is a set of parameters (i.e. options) that tell a filter how to process a document.
You can create different filter configurations that correspond to different sets of options. Then, when you are processing a properties file, you can pick the filter configuration that corresponds to your needs.
In the Okapi distribution, each configuration is normally saved into a separate file with a
.fprm (filter parameters) extension.
The actual format of a configuration file may vary. Many look like a properties file, other are using YAML, other XML, etc.
Most filters provide an editor to edit their configuration files. For the filters that do not you can usually use any text editor to create or modify the configurations.
Filter Configuration ID
The filter configuration ID is a string that identifies a given filter configuration. It's made from the filter identifier (e.g.
okf_properties for the Properties Filter), and some additional string naming the configuration itself (e.g.
@myConfig). The combination is the filter configuration ID:
Note that filter configuration IDs are case sensitive.
Pre-Defined vs. Custom
Filters come with pre-defined configurations. Each filter has at least one: its default configuration. It corresponds to the configuration with each parameters set to its default value. The ID for the default configuration is always the filter ID without additional string (e.g.
All pre-defined configurations are stored along with the filter's code (the JAR file where the filter class is located) and are always accessible if you can access the filter.
Custom configurations are denoted with the use of a "
@" after the filter ID, for example:
okf_properties@myConfig. Pre-defined configurations usually use a "
The custom configurations are stored anywhere you want. The default Okapi mechanism is to let the user specify the directory where the user-defined configurations are. You should make sure to place them outside the Okapi installation directory or they may get deleted if you re-install Okapi.
For an example on creating a custom configuration, see the article "How to Create a Custom Configuration for the XML Filter".
Accessing the Configurations
Tools provide different ways to access the list of available configurations during a session, for example:
- In Rainbow: Select the Tools menu, then Filter Configurations
- In Tikal: Use the
-eoption in the command-line
Eventually you will open the Filter Configurations dialog where all the configurations available for the given tool at that given time are listed.