Package chemaxon.descriptors
Class SDParameters
java.lang.Object
chemaxon.descriptors.MDParameters
chemaxon.descriptors.SDParameters
- Direct Known Subclasses:
HBParameters
,LDParameters
Manages
ScalarDescriptor
parameters. This class reads, stores
and provides parameters for the ScalarDescriptor
class. The
native format of the parameter configuraton is XML.- Since:
- JChem 2.2
-
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
ConstructorDescriptionCreates an empty object.SDParameters
(File configFile) Creates a new object from the given configuration file.SDParameters
(String XMLconfig) Creates a new object from the given configuration string. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Sets parameters from an XML file.void
fromString
(String parameterString) Sets parameters from a string representation.int
Gets the total number of parametrized metrics available in the present configuration.getType()
protected void
init()
This method is called by the constructors before processing the XML configuration.protected void
Initializes those data members that depend on the XML configuration but are not directly taken from it.protected void
processDocument
(boolean all) Processes parts of the XML configuration specific toScalarDescriptor
.protected void
readValues
(boolean all) Reads attribute values form the XML configuration.void
setLength
(int length) Sets the length (number of cells) of the descriptor.Methods inherited from class chemaxon.descriptors.MDParameters
addParameters, addParameters, addParametrizedMetric, addParametrizedMetricNode, addParametrizedMetricsNode, appendParametrizedMetric, checkDocumentVersion, getAsymmetryFactor, getCellSize, getCurrentMetricIndex, getData, getDecForm, getDefaultDocumentFrame, getDefaultStandardizerConfiguration, getDescriptorTypeName, getInternalMetricIndex, getInternalSize, getLength, getMetricIndex, getMetricName, getMetricName, getNumberOfWeights, getNumberOfWeights, getScaleFactor, getScalingHypothesis, getScreeningConfigurationString, getThreshold, getThreshold, getTverskyAlpha, getTverskyBeta, getWeights, importNodes, isAsymmetric, isCellwiseWeights, isNormalized, isScaled, isStandardizationMandatory, isWeighted, readFromXmlFile, readFromXmlString, readMetricParameters, readMetricWeights, setAsymmetryFactor, setCellSize, setCellwiseWeights, setCreateStatistics, setCurrentParametrizedMetric, setNormalized, setOutputPrecision, setParameters, setParameters, setScaleFactor, setScalingHypothesis, setThreshold, setWeights, standardize, toString, toString, writeMetricParameter
-
Constructor Details
-
SDParameters
public SDParameters()Creates an empty object. -
SDParameters
Creates a new object from the given configuration file.- Parameters:
configFile
- XML configuration file- Throws:
MDParametersException
- missing or bad XML configuration
-
SDParameters
Creates a new object from the given configuration string.- Parameters:
XMLconfig
- XML configuration string- Throws:
MDParametersException
- missing or bad XML configuration
-
-
Method Details
-
fromString
Sets parameters from a string representation. This method processes an XML format, but derived classes may overload this and define their own formats.- Overrides:
fromString
in classMDParameters
- Parameters:
parameterString
- parameters in string- Throws:
MDParametersException
- when the parameter string is not well-formed
-
fromFile
Sets parameters from an XML file. Derived classes may overload this and define their own format (other than XML).- Overrides:
fromFile
in classMDParameters
- Parameters:
parameterFile
- initialized parameter file- Throws:
MDParametersException
- failed to process parameter file
-
setLength
Description copied from class:MDParameters
Sets the length (number of cells) of the descriptor.- Overrides:
setLength
in classMDParameters
- Parameters:
length
- the required length (cell count)- Throws:
MDParametersException
- if argument is not positive
-
getNumberOfMetrics
public int getNumberOfMetrics()Gets the total number of parametrized metrics available in the present configuration.- Overrides:
getNumberOfMetrics
in classMDParameters
- Returns:
- number of metrics
-
init
protected void init()This method is called by the constructors before processing the XML configuration. It creates aScalarDescriptor
object stored inMDParameters.md
. -
initParameters
protected void initParameters()Initializes those data members that depend on the XML configuration but are not directly taken from it.- Overrides:
initParameters
in classMDParameters
-
processDocument
Processes parts of the XML configuration specific toScalarDescriptor
. 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
-
getType
-
readValues
Reads attribute values form the XML configuration.- Overrides:
readValues
in classMDParameters
- Parameters:
all
- process the complete document or only theScreeningConfiguration
tag- Throws:
MDParametersException
-