disciplex.eventfilter
Class Fact

java.lang.Object
  |
  +--disciplex.eventfilter.Fact

public class Fact
extends java.lang.Object

Fact to be checked against the rules. Updated every time a new command arrives.


Method Summary
 void changeFact(Command cmd)
          Changes the fact that all rules are checked against.
 java.lang.String evaluateElementName(java.lang.String xpath)
          Evaluates a XPath expression.
 java.lang.String evaluateTextNode(java.lang.String xpath)
          Evaluates a XPath expression.
 org.w3c.dom.Node getContextNode()
          Gets the context node of the fact.
 java.lang.String getPriority()
           
 Repository getRepository()
           
 void setContextNode(org.w3c.dom.Node ctxtNode)
          Sets the context node of the fact.
 void setCount(java.lang.String rule)
          Debugging method Will print to command line the number of times a rule has fired.
 void setPriority(java.lang.String priority)
           
 void setRepository(Repository repos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

evaluateElementName

public java.lang.String evaluateElementName(java.lang.String xpath)
Evaluates a XPath expression. Use this when checking an element name.
xpath example: element/section -> returns the name of the section element,that is a child of element. Should be used to check if a element is present.

Parameters:
xpath - XPath expression.
Returns:
result The data pointed to by the XPath.

evaluateTextNode

public java.lang.String evaluateTextNode(java.lang.String xpath)
Evaluates a XPath expression. Use this when the text child of an element.
xpath example: element/text() -> returns the value of the text node,that is a child of element.

Parameters:
xpath - XPath expression.
Returns:
result The data pointed to by the XPath.

changeFact

public void changeFact(Command cmd)
Changes the fact that all rules are checked against. Must be called before rules are run.

Parameters:
cmd - The Command that changes the fact.

setContextNode

public void setContextNode(org.w3c.dom.Node ctxtNode)
Sets the context node of the fact.

Parameters:
ctxtNode - - The new context node.
Rose:
3E27188E0269

getContextNode

public org.w3c.dom.Node getContextNode()
Gets the context node of the fact.

Returns:
- ctxtNode - The context node of the fact.
Rose:
3E27188E0269

setRepository

public void setRepository(Repository repos)

getRepository

public Repository getRepository()

setCount

public void setCount(java.lang.String rule)
Debugging method Will print to command line the number of times a rule has fired.


setPriority

public void setPriority(java.lang.String priority)

getPriority

public java.lang.String getPriority()


Copyright (c) 2003 Rutgers, The State University of New Jersey