org.openscience.cdk.qsar
Class DescriptorValue

java.lang.Object
  extended by org.openscience.cdk.qsar.DescriptorValue
All Implemented Interfaces:
Serializable

@TestClass(value="org.openscience.cdk.qsar.DescriptorValueTest")
public class DescriptorValue
extends Object
implements Serializable

Class that is used to store descriptor values as IChemObject properties.

See Also:
Serialized Form
Belongs to CDK module:
standard
Source code:
cdk-1.4.x

Constructor Summary
DescriptorValue(DescriptorSpecification specification, String[] parameterNames, Object[] parameterSettings, IDescriptorResult value, String[] descriptorNames)
          Constrct a descriptor value object, representing the numeric values as well as parameters and provenance.
DescriptorValue(DescriptorSpecification specification, String[] parameterNames, Object[] parameterSettings, IDescriptorResult value, String[] descriptorNames, Exception exception)
          Constrct a descriptor value object, representing the numeric values as well as parameters and provenance.
 
Method Summary
 Exception getException()
           
 String[] getNames()
          Returns an array of names for each descriptor value calculated.
 String[] getParameterNames()
           
 Object[] getParameters()
           
 DescriptorSpecification getSpecification()
           
 IDescriptorResult getValue()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptorValue

public DescriptorValue(DescriptorSpecification specification,
                       String[] parameterNames,
                       Object[] parameterSettings,
                       IDescriptorResult value,
                       String[] descriptorNames)
Constrct a descriptor value object, representing the numeric values as well as parameters and provenance. This constructor should be used when there has been no error during the descriptor calculation

Parameters:
specification - The specification
parameterNames - The parameter names for the decriptors
parameterSettings - The parameter settings
value - The actual values
descriptorNames - The names of the values

DescriptorValue

public DescriptorValue(DescriptorSpecification specification,
                       String[] parameterNames,
                       Object[] parameterSettings,
                       IDescriptorResult value,
                       String[] descriptorNames,
                       Exception exception)
Constrct a descriptor value object, representing the numeric values as well as parameters and provenance. This constructor should be used when there has been an error during the descriptor calculation

Parameters:
specification - The specification
parameterNames - The parameter names for the decriptors
parameterSettings - The parameter settings
value - The actual values
descriptorNames - The names of the values
exception - The exception object that should have been caught if an error occured during decriptor calculation
Method Detail

getSpecification

@TestMethod(value="testGetSpecification")
public DescriptorSpecification getSpecification()

getParameters

@TestMethod(value="testGetParameters")
public Object[] getParameters()

getParameterNames

@TestMethod(value="testGetParameterNames")
public String[] getParameterNames()

getValue

@TestMethod(value="testGetValue")
public IDescriptorResult getValue()

getException

@TestMethod(value="testGetException")
public Exception getException()

getNames

@TestMethod(value="testGetNames")
public String[] getNames()
Returns an array of names for each descriptor value calculated.

Many descriptors return multiple values. In general it is useful for the descriptor to indicate the names for each value. When a descriptor creates a DescriptorValue object, it should supply an array of names equal in length to the number of descriptor calculated.

In many cases, these names can be as simple as X1, X2, ..., XN where X is a prefix and 1, 2, ..., N are the indices. On the other hand it is also possible to return other arbitrary names, which should be documented in the Javadocs for the decsriptor (e.g., the CPSA descriptor).

Note that by default if a descriptor returns a single value (such as ALOGPDescriptor the return array will have a single element

In case a descriptor creates a DescriptorValue object with no names, this method will generate a set of names based on the DescriptorSpecification object supplied at instantiation.

Returns:
An array of descriptor names.