|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--theseus.api.Relation
Relations consist of a name, attribute list, and a set of tuples.
| Constructor Summary | |
Relation(java.lang.String a_name)
Create relation with only a name (no attribute list). |
|
Relation(java.lang.String a_name,
theseus.api.AttrList a_attrList)
Create relation using predefined attribute list. |
|
Relation(java.lang.String a_name,
theseus.api.AttrList a_attrList,
theseus.api.TupleSet a_tset)
Create relation with name, attribute list, and tuple set. |
|
Relation(java.lang.String a_name,
java.lang.String a_attrList)
Create relation from string description. |
|
| Method Summary | |
void |
addTuple(theseus.api.Tuple a_row)
Add a tuple to the relation. |
void |
addTupleAndAttr(theseus.api.Tuple a_row)
Add a tuple to the relation, set the attribute list with tuple attributes if Relation attribute list was already null. |
java.lang.Object |
clone()
|
theseus.api.AttrList |
getAttrList()
Get the attribute list of the relation. |
java.lang.String |
getName()
Get the name of the relation. |
theseus.api.TupleSet |
getTupleSet()
Get the set of tuples in the relation. |
static theseus.api.Relation[] |
loadFromFile(java.lang.String a_filename)
Loads relation from an external datafile. |
void |
setAttrList(theseus.api.AttrList attrList)
Set the attribute list for the relation (NOTE: existing tuples are not back-checked for compatibility). |
java.lang.String |
toString()
String form of relation. |
theseus.api.Relation |
union(theseus.api.Relation a_rel)
Union two relations (no duplicates). |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Relation(java.lang.String a_name,
java.lang.String a_attrList)
throws theseus.api.InvalidAttrListException
public Relation(java.lang.String a_name,
theseus.api.AttrList a_attrList)
public Relation(java.lang.String a_name)
public Relation(java.lang.String a_name,
theseus.api.AttrList a_attrList,
theseus.api.TupleSet a_tset)
| Method Detail |
public void addTuple(theseus.api.Tuple a_row)
public void addTupleAndAttr(theseus.api.Tuple a_row)
public java.lang.String getName()
public theseus.api.AttrList getAttrList()
public theseus.api.TupleSet getTupleSet()
public void setAttrList(theseus.api.AttrList attrList)
public java.lang.String toString()
toString in class java.lang.Objectpublic theseus.api.Relation union(theseus.api.Relation a_rel)
public static theseus.api.Relation[] loadFromFile(java.lang.String a_filename)
throws theseus.api.DatafileImportException
RELATION [name]: [attr1-name] [attr1type], ... [tuple1-attr1-value]|[tuple1-attr2-value]|... ... RELATION [name2]... ...Comment lines are those that start with an '#'.
theseus.api.DatafileImportExceptionpublic java.lang.Object clone()
clone in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||