net.sf.bddbddb
Class RuleTerm

java.lang.Object
  extended by net.sf.bddbddb.RuleTerm

public class RuleTerm
extends java.lang.Object

A term in a Datalog rule.

Version:
$Id: RuleTerm.java 549 2005-05-17 10:17:33Z joewhaley $
Author:
jwhaley

Field Summary
protected  Relation relation
          Relation for this rule term.
protected  java.util.List variables
          List of variables in this rule term.
 
Constructor Summary
RuleTerm(Relation relation, java.util.List variables)
          Create a new RuleTerm with the given relation and list of variables.
 
Method Summary
static RuleTerm fromXMLElement(org.jdom.Element e, Solver s, java.util.Map nameToVar)
           
 Attribute getAttribute(Variable v)
           
 Relation getRelation()
           
 Variable getVariable(int i)
           
 int getVariableIndex(Variable v)
           
 java.util.List getVariables()
           
 int numberOfVariables()
           
 java.lang.String toString()
           
 org.jdom.Element toXMLElement()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

relation

protected Relation relation
Relation for this rule term.


variables

protected java.util.List variables
List of variables in this rule term.

Constructor Detail

RuleTerm

public RuleTerm(Relation relation,
                java.util.List variables)
Create a new RuleTerm with the given relation and list of variables.

Parameters:
relation -
variables -
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getRelation

public Relation getRelation()
Returns:
Returns the relation.

getVariables

public java.util.List getVariables()
Returns:
Returns the variables.

numberOfVariables

public int numberOfVariables()
Returns:
number of variables in this rule term

getVariable

public Variable getVariable(int i)
Parameters:
i - index
Returns:
variable at the given index

getVariableIndex

public int getVariableIndex(Variable v)
Parameters:
v - variable
Returns:
index of the given variable

getAttribute

public Attribute getAttribute(Variable v)
Parameters:
v - variable
Returns:
attribute of the given variable

fromXMLElement

public static RuleTerm fromXMLElement(org.jdom.Element e,
                                      Solver s,
                                      java.util.Map nameToVar)

toXMLElement

public org.jdom.Element toXMLElement()


Copyright © 2004-2008 Stanford SUIF Compiler Group. All Rights Reserved.