| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjess.Pattern
public class Pattern
A Pattern represents a single conditional element on a rule LHS. A Pattern consists mainly of a two-dimensional array of Test1 structures. Each Test1 contains information about a specific characteristic of a slot.
Most users will not use this class directly, but you could use it to build rules directly in the Java language.
(C) 2013 Sandia Corporation
| Constructor Summary | |
|---|---|
| Pattern(Deftemplate deft) | |
| Pattern(java.lang.String name,
        Rete engine) | |
| Method Summary | |
|---|---|
|  java.lang.Object | accept(Visitor jv)A proper accept() implementation should call one of the visitXXX() methods on the Visitor. | 
|  void | addDirectlyMatchedVariables(java.util.Set set) | 
|  void | addTest(Test1 aTest)Add a test to this pattern | 
|  void | addToGroup(Group g) | 
|  jess.ConditionalElementX | canonicalize() | 
|  java.lang.Object | clone() | 
|  boolean | equals(java.lang.Object o) | 
|  void | findVariableDefinitions(int startIndex,
                        java.util.Map bindingsSoFar,
                        java.util.Map newBindings) | 
|  java.lang.String | getBackchainingTemplateName() | 
|  boolean | getBackwardChaining() | 
|  java.lang.String | getBoundName() | 
|  ConditionalElement | getConditionalElement(int i) | 
|  jess.ConditionalElementX | getConditionalElementX(int i) | 
|  Deftemplate | getDeftemplate() | 
|  boolean | getExplicit() | 
|  int | getGroupSize() | 
|  boolean | getLogical() | 
|  java.lang.String | getName() | 
|  java.lang.String | getNameWithoutBackchainingPrefix() | 
|  boolean | getNegated()Is this pattern a (not()) CE pattern, possibly nested? | 
|  int | getNMultifieldsInSlot(int slot) | 
|  int | getNSlots() | 
|  int | getNTests() | 
|  int | getNTests(int slot) | 
|  int | getPatternCount() | 
|  int | getSlotLength(int slot) | 
|  java.util.Iterator | getTests() | 
|  java.util.Iterator | getTests(int slot) | 
|  java.util.Iterator | getTests(java.lang.String slotName) | 
|  boolean | isBackwardChainingTrigger() | 
|  boolean | isGroup() | 
|  boolean | isMultifieldSubslot(int slot,
                    int subslot) | 
|  void | recordTestedSlots(java.util.Set testedSlots) | 
|  int | renameUnmentionedVariables(java.util.Set set,
                           java.util.Map substitutes,
                           int seqNum,
                           java.lang.String groupPrefix) | 
|  void | setBoundName(java.lang.String s) | 
|  void | setExplicit() | 
|  void | setLogical() | 
|  void | setNegated() | 
|  void | setSlotLength(java.lang.String slotname,
              int length)Set the length of a multislot within a pattern | 
|  java.lang.String | toString() | 
|  void | transformOrConjunctionsIntoOrFuncalls(int startIndex,
                                      java.util.Map bindings,
                                      Rete engine) | 
| Methods inherited from class java.lang.Object | 
|---|
| finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public Pattern(java.lang.String name,
               Rete engine)
        throws JessException
JessExceptionpublic Pattern(Deftemplate deft)
| Method Detail | 
|---|
public java.lang.Object clone()
clone in class java.lang.Object
public void setSlotLength(java.lang.String slotname,
                          int length)
                   throws JessException
JessException
public void addTest(Test1 aTest)
             throws JessException
JessException
public void addDirectlyMatchedVariables(java.util.Set set)
                                 throws JessException
JessException
public int renameUnmentionedVariables(java.util.Set set,
                                      java.util.Map substitutes,
                                      int seqNum,
                                      java.lang.String groupPrefix)
                               throws JessException
JessException
public void recordTestedSlots(java.util.Set testedSlots)
                       throws JessException
JessException
public void findVariableDefinitions(int startIndex,
                                    java.util.Map bindingsSoFar,
                                    java.util.Map newBindings)
                             throws JessException
JessExceptionpublic boolean getNegated()
public void setNegated()
public void setLogical()
public boolean getLogical()
public void setExplicit()
public boolean getExplicit()
public boolean getBackwardChaining()
public java.lang.String getName()
getName in interface ConditionalElement
public void setBoundName(java.lang.String s)
                  throws JessException
JessExceptionpublic java.lang.String getBoundName()
getBoundName in interface ConditionalElementpublic int getNSlots()
public int getNTests(int slot)
              throws JessException
JessExceptionpublic int getNTests()
public int getSlotLength(int slot)
public int getNMultifieldsInSlot(int slot)
                          throws JessException
JessException
public boolean isMultifieldSubslot(int slot,
                                   int subslot)
                            throws JessException
JessExceptionpublic java.util.Iterator getTests()
public java.util.Iterator getTests(int slot)
                            throws JessException
JessException
public java.util.Iterator getTests(java.lang.String slotName)
                            throws JessException
JessExceptionpublic Deftemplate getDeftemplate()
public void addToGroup(Group g)
                throws JessException
JessExceptionpublic jess.ConditionalElementX canonicalize()
public java.lang.Object accept(Visitor jv)
Visitable
accept in interface Visitablejv - a visitor to invoke
public int getGroupSize()
getGroupSize in interface ConditionalElementpublic boolean isGroup()
isGroup in interface ConditionalElementpublic ConditionalElement getConditionalElement(int i)
getConditionalElement in interface ConditionalElementpublic int getPatternCount()
public jess.ConditionalElementX getConditionalElementX(int i)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic boolean isBackwardChainingTrigger()
public java.lang.String getBackchainingTemplateName()
public java.lang.String getNameWithoutBackchainingPrefix()
public java.lang.String toString()
toString in class java.lang.Object
public void transformOrConjunctionsIntoOrFuncalls(int startIndex,
                                                  java.util.Map bindings,
                                                  Rete engine)
                                           throws JessException
JessException| 
 | © 2013 Sandia Corporation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||