Class StandardizerActionStringReader
java.lang.Object
chemaxon.standardizer.configuration.reader.StandardizerActionStringReader
- All Implemented Interfaces:
StandardizerConfigurationReader
@PublicApi
public class StandardizerActionStringReader
extends Object
implements StandardizerConfigurationReader
An implementation of
If the configuration contains references to molecules/molecule files not contained by the configuration file, the base path of the configuration must be set by the method
Syntax of action strings:
<actionString>::=<actionStringEntry>(..<actionStringEntry>) *
<actionStringEntry>::=<standardizerAction>|<groupDefinitions& gt;<standardizerAction>
<groupDefinitions>::=<groupDefinition>(,<groupDefinition>)*
<groupDefinition>::=(a-zA-Z0-9)+
<standardizerAction>::=<actionName>|<actionName>< parameters>
<actionName>::=(a-zA-Z0-9)+
<parameters>::=<parameter>(:<parameter>)*
<parameter>::=<key>| '<extendedKey>'|<key>=<value>|<key>='<extendedValu e & g t ; '
<key>::=(a-zA-Z0-9)+
<value>::=(anything\{.':,"})*
<extendedKey>::=(anything\{'" })*
<extendedValue>::=(anything\{'"})*
StandardizerConfigurationReader
for parsing
action stringsIf the configuration contains references to molecules/molecule files not contained by the configuration file, the base path of the configuration must be set by the method
setPath(String)
before gathering the configuration.Syntax of action strings:
<actionString>::=<actionStringEntry>(..<actionStringEntry>) *
<actionStringEntry>::=<standardizerAction>|<groupDefinitions& gt;<standardizerAction>
<groupDefinitions>::=<groupDefinition>(,<groupDefinition>)*
<groupDefinition>::=(a-zA-Z0-9)+
<standardizerAction>::=<actionName>|<actionName>< parameters>
<actionName>::=(a-zA-Z0-9)+
<parameters>::=<parameter>(:<parameter>)*
<parameter>::=<key>| '<extendedKey>'|<key>=<value>|<key>='<extendedValu e & g t ; '
<key>::=(a-zA-Z0-9)+
<value>::=(anything\{.':,"})*
<extendedKey>::=(anything\{'" })*
<extendedValue>::=(anything\{'"})*
- Since:
- Marvin 5.11
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Configuration entry separator token of the action stringstatic final String
End of group list token of the action stringstatic final String
Group entry separator token of the action stringstatic final String
Start of group list token of the action stringstatic final String
Parameter key and value separator token of the action stringstatic final String
Parameter separator token of the action stringFields inherited from interface chemaxon.standardizer.configuration.reader.StandardizerConfigurationReader
DEFAULT_STANDARDIZERS_CONFIG_PATH, USER_STANDARDIZERS_CONFIG_PATH
-
Constructor Summary
ConstructorDescriptionStandardizerActionStringReader
(String configString) Default constructor of the reader.StandardizerActionStringReader
(String configString, StandardizerActionFactory factory) Constructor with custom standardizer action factory -
Method Summary
Modifier and TypeMethodDescriptionGets the configuration defined by the pre-set configuration file.void
Sets the base path of the configuration.
-
Field Details
-
PARAM_SEPARATOR
Parameter separator token of the action string- See Also:
-
ENTRY_SEPARATOR
Configuration entry separator token of the action string- See Also:
-
KEY_VALUE_SEPARATOR
Parameter key and value separator token of the action string- See Also:
-
GROUP_START_TOKEN
Start of group list token of the action string- See Also:
-
GROUP_END_TOKEN
End of group list token of the action string- See Also:
-
GROUP_SEPARATOR
Group entry separator token of the action string- See Also:
-
-
Constructor Details
-
StandardizerActionStringReader
Default constructor of the reader. DefaultStandardizerActionFactory
is used.- Parameters:
configString
- aString
which contains the configurations described in action string
-
StandardizerActionStringReader
Constructor with custom standardizer action factory- Parameters:
configString
- aString
which contains the configurations described in action stringfactory
- a customStandardizerActionFactory
which gives the possibility for this instance to be able to recognized configuration contains custom implementedStandardizerAction
instances
-
-
Method Details
-
getConfiguration
Description copied from interface:StandardizerConfigurationReader
Gets the configuration defined by the pre-set configuration file.- Specified by:
getConfiguration
in interfaceStandardizerConfigurationReader
- Returns:
- the
StandardizerConfiguration
instance which can be run by aStandardizerActionRunner
instance
-
setPath
Description copied from interface:StandardizerConfigurationReader
Sets the base path of the configuration. External references within the configuration file mist be based on the path set with this method.- Specified by:
setPath
in interfaceStandardizerConfigurationReader
- Parameters:
path
- the base path of the configuration
-