net.sourceforge.nite.search
Class NodeLogical

java.lang.Object
  extended by net.sourceforge.nite.search.SimpleNode
      extended by net.sourceforge.nite.search.NodeLogical
All Implemented Interfaces:
Node

public class NodeLogical
extends SimpleNode

Generated by the JavaCC tool JJTree.


Field Summary
static java.lang.String AND
           
 java.util.Vector dnf
           
 java.util.Vector dnf2
           
 java.util.Vector logicals
           
static java.lang.String OR
           
 
Fields inherited from class net.sourceforge.nite.search.SimpleNode
image
 
Constructor Summary
NodeLogical(int id)
           
NodeLogical(net.sourceforge.nite.search.Parser p, int id)
           
 
Method Summary
 void addAndElement(NodeCondition element)
           
 void addImplicationElement(NodeCondition element)
           
 void addOrElement(NodeCondition element)
           
 java.lang.String dump(java.lang.String prefix)
          Overrides the method in SimpleNode.
 java.lang.String dumpDNFVector(java.util.Vector nf, int level)
           
 java.lang.String dumpDNFVector(java.util.Vector nf, java.lang.String prefix)
          Dump a representation of the disjunctive normal form Vector, which contains information pertaining to the logical joins between conditions.
 void makeDNF()
          Makes disjunctive normal form by applying distributive rules, and DeMorgan's laws via negateDNF().
 void negateDNF()
          Constructs Vectors representing every possible permutation of the negated conditions of the dnf; each is added to the new DNF.
 java.util.List negateDNF(java.util.List dnf)
           
 void negateDNF2()
          Note we do not actually restructure dnf2, but change the logical relationships between conditions which are recorded in the logicals variable.
 
Methods inherited from class net.sourceforge.nite.search.SimpleNode
getChildren, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, toString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dnf

public java.util.Vector dnf

dnf2

public java.util.Vector dnf2

logicals

public java.util.Vector logicals

OR

public static java.lang.String OR

AND

public static java.lang.String AND
Constructor Detail

NodeLogical

public NodeLogical(int id)

NodeLogical

public NodeLogical(net.sourceforge.nite.search.Parser p,
                   int id)
Method Detail

addOrElement

public void addOrElement(NodeCondition element)

addAndElement

public void addAndElement(NodeCondition element)

addImplicationElement

public void addImplicationElement(NodeCondition element)

makeDNF

public void makeDNF()
Makes disjunctive normal form by applying distributive rules, and DeMorgan's laws via negateDNF(). Called once a NodeLogical has been created, by the creating class.


negateDNF

public void negateDNF()
Constructs Vectors representing every possible permutation of the negated conditions of the dnf; each is added to the new DNF. Appears to provide the full disjunctive normal form for this logical node....? Called by NodeCondition.negate() on group conditions only. Also called by NodeLogical.makeDNF() on dnf, for every element of dnf2 but the first.


negateDNF

public java.util.List negateDNF(java.util.List dnf)

negateDNF2

public void negateDNF2()
Note we do not actually restructure dnf2, but change the logical relationships between conditions which are recorded in the logicals variable. This must also be done for the dnf2 of any of the conditions which are also groups of conditions. This method is called only upon groups (from NodeCondition.negate()).


dump

public java.lang.String dump(java.lang.String prefix)
Overrides the method in SimpleNode. Prints the contents of a NodeLogical, including AND/OR operators.

Overrides:
dump in class SimpleNode

dumpDNFVector

public java.lang.String dumpDNFVector(java.util.Vector nf,
                                      java.lang.String prefix)
Dump a representation of the disjunctive normal form Vector, which contains information pertaining to the logical joins between conditions.


dumpDNFVector

public java.lang.String dumpDNFVector(java.util.Vector nf,
                                      int level)