Class DescriptorValue

  • All Implemented Interfaces:
    Serializable

    public class DescriptorValue
    extends Object
    implements Serializable
    Class that is used to store descriptor values as IChemObject properties.
    See Also:
    Serialized Form
    Source code:
    main
    Belongs to CDK module:
    standard
    • Constructor Detail

      • DescriptorValue

        public DescriptorValue​(DescriptorSpecification specification,
                               String[] parameterNames,
                               Object[] parameterSettings,
                               IDescriptorResult value,
                               String[] descriptorNames)
        Construct 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 descriptors
        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)
        Construct 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 descriptors
        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 occurred during descriptor calculation
    • Method Detail

      • getParameters

        public Object[] getParameters()
      • getParameterNames

        public String[] getParameterNames()
      • getException

        public Exception getException()
      • getNames

        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 X0, X1, ..., XN where X is a prefix and 0, 1, ..., 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 descriptor (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.