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>|<groupDefinitionsinvalid input: '&' 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 invalid input: '&' 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>|<groupDefinitionsinvalid input: '&' 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 invalid input: '&' g t ; '
<key>::=(a-zA-Z0-9)+
<value>::=(anything\{.':,"})*
<extendedKey>::=(anything\{'" })*
<extendedValue>::=(anything\{'"})*
- Since:
- Marvin 5.11
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConfiguration entry separator token of the action stringstatic final StringEnd of group list token of the action stringstatic final StringGroup entry separator token of the action stringstatic final StringStart of group list token of the action stringstatic final StringParameter key and value separator token of the action stringstatic final StringParameter separator token of the action stringFields inherited from interface chemaxon.standardizer.configuration.reader.StandardizerConfigurationReader
DEFAULT_STANDARDIZERS_CONFIG_PATH, USER_STANDARDIZERS_CONFIG_PATH -
Constructor Summary
ConstructorsConstructorDescriptionStandardizerActionStringReader(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.voidSets 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. DefaultStandardizerActionFactoryis used.- Parameters:
configString- aStringwhich contains the configurations described in action string
-
StandardizerActionStringReader
Constructor with custom standardizer action factory- Parameters:
configString- aStringwhich contains the configurations described in action stringfactory- a customStandardizerActionFactorywhich gives the possibility for this instance to be able to recognized configuration contains custom implementedStandardizerActioninstances
-
-
Method Details
-
getConfiguration
Description copied from interface:StandardizerConfigurationReaderGets the configuration defined by the pre-set configuration file.- Specified by:
getConfigurationin interfaceStandardizerConfigurationReader- Returns:
- the
StandardizerConfigurationinstance which can be run by aStandardizerActionRunnerinstance
-
setPath
Description copied from interface:StandardizerConfigurationReaderSets the base path of the configuration. External references within the configuration file mist be based on the path set with this method.- Specified by:
setPathin interfaceStandardizerConfigurationReader- Parameters:
path- the base path of the configuration
-