org.cumt.model
Class RelationableModelObject

java.lang.Object
  extended by org.cumt.model.IdentifiedObject
      extended by org.cumt.model.PropertyAwareObject
          extended by org.cumt.model.BaseModelNode
              extended by org.cumt.model.ModelObject
                  extended by 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

Field Summary
 
Fields inherited from class org.cumt.model.ModelObject
STEREOTYPE
 
Fields inherited from class org.cumt.model.BaseModelNode
ATTRIBUTES, DESCRIPTION, IGNORED_ON_GENERATION, NAME
 
Constructor Summary
RelationableModelObject()
           
 
Method Summary
 void addRelation(Relation relation)
           
 boolean containsRelation(Relation relation)
           
 java.util.Set<Relation> getRelations()
           
 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
 void removeRelation(Relation relation)
           
 
Methods inherited from class org.cumt.model.ModelObject
clone, getStereotype, setStereotype
 
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 org.cumt.model.PropertyAwareObject
addPropertyChangeListener, firePropertyChange, removePropertyChangeListener
 
Methods inherited from class org.cumt.model.IdentifiedObject
equals, getId, hashCode
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RelationableModelObject

public RelationableModelObject()
Method Detail

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.