Package chemaxon.descriptors
Class ShapeParameters
- java.lang.Object
-
- chemaxon.descriptors.MDParameters
-
- chemaxon.descriptors.ShapeParameters
-
@PublicAPI @Beta public class ShapeParameters extends MDParameters
-
-
Field Summary
-
Fields inherited from class chemaxon.descriptors.MDParameters
asymmetryFactors, cellSize, cellwiseWeights, configFilePath, currentMetricIndex, data, decForm, DEFAULT_ASYMMETRY_FACTOR, DEFAULT_OUTPUT_PRECISION, DEFAULT_SCALE_FACTOR, DEFAULT_WEIGHT, defaultWeight, document, generator, internalSize, length, md, metricIndexes, normalized, outputPrecision, parametrizedMetricNodes, parametrizedMetrics, parametrizedMetricsNode, scaleFactors, screeningConfigurationNode, similarityNode, standardizer, standardizerConfigurationNode, thresholds, tverskyA, tverskyB, weights
-
-
Constructor Summary
Constructors Constructor Description ShapeParameters()
ShapeParameters(File configFile)
ShapeParameters(String XMLconfig)
Creates a new object based on a given configuration string.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fromFile(File parameterFile)
Sets parameters from an XML file.void
fromString(String parameterString)
Sets parameters from a string representation.String
getDefaultDocumentFrame()
Get the default XML configuration string.static String
getDefaultStandardizerConfiguration()
Gets the default configuration of the standardizer.protected void
initEmbeddedMD()
This method is called by the constructors before processing the XML configuration.protected void
initGenerator()
protected void
processDocument(boolean all)
Processes pars of the XML configuration specific toShape
.protected void
readValues(boolean all)
Picks attribute values from the document tree that are relevant to the actualMDParameters
sub-class.void
setFlexible(boolean flexible)
-
Methods inherited from class chemaxon.descriptors.MDParameters
addParameters, addParameters, addParametrizedMetric, addParametrizedMetricNode, addParametrizedMetricsNode, appendParametrizedMetric, checkDocumentVersion, getAsymmetryFactor, getCellSize, getCurrentMetricIndex, getData, getDecForm, getDescriptorTypeName, getInternalMetricIndex, getInternalSize, getLength, getMetricIndex, getMetricName, getMetricName, getNumberOfMetrics, getNumberOfWeights, getNumberOfWeights, getScaleFactor, getScalingHypothesis, getScreeningConfigurationString, getThreshold, getThreshold, getTverskyAlpha, getTverskyBeta, getWeights, importNodes, initParameters, isAsymmetric, isCellwiseWeights, isNormalized, isScaled, isStandardizationMandatory, isWeighted, readFromXmlFile, readFromXmlString, readMetricParameters, readMetricWeights, setAsymmetryFactor, setCellSize, setCellwiseWeights, setCreateStatistics, setCurrentParametrizedMetric, setLength, setNormalized, setOutputPrecision, setParameters, setParameters, setScaleFactor, setScalingHypothesis, setThreshold, setWeights, standardize, toString, toString, writeMetricParameter
-
-
-
-
Constructor Detail
-
ShapeParameters
public ShapeParameters()
-
ShapeParameters
public ShapeParameters(File configFile) throws MDParametersException
- Throws:
MDParametersException
-
ShapeParameters
public ShapeParameters(String XMLconfig) throws MDParametersException
Creates a new object based on a given configuration string.- Parameters:
XMLconfig
- XML configuration string- Throws:
MDParametersException
- missing or bad XML configuration
-
-
Method Detail
-
fromString
public void fromString(String parameterString) throws MDParametersException
Description copied from class:MDParameters
Sets parameters from a string representation. This method assumes that parameters are described in XML format.- Overrides:
fromString
in classMDParameters
- Parameters:
parameterString
- configuration parameters in string- Throws:
MDParametersException
- when the parameter string is not well-formed
-
setFlexible
public void setFlexible(boolean flexible)
-
initGenerator
protected final void initGenerator() throws MDParametersException
- Throws:
MDParametersException
-
fromFile
public void fromFile(File parameterFile) throws MDParametersException
Sets parameters from an XML file. Derived classes may overload this and define their own format (even other than XML).- Overrides:
fromFile
in classMDParameters
- Parameters:
parameterFile
- initialized parameter file- Throws:
MDParametersException
- failed to process parameter file
-
initEmbeddedMD
protected final void initEmbeddedMD()
This method is called by the constructors before processing the XML configuration. It creates aShapeDescriptor
object stored inMDParameters.md
.
-
getDefaultDocumentFrame
public String getDefaultDocumentFrame()
Get the default XML configuration string. This is needed when the optional Shape XML configuration is not specified.- Overrides:
getDefaultDocumentFrame
in classMDParameters
- Returns:
- default XML configuration string of the ShapeParameters class
-
getDefaultStandardizerConfiguration
public static String getDefaultStandardizerConfiguration()
Gets the default configuration of the standardizer. This method is called if no standardizer configuration is set in the parameters configuration. The default standardization forShape
includes aromatization.- Returns:
- standardizer configuration XML string
-
processDocument
protected void processDocument(boolean all) throws MDParametersException
Processes pars of the XML configuration specific toShape
. Find thenode in the DOM tree and leaves the rest of the work to the parent class. - Overrides:
processDocument
in classMDParameters
- Parameters:
all
- indicates if the entire document has to be processed in which case the existing configuration is overwritten- Throws:
MDParametersException
-
readValues
protected void readValues(boolean all) throws MDParametersException
Description copied from class:MDParameters
Picks attribute values from the document tree that are relevant to the actualMDParameters
sub-class.- Overrides:
readValues
in classMDParameters
- Parameters:
all
- process the complete document or only theScreeningConfiguration
tag- Throws:
MDParametersException
-
-