prolog.demonstration
Class DemoConstraintStatement

java.lang.Object
  |
  +--prolog.implementation.Fact
        |
        +--prolog.implementation.AbstractStatement
              |
              +--prolog.implementation.ConstraintStatement
                    |
                    +--prolog.demonstration.DemoConstraintStatement
All Implemented Interfaces:
IDemoStatement, IFact, IStatement

public class DemoConstraintStatement
extends ConstraintStatement
implements IDemoStatement


Field Summary
protected  Node thisNode
          the parent of this node in animation tree
protected  Tree tree
          the animation tree
 
Fields inherited from class prolog.implementation.ConstraintStatement
expression
 
Fields inherited from class prolog.implementation.Fact
name, relation
 
Constructor Summary
DemoConstraintStatement(Tree tree, int name)
          constructor
DemoConstraintStatement(Tree tree, int name, IRelation r)
          constructor 2
 
Method Summary
 Node getNode()
           
 IFactList query(IFact f, IFactDb l, IStatementMap constraints)
          querries the most top expression statement
 void resetNode()
          clears the cached node
 java.lang.String toString()
           
 
Methods inherited from class prolog.implementation.ConstraintStatement
genXml, setExpression, toString
 
Methods inherited from class prolog.implementation.AbstractStatement
generateFact, generateRelation
 
Methods inherited from class prolog.implementation.Fact
addAttribute, getName, getRelation
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 
Methods inherited from interface prolog.model.IFact
getName, getRelation
 

Field Detail

tree

protected Tree tree
the animation tree

thisNode

protected Node thisNode
the parent of this node in animation tree
Constructor Detail

DemoConstraintStatement

public DemoConstraintStatement(Tree tree,
                               int name)
constructor

DemoConstraintStatement

public DemoConstraintStatement(Tree tree,
                               int name,
                               IRelation r)
constructor 2
Method Detail

query

public IFactList query(IFact f,
                       IFactDb l,
                       IStatementMap constraints)
                throws ParameterMatchingError
querries the most top expression statement
Overrides:
query in class ConstraintStatement
Parameters:
f - - the fact to search for
l - - the fact database
constraints - - the statements to resolve unfound facts
Returns:
all relations matching the given fact
Throws:
ParameterMatchingError -  

getNode

public Node getNode()
Specified by:
getNode in interface IDemoStatement
Returns:
the node in the demo tree

resetNode

public void resetNode()
clears the cached node
Specified by:
resetNode in interface IDemoStatement

toString

public java.lang.String toString()
Overrides:
toString in class ConstraintStatement
Following copied from class: prolog.implementation.ConstraintStatement
Returns:
a string representation of this class