@PublicAPI public class StandardizerXMLReader extends java.lang.Object implements StandardizerConfigurationReader
StandardizerActionStringReader.setPath(String)
before getting the configuration. It is strongly discouraged to reference
external molecule files from the configuration.DEFAULT_STANDARDIZERS_CONFIG_PATH, USER_STANDARDIZERS_CONFIG_PATH
Constructor and Description |
---|
StandardizerXMLReader(java.io.InputStream inputStream)
Initiate an
StandardizerXMLReader instance with the given
inputSteam with the configuration |
StandardizerXMLReader(java.io.InputStream inputStream,
StandardizerActionFactory factory)
Initiate an
StandardizerXMLReader instance with the given
inputSteam with the configuration |
Modifier and Type | Method and Description |
---|---|
StandardizerConfiguration |
getConfiguration()
Gets the configuration defined by the pre-set configuration file.
|
static boolean |
isValidXMLConfiguration(java.io.InputStream inputStream)
Checks whether the contents of the provided input stream is a valid
configuration XML
|
void |
setPath(java.lang.String path)
Sets the base path of the configuration.
|
public StandardizerXMLReader(java.io.InputStream inputStream)
StandardizerXMLReader
instance with the given
inputSteam with the configurationinputStream
- an InputStream
instancepublic StandardizerXMLReader(java.io.InputStream inputStream, StandardizerActionFactory factory)
StandardizerXMLReader
instance with the given
inputSteam with the configurationinputStream
- an InputStream
instancefactory
- the action factory to be used by the readerpublic StandardizerConfiguration getConfiguration() throws java.lang.IllegalArgumentException
StandardizerConfigurationReader
getConfiguration
in interface StandardizerConfigurationReader
StandardizerConfiguration
instance which can be run
by a StandardizerActionRunner
instancejava.lang.IllegalArgumentException
public void setPath(java.lang.String path)
StandardizerConfigurationReader
setPath
in interface StandardizerConfigurationReader
path
- the base path of the configurationpublic static boolean isValidXMLConfiguration(java.io.InputStream inputStream)
inputStream
- the input stream containing the configuration