de.unidu.is.pdatalog
Class Relation

java.lang.Object
  extended byde.unidu.is.pdatalog.Relation
Direct Known Subclasses:
EDBComputedRelation, EDBRelation, IDBRelation

public abstract class Relation
extends java.lang.Object

An abstract pDatalog++ relation. This class will be extended by classes for stored relations, computed relations, derived relations etc.

Since:
2003-10-07
Version:
$Revision: 1.7 $, $Date: 2005/03/14 17:33:13 $
Author:
Henrik Nottelmann

Field Summary
protected  int arity
          The arity (number of arguments) of this relation.
protected  RelationBase base
          The corresponding relation base.
protected  java.lang.String name
          The relation name.
 
Constructor Summary
Relation(RelationBase base, java.lang.String name, int arity)
          Constructs a new relation, and automatically adds it to the relation base.
Relation(RelationBase base, java.lang.String name, int arity, boolean create)
          Constructs a new relation, and automatically adds it to the relation base.
Relation(java.lang.String name, int arity)
          Constructs a new relation, without adding it to the relation base.
 
Method Summary
 int getArity()
          Returns the arity of this relation.
 java.lang.String getName()
          Returns the name of this relation.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

base

protected RelationBase base
The corresponding relation base.


name

protected java.lang.String name
The relation name.


arity

protected int arity
The arity (number of arguments) of this relation.

Constructor Detail

Relation

public Relation(java.lang.String name,
                int arity)
Constructs a new relation, without adding it to the relation base.

Parameters:
name - relatio n name
arity - arity of the relation

Relation

public Relation(RelationBase base,
                java.lang.String name,
                int arity)
Constructs a new relation, and automatically adds it to the relation base.

Parameters:
base - corresponding relation base
name - relatio n name
arity - arity of the relation

Relation

public Relation(RelationBase base,
                java.lang.String name,
                int arity,
                boolean create)
Constructs a new relation, and automatically adds it to the relation base.

Parameters:
base - corresponding relation base
name - relatio n name
arity - arity of the relation @ param create if true, the relation is physically created @ status finished 2003-12-08
Method Detail

getName

public java.lang.String getName()
Returns the name of this relation.

Returns:
name of this relation

getArity

public int getArity()
Returns the arity of this relation.

Returns:
arity of this relation

toString

public java.lang.String toString()