|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RelationClass
Schema class for relations.
Method Summary | |
---|---|
RelationEndClass |
declareRelationEndClass(java.lang.String name,
GraphEntityClass target,
Cardinality card,
RelationEndDirection direction)
Adds a relation end to the relation class. |
java.util.Collection<? extends RelationEndClass> |
getRelationEndClasses()
Returns a collection with all relation ends of the relation class. |
void |
undeclareRelationEndClass(RelationEndClass rec)
Undeclares a relation end previously declared for the relation class. |
Methods inherited from interface i3.dragos.gm.core.schema.GraphEntityClass |
---|
addSubClass, declareAttribute, equals, getAllDeclaredAttributes, getAllSubClasses, getAllSuperClasses, getAttribute, getDataSourceURL, getDeclaredAttributes, getDirectSubClasses, getDirectSuperClasses, getInternalIdentifier, getName, getWrappedGraphEntityClass, hasAttribute, hashCode, isAbstract, isSubClassOf, isSuperClassOf, removeSubClass, undeclareAllAttributes, undeclareAttribute, undeclareAttribute |
Methods inherited from interface i3.dragos.gm.core.schema.MetaAttributable |
---|
getAllMetaAttributes, getMetaAttribute, isMetaAttributeKeyReserved, isMetaAttributeSet, setMetaAttribute, unsetMetaAttribute |
Methods inherited from interface i3.dragos.gm.core.schema.ExistenceCheckable |
---|
checkExistence, checkExistenceOptional |
Method Detail |
---|
RelationEndClass declareRelationEndClass(java.lang.String name, GraphEntityClass target, Cardinality card, RelationEndDirection direction) throws EntityNotFoundException, DragosException, EntityAlreadyExistsException
name
- The name of the relation end.target
- The target of the relation end.card
- The cardinality allowed for the target.direction
- The direction of the relation end.
EntityNotFoundException
- if the graph element class does not exist.
EntityAlreadyExistsException
- if a schema entity with the same
name has already been declared.
DragosException
- if something else went wrong.void undeclareRelationEndClass(RelationEndClass rec) throws EntityNotFoundException, DragosException
It simply performs an additional check whether the RelationEndClass to
undeclare really belongs to this RelationClass, throwing an EntityNotFoundException
if not. Afterwards, it follows the same procedure as
Schema.undeclareGraphEntityClass(GraphEntityClass)
.
This method could/should be implemented roughly as follows:
if (! this.equals(rec.getRelationClass())) { throw new EntityNotFoundException("RelationEndClass " + rec + " does not belong to " + toString()); } getSchema().undeclareGraphEntityClass(rec);
rec
- The RelationEndClass to undeclare.
EntityNotFoundException
- if the RelationEndClass does not exist or does not belong to this RelationClass.
DragosException
- if something else went wrong.Schema.undeclareGraphEntityClass(GraphEntityClass)
java.util.Collection<? extends RelationEndClass> getRelationEndClasses() throws DragosException
RelationEndClass
DragosException
- if something went wrong.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |