Class StandardizerActionStringReader
- java.lang.Object
-
- chemaxon.standardizer.configuration.reader.StandardizerActionStringReader
-
- All Implemented Interfaces:
StandardizerConfigurationReader
@PublicAPI public class StandardizerActionStringReader extends Object implements StandardizerConfigurationReader
An implementation ofStandardizerConfigurationReader
for parsing action strings
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 methodsetPath(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
Fields Modifier and Type Field Description static String
ENTRY_SEPARATOR
Configuration entry separator token of the action stringstatic String
GROUP_END_TOKEN
End of group list token of the action stringstatic String
GROUP_SEPARATOR
Group entry separator token of the action stringstatic String
GROUP_START_TOKEN
Start of group list token of the action stringstatic String
KEY_VALUE_SEPARATOR
Parameter key and value separator token of the action stringstatic String
PARAM_SEPARATOR
Parameter separator token of the action string-
Fields inherited from interface chemaxon.standardizer.configuration.reader.StandardizerConfigurationReader
DEFAULT_STANDARDIZERS_CONFIG_PATH, USER_STANDARDIZERS_CONFIG_PATH
-
-
Constructor Summary
Constructors Constructor Description StandardizerActionStringReader(String configString)
Default constructor of the reader.StandardizerActionStringReader(String configString, StandardizerActionFactory factory)
Constructor with custom standardizer action factory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StandardizerConfiguration
getConfiguration()
Gets the configuration defined by the pre-set configuration file.void
setPath(String path)
Sets the base path of the configuration.
-
-
-
Field Detail
-
PARAM_SEPARATOR
public static final String PARAM_SEPARATOR
Parameter separator token of the action string- See Also:
- Constant Field Values
-
ENTRY_SEPARATOR
public static final String ENTRY_SEPARATOR
Configuration entry separator token of the action string- See Also:
- Constant Field Values
-
KEY_VALUE_SEPARATOR
public static final String KEY_VALUE_SEPARATOR
Parameter key and value separator token of the action string- See Also:
- Constant Field Values
-
GROUP_START_TOKEN
public static final String GROUP_START_TOKEN
Start of group list token of the action string- See Also:
- Constant Field Values
-
GROUP_END_TOKEN
public static final String GROUP_END_TOKEN
End of group list token of the action string- See Also:
- Constant Field Values
-
GROUP_SEPARATOR
public static final String GROUP_SEPARATOR
Group entry separator token of the action string- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StandardizerActionStringReader
public StandardizerActionStringReader(String configString)
Default constructor of the reader. DefaultStandardizerActionFactory
is used.- Parameters:
configString
- aString
which contains the configurations described in action string
-
StandardizerActionStringReader
public StandardizerActionStringReader(String configString, StandardizerActionFactory factory)
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 Detail
-
getConfiguration
public StandardizerConfiguration 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
public void setPath(String path)
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
-
-