Class StandardizerXMLReader
java.lang.Object
chemaxon.standardizer.configuration.reader.StandardizerXMLReader
- All Implemented Interfaces:
StandardizerConfigurationReader
@PublicApi
public class StandardizerXMLReader
extends Object
implements StandardizerConfigurationReader
XML Configuration reader for standardizer configurations.
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 StandardizerActionStringReader.setPath(String)
before getting the configuration. It is strongly discouraged to reference
external molecule files from the configuration.
There is no static schema for the configuration file, as the available standardizer actions define their own XML-tag, however the basis of the configuration can be viewed in the default configuration
file, that contains no action definition.
- Since:
- 5.11
-
Field Summary
Fields inherited from interface chemaxon.standardizer.configuration.reader.StandardizerConfigurationReader
DEFAULT_STANDARDIZERS_CONFIG_PATH, USER_STANDARDIZERS_CONFIG_PATH
-
Constructor Summary
ConstructorDescriptionStandardizerXMLReader
(InputStream inputStream) Initiate anStandardizerXMLReader
instance with the given inputSteam with the configurationStandardizerXMLReader
(InputStream inputStream, StandardizerActionFactory factory) Initiate anStandardizerXMLReader
instance with the given inputSteam with the configuration -
Method Summary
Modifier and TypeMethodDescriptionGets the configuration defined by the pre-set configuration file.static boolean
isValidXMLConfiguration
(InputStream inputStream) Checks whether the contents of the provided input stream is a valid configuration XMLvoid
Sets the base path of the configuration.
-
Constructor Details
-
StandardizerXMLReader
Initiate anStandardizerXMLReader
instance with the given inputSteam with the configuration- Parameters:
inputStream
- anInputStream
instance
-
StandardizerXMLReader
Initiate anStandardizerXMLReader
instance with the given inputSteam with the configuration- Parameters:
inputStream
- anInputStream
instancefactory
- the action factory to be used by the reader
-
-
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 - Throws:
IllegalArgumentException
-
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
-
isValidXMLConfiguration
Checks whether the contents of the provided input stream is a valid configuration XML- Parameters:
inputStream
- the input stream containing the configuration- Returns:
- true if valid configuration, false otherwise
-