|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.uni_bremen.st.rcf.model.Relation<T>
public class Relation<T extends Entry>
Method Summary | |
---|---|
Attribute |
addAttribute(String name,
AttributeType type,
Relation<? extends Entry> referencedRelation,
boolean isList,
boolean isEnum,
String... enumValues)
Creates a new attribute. |
Attribute |
addEnumAttribute(String name,
AttributeType type,
String... enumValues)
|
Attribute |
addListAttribute(String name,
AttributeType type)
|
Attribute |
addReferenceAttribute(String name,
Relation<? extends Entry> referencedRelation)
|
Attribute |
addReferenceListAttribute(String name,
AttributeType type,
Relation<? extends Entry> referencedRelation)
|
Attribute |
addScalarAttribute(String name,
AttributeType type)
|
T |
append()
Append a new entry to the end of the relation and return it. |
boolean |
equals(Object other)
|
Attribute |
getAttribute(String name)
Get the attribute named like name. |
List<Attribute> |
getAttributes()
Gets a list of the attributes of this relation. |
T |
getEntry(int id)
Get the entry with the specified id |
EntryType |
getEntryType()
Get the entry type all entries of this relation have. |
T |
getFirstEntry()
Get the first entry of the relation. |
String |
getName()
Get the relations name |
RCF |
getRCF()
Get the RCF this Relation belongs to. |
boolean |
hasAttribute(String name)
Check whether an attribute with the given name exists. |
RelationIterator<T> |
iterator()
|
int |
size()
Get the number of entries in the relation. |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public String getName()
public RCF getRCF()
public EntryType getEntryType()
public List<Attribute> getAttributes()
public Attribute addScalarAttribute(String name, AttributeType type)
public Attribute addEnumAttribute(String name, AttributeType type, String... enumValues)
public Attribute addReferenceAttribute(String name, Relation<? extends Entry> referencedRelation)
public Attribute addListAttribute(String name, AttributeType type)
public Attribute addReferenceListAttribute(String name, AttributeType type, Relation<? extends Entry> referencedRelation)
public Attribute addAttribute(String name, AttributeType type, Relation<? extends Entry> referencedRelation, boolean isList, boolean isEnum, String... enumValues)
name
- Name of the Attributetype
- Type of the AttributereferencedRelation
- The relation which entries are referenced by this attribute. This is only relevant if
type is REFERENCE. Pass null otherwise.isList
- If true this attribute will store a list of typeisEnum
- If true the values of this Attribute will be an enumeration of type typeenumValues
- The values for the enum as string representation. For booleans pass "true" or "false".
public Attribute getAttribute(String name)
name
- the name
NoSuchAttributeException
- if no attribute with the given name exists.public boolean hasAttribute(String name)
name
-
public RelationIterator<T> iterator()
iterator
in interface Iterable<T extends Entry>
public T getFirstEntry()
NoSuchElementException
- if the relation is empty.public T append()
public int size()
public boolean equals(Object other)
equals
in class Object
public T getEntry(int id)
id
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |