## sdlip.helpers
Class QueryUtil

    java.lang.Object
      |
      +--sdlip.helpers.QueryUtil

public class QueryUtil
extends java.lang.Object

This class provides functions to manipulate boolean queries in DAV/DASL format.

Constructor Summary
`QueryUtil()`

Method Summary
`static org.w3c.dom.Element` `canonicalDNF(org.w3c.dom.Element q)` Translates boolean query into disjunctive normal form whereas every path from root to leaf or negated leaf is or length 2.
`static org.w3c.dom.Element` `DNF(org.w3c.dom.Element q)` Translates boolean query into disjunctive normal form
`static boolean` `equals(org.w3c.dom.Node a, org.w3c.dom.Node b)` Checks whether two elements are syntactically equivalent.
`static org.w3c.dom.Element` `inside(org.w3c.dom.Element q)` returns the single child of an element
`static boolean` `isAND(org.w3c.dom.Element q)` tests whether elements is an AND operator
`static boolean` `isBoolean(org.w3c.dom.Element q)` tests whether elements is a boolean operator
`static boolean` `isFalse(org.w3c.dom.Element q)` tests whether query evaluates to false
`static boolean` `isNOT(org.w3c.dom.Element q)` tests whether elements is an NOT operator
`static boolean` `isOR(org.w3c.dom.Element q)` tests whether elements is an OR operator
`static boolean` `isTrue(org.w3c.dom.Element q)` tests whether query evaluates to true
`static void` `main(java.lang.String[] args)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### QueryUtil

    public QueryUtil()

Method Detail

### isAND

    public static boolean isAND(org.w3c.dom.Element q)

  tests whether elements is an AND operator

### isOR

    public static boolean isOR(org.w3c.dom.Element q)

  tests whether elements is an OR operator

### isNOT

    public static boolean isNOT(org.w3c.dom.Element q)

  tests whether elements is an NOT operator

### isBoolean

    public static boolean isBoolean(org.w3c.dom.Element q)

  tests whether elements is a boolean operator

### isTrue

    public static boolean isTrue(org.w3c.dom.Element q)

  tests whether query evaluates to true

### isFalse

    public static boolean isFalse(org.w3c.dom.Element q)

  tests whether query evaluates to false

### DNF

    public static org.w3c.dom.Element DNF(org.w3c.dom.Element q)

  Translates boolean query into disjunctive normal form

### canonicalDNF

    public static org.w3c.dom.Element canonicalDNF(org.w3c.dom.Element q)

  Translates boolean query into disjunctive normal form whereas every path from root to leaf or negated leaf is or length 2.

### equals

    public static boolean equals(org.w3c.dom.Node a,
                                 org.w3c.dom.Node b)

  Checks whether two elements are syntactically equivalent. Assumption: there is no whitespace in XML tree, guaranteed by using sdlip.xml.dom.DOMParser (or XMLObject)

### inside

    public static org.w3c.dom.Element inside(org.w3c.dom.Element q)

  returns the single child of an element

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

    `java.lang.Exception`