chemaxon.descriptors
Class ShapeParameters

java.lang.Object
  extended by chemaxon.descriptors.MDParameters
      extended by chemaxon.descriptors.ShapeParameters

public class ShapeParameters
extends MDParameters

Author:
adrian

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
ShapeParameters()
           
ShapeParameters(java.io.File configFile)
           
ShapeParameters(java.lang.String XMLconfig)
          Creates a new object based on a given configuration string.
 
Method Summary
 void fromFile(java.io.File parameterFile)
          Sets parameters from an XML file.
 void fromString(java.lang.String parameterString)
          Sets parameters from a string representation.
 java.lang.String getDefaultDocumentFrame()
          Get the default XML configuration string.
static java.lang.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()
          Initializes the fingerprint generator.
protected  void processDocument(boolean all)
          Processes pars of the XML configuration specific to Shape.
protected  void readValues(boolean all)
          Picks attribute values from the document tree that are relevant to the actual MDParameters 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShapeParameters

public ShapeParameters()

ShapeParameters

public ShapeParameters(java.io.File configFile)
                throws MDParametersException
Throws:
MDParametersException

ShapeParameters

public ShapeParameters(java.lang.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(java.lang.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 class MDParameters
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
Initializes the fingerprint generator.

Throws:
MDParametersException

fromFile

public void fromFile(java.io.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 class MDParameters
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 a ShapeDescriptor object stored in MDParameters.md.


getDefaultDocumentFrame

public java.lang.String getDefaultDocumentFrame()
Get the default XML configuration string. This is needed when the optional Shape XML configuration is not specified.

Overrides:
getDefaultDocumentFrame in class MDParameters
Returns:
default XML configuration string of the ShapeParameters class

getDefaultStandardizerConfiguration

public static java.lang.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 for Shape includes aromatization.

Returns:
standardizer configuration XML string

processDocument

protected void processDocument(boolean all)
                        throws MDParametersException
Processes pars of the XML configuration specific to Shape. Find the node in the DOM tree and leaves the rest of the work to the parent class.

Overrides:
processDocument in class MDParameters
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 actual MDParameters sub-class.

Overrides:
readValues in class MDParameters
Parameters:
all - process the complete document or only the ScreeningConfiguration tag
Throws:
MDParametersException