prolog.demonstration
Class DemoAndStatement

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

public class DemoAndStatement
extends AndStatement
implements IDemoStatement


Inner classes inherited from class prolog.implementation.AndStatement
AndStatement.CacheMap
 
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.NodeStatement
childs
 
Fields inherited from class prolog.implementation.Fact
name, relation
 
Constructor Summary
DemoAndStatement(Tree tree, IFact f)
          constructor 2
DemoAndStatement(Tree tree, int name)
          constructor 1
 
Method Summary
 Node getNode()
           
 IFactList query(IFact f, IFactDb l, IStatementMap constraints)
          queries the child nodes and calls the recursive findMatching method to merge all results.
 void resetNode()
          clears the cached node
 java.lang.String toString()
           
 
Methods inherited from class prolog.implementation.AndStatement
addMatching, findMatching, toString
 
Methods inherited from class prolog.implementation.NodeStatement
addStatement, genXml
 
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

DemoAndStatement

public DemoAndStatement(Tree tree,
                        int name)
constructor 1

DemoAndStatement

public DemoAndStatement(Tree tree,
                        IFact f)
constructor 2
Method Detail

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 AndStatement
Returns:
a string representation of this item

query

public IFactList query(IFact f,
                       IFactDb l,
                       IStatementMap constraints)
                throws ParameterMatchingError
queries the child nodes and calls the recursive findMatching method to merge all results.
Overrides:
query in class AndStatement
Parameters:
f - - the target format
l - - the fact database
constraints - - the statements to resolve when not found in fdb
Returns:
a result factlist with all matching results in the format described in the f parameter fact
Throws:
ParameterMatchingError -