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
ConstructorsConstructorDescriptionCreates 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 TypeMethodDescriptionvoidSets parameters from an XML file.voidfromString(String parameterString) Sets parameters from a string representation.intGets the total number of parametrized metrics available in the present configuration.getType()protected voidinit()This method is called by the constructors before processing the XML configuration.protected voidInitializes those data members that depend on the XML configuration but are not directly taken from it.protected voidprocessDocument(boolean all) Processes parts of the XML configuration specific toScalarDescriptor.protected voidreadValues(boolean all) Reads attribute values form the XML configuration.voidsetLength(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:
fromStringin 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:
fromFilein classMDParameters- Parameters:
parameterFile- initialized parameter file- Throws:
MDParametersException- failed to process parameter file
-
setLength
Description copied from class:MDParametersSets the length (number of cells) of the descriptor.- Overrides:
setLengthin 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:
getNumberOfMetricsin classMDParameters- Returns:
- number of metrics
-
init
protected void init()This method is called by the constructors before processing the XML configuration. It creates aScalarDescriptorobject 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:
initParametersin 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:
processDocumentin 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:
readValuesin classMDParameters- Parameters:
all- process the complete document or only theScreeningConfigurationtag- Throws:
MDParametersException
-