fuzzydl

## Class Query

- java.lang.Object
- - fuzzydl.Query

- Direct Known Subclasses:
    AllInstancesQuery, BnpQuery, DefuzzifyQuery, InstanceQuery, KbSatisfiableQuery, MaxQuery, MinQuery, RelatedQuery, SatisfiableQuery, SubsumptionQuery

      public abstract class Query
      extends java.lang.Object

  Query.
  Author:
    Fernando Bobillo

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Query()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getTotalTime()` Gets the total reasoning time in seconds.
    `abstract void` | `preprocess(KnowledgeBase kb)` Performs some preprocessing steps of the query over a fuzzy KB.
    `void` | `setInitialTime()` Checks time just before the reasoning.
    `void` | `setTotalTime()` Checks time just after the reasoning.
    `abstract Solution` | `solve(KnowledgeBase kb)` Solves the query over a fuzzy KB.
    `abstract java.lang.String` | `toString()` Gets the name of the query.

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

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

- - ### Constructor Detail

    - #### Query

          public Query()

  - ### Method Detail

    - #### setInitialTime

          public void setInitialTime()

      Checks time just before the reasoning.

    - #### setTotalTime

          public void setTotalTime()

      Checks time just after the reasoning.

    - #### getTotalTime

          public double getTotalTime()

      Gets the total reasoning time in seconds.
      Returns:
        Total reasoning time in seconds.

    - #### preprocess

          public abstract void preprocess(KnowledgeBase kb)
                                   throws FuzzyOntologyException,
                                          InconsistentOntologyException

      Performs some preprocessing steps of the query over a fuzzy KB.
      Parameters:
        `kb` - A fuzzy KB.
      Throws:
        `FuzzyOntologyException` - fuzzy ontology exception.
        `InconsistentOntologyException` - Inconsistent ontology.

    - #### solve

          public abstract Solution solve(KnowledgeBase kb)
                                  throws FuzzyOntologyException

      Solves the query over a fuzzy KB.
      Parameters:
        `kb` - A fuzzy KB.
      Returns:
        An optimal solution to the query.
      Throws:
        `FuzzyOntologyException` - fuzzy ontology exception.

    - #### toString

          public abstract java.lang.String toString()

      Gets the name of the query.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        Name of the query.