net.sf.bddbddb
Class RuleTerm
java.lang.Object
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
relation
protected Relation relation
- Relation for this rule term.
variables
protected java.util.List variables
- List of variables in this rule term.
RuleTerm
public RuleTerm(Relation relation,
java.util.List variables)
- Create a new RuleTerm with the given relation and list of variables.
- Parameters:
relation
- variables
-
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.