|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.descriptors.MDParameters
chemaxon.descriptors.CDParameters
public class CDParameters
Manages parameters the CustomDescriptor class.
| Field Summary | |
|---|---|
static int |
BINARY_DESCRIPTOR
descriptor type constants |
protected int |
descrType
descriptor type |
static int |
FLOAT_DESCRIPTOR
|
static int |
INTEGER_DESCRIPTOR
|
| Constructor Summary | |
|---|---|
CDParameters()
Creates an empty object. |
|
CDParameters(java.io.File configFile)
Creates a new descriptor configured from the given file. |
|
CDParameters(int type)
Creates an empty object of the given type. |
|
CDParameters(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 HTML document. |
int |
getDescrType()
Gets the type of the descriptor. |
protected int |
getNumberOfWeights(int parametrizedMetricIndex)
Gets the number of weight factors used by the specified metric. |
protected void |
init()
This method is called by the constructors before processing the XML configuration. |
protected void |
initGenerator()
This method is void in this class as custom descriptors are opaque, their internal structure is not known. |
protected void |
initParameters()
Initializes 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 that are specific to CustomDescriptor. |
protected void |
readValues(boolean all)
Picks parameters values from the DOM tree. |
void |
setLength(int length)
Sets the length (number of cells) of the descriptor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int BINARY_DESCRIPTOR
public static final int INTEGER_DESCRIPTOR
public static final int FLOAT_DESCRIPTOR
protected int descrType
| Constructor Detail |
|---|
public CDParameters()
public CDParameters(int type)
public CDParameters(java.io.File configFile)
throws chemaxon.descriptors.MDParametersException
configFile - XML configuration file
chemaxon.descriptors.MDParametersException - missing or bad XML configuration
public CDParameters(java.lang.String XMLconfig)
throws chemaxon.descriptors.MDParametersException
XMLconfig - XML configuration string
chemaxon.descriptors.MDParametersException - missing or bad XML configuration| Method Detail |
|---|
public void fromString(java.lang.String parameterString)
throws chemaxon.descriptors.MDParametersException
fromString in class MDParametersparameterString - parameters in string
chemaxon.descriptors.MDParametersException - when the parameter string is not well-formed
public void fromFile(java.io.File parameterFile)
throws chemaxon.descriptors.MDParametersException
fromFile in class MDParametersparameterFile - initialized parameter file
chemaxon.descriptors.MDParametersException - failed to process parameter file
public void setLength(int length)
throws chemaxon.descriptors.MDParametersException
MDParameters
setLength in class MDParameterslength - the required length (cell count)
chemaxon.descriptors.MDParametersException - if argument is not positive
protected void initGenerator()
throws chemaxon.descriptors.MDParametersException
chemaxon.descriptors.MDParametersExceptionprotected void init()
CustomDescriptor object defined
in MDParameters.md.
Metircs defined by the descirptor class are retrieved through this
object.
protected void initParameters()
initParameters in class MDParameterspublic int getDescrType()
protected int getNumberOfWeights(int parametrizedMetricIndex)
throws java.lang.IllegalArgumentException
getNumberOfWeights in class MDParametersparametrizedMetricIndex - parametrized metric index
java.lang.IllegalArgumentException - if the given parameter is not a
valid metric indexpublic java.lang.String getDefaultDocumentFrame()
getDefaultDocumentFrame in class MDParameters
protected void processDocument(boolean all)
throws chemaxon.descriptors.MDParametersException
CustomDescriptor.
Find the
processDocument in class MDParametersall - indicates if the entire document has to be processed
in which case the existing configuration is overwritten
chemaxon.descriptors.MDParametersException
protected void readValues(boolean all)
throws chemaxon.descriptors.MDParametersException
readValues in class MDParametersall - indicates if the entire document has to be processed
in which case the existing configuration is overwritten
chemaxon.descriptors.MDParametersException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||