org.cumt.model
Class RelationableModelObject
java.lang.Object
org.cumt.model.IdentifiedObject
org.cumt.model.PropertyAwareObject
org.cumt.model.BaseModelNode
org.cumt.model.ModelObject
org.cumt.model.RelationableModelObject
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- BaseAnalysisObject, LifeCycle, Note, PackageObject, Type, Value
public abstract class RelationableModelObject
- extends ModelObject
Base class for objects that can have some kind of relation which other objects
- Author:
- Carlos Descalzi
- See Also:
- Serialized Form
Methods inherited from class org.cumt.model.BaseModelNode |
getAttribute, getAttributeNames, getAttributes, getCreationDate, getDefaultName, getDescription, getName, getParent, isIgnoredOnGeneration, removeAttribute, setAttribute, setAttributes, setDescription, setIgnoredOnGeneration, setName, setParent, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
RelationableModelObject
public RelationableModelObject()
isRelationAllowed
public boolean isRelationAllowed(java.lang.Class<? extends Relation> relationType,
RelationableModelObject target,
boolean isSource)
- Determines if a given relation type can be used to stablish a relation between
this object an other given object
- Parameters:
relationType
- target
-
- Returns:
- true if the relation can be stablished
addRelation
public void addRelation(Relation relation)
containsRelation
public boolean containsRelation(Relation relation)
removeRelation
public void removeRelation(Relation relation)
getRelations
public java.util.Set<Relation> getRelations()
Copyright © 2006 null. All Rights Reserved.