org.licas.data

## Class DataQueryModel

- java.lang.Object
- - org.licas.data.DataQueryModel

- Direct Known Subclasses:
    ComparisonQueryModel

      public class DataQueryModel
      extends java.lang.Object

  Query object for defining what an evaluator should evaluate. This version stores a method description and an object to evaluate. Typically, the parent service is invoked with the method details using Reflection and the data object as the target.
  Author:
    Kieran Greer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.ai_heuristic.eval.metric.MetricDataset` | `dataSet` Dataset or object to evaluate
    `protected java.lang.String` | `dataType` The data type
    `protected java.lang.String` | `functionClass` Comparison evaluator class name, so that it can be created
    `protected java.util.LinkedHashMap<java.lang.String,java.lang.Object>` | `params` Any other parameters as key-value pairs.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataQueryModel()` Create a new instance of DataQueryModel

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Return a deep clone this object.
    `org.ai_heuristic.functs.Function` | `distanceFunction()` Create the math comparison object from the stored class name.
    `org.ai_heuristic.eval.metric.MetricDataset` | `getDataset()` Get the dataset object.
    `java.lang.String` | `getDataType()` Get the data type for the data object to be evaluated.
    `java.lang.String` | `getFunctionClass()` Get the class name of the math evaluator.
    `java.util.LinkedHashMap<java.lang.String,java.lang.Object>` | `getParams()` Get the additional parameters list.
    `static boolean` | `isDataQuery(java.lang.Object dataObj)` Return true if the data object is an instance of a known data query type.
    `void` | `setDataset(org.ai_heuristic.eval.metric.MetricDataset thisDataSet)` Set the dataset object.
    `void` | `setDataType(java.lang.String thisDataType)` Set the data type.
    `void` | `setFunctionClass(java.lang.String functionClassname)` Set the class name of the evaluator.
    `void` | `setParams(java.util.LinkedHashMap<java.lang.String,java.lang.Object> theParams)` Set the additional parameters list.

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### dataType

          protected java.lang.String dataType

      The data type

    - #### dataSet

          protected org.ai_heuristic.eval.metric.MetricDataset dataSet

      Dataset or object to evaluate

    - #### functionClass

          protected java.lang.String functionClass

      Comparison evaluator class name, so that it can be created

    - #### params

          protected java.util.LinkedHashMap<java.lang.String,java.lang.Object> params

      Any other parameters as key-value pairs. The ordering is maintained.

  - ### Constructor Detail

    - #### DataQueryModel

          public DataQueryModel()

      Create a new instance of DataQueryModel

  - ### Method Detail

    - #### distanceFunction

          public org.ai_heuristic.functs.Function distanceFunction()
                                                            throws java.lang.Exception

      Create the math comparison object from the stored class name.
      Returns:
        the math comparison object, created using `LoadObject`, with an empty constructor.
      Throws:
        `java.lang.Exception` - any error.

    - #### setFunctionClass

          public void setFunctionClass(java.lang.String functionClassname)

      Set the class name of the evaluator. For a distance query, the function should implement the `FunctionMetricDef` interface, so that its method list is known.
      Parameters:
        `functionClassname` - the evaluator class name.

    - #### getFunctionClass

          public java.lang.String getFunctionClass()

      Get the class name of the math evaluator.
      Returns:
        the value of mathCompare.

    - #### setDataType

          public void setDataType(java.lang.String thisDataType)

      Set the data type.
      Parameters:
        `thisDataType` - the data type.

    - #### getDataType

          public java.lang.String getDataType()

      Get the data type for the data object to be evaluated.
      Returns:
        the value of dataType.

    - #### setDataset

          public void setDataset(org.ai_heuristic.eval.metric.MetricDataset thisDataSet)

      Set the dataset object.
      Parameters:
        `thisDataSet` - the dataset object.

    - #### getDataset

          public org.ai_heuristic.eval.metric.MetricDataset getDataset()

      Get the dataset object.
      Returns:
        the value of dataSet.

    - #### setParams

          public void setParams(java.util.LinkedHashMap<java.lang.String,java.lang.Object> theParams)

      Set the additional parameters list.
      Parameters:
        `theParams` - the additional parameters as key-value pairs.

    - #### getParams

          public java.util.LinkedHashMap<java.lang.String,java.lang.Object> getParams()

      Get the additional parameters list.
      Returns:
        the value of params.

    - #### isDataQuery

          public static boolean isDataQuery(java.lang.Object dataObj)

      Return true if the data object is an instance of a known data query type.
      Parameters:
        `dataObj` - the data object.
      Returns:
        true if a `DataQueryModel` or a `ComparisonQueryModel`.

    - #### clone

          public java.lang.Object clone()

      Return a deep clone this object.
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        a copy of this object.