be.ac.vub.cocompose.lang.core
Interface RelationElement

All Superinterfaces:
Cloneable, Element, ModelElement, Namespace, VisitedElement
All Known Subinterfaces:
Concept, RefinedElement, Role
All Known Implementing Classes:
DefaultConcept, DefaultRefinedElement, DefaultRelationElement, DefaultRole

public interface RelationElement
extends Namespace

Interface for all CoCompose language elements that can participate in a relationship.

Since:
0.2.0
Version:
0.2.0, 02/12/2003
Author:
Dennis Wagelaar

Method Summary
 void addRelationship(int index, Relationship relationship)
          Adds a relationship for this element at the specified index.
 void addRelationship(Relationship relationship)
          Adds a relationship for this element.
 Color getBackgroundColor()
          Gets the background color.
 Point getPosition()
          Gets the element position.
 List getRelationships()
          Gets the relationships for this element.
 List getSourceRelationships()
          Gets the source relationships for this element.
 List getTargetRelationships()
          Gets the target relationships for this element.
 void removeRelationship(Relationship relationship)
          Removes a relationship from this element.
 void setBackgroundColor(Color bgcolor)
          Sets the background color.
 void setPosition(Point position)
          Sets the element position.
 
Methods inherited from interface be.ac.vub.cocompose.lang.core.Namespace
addOwnedElement, addOwnedElement, getDeepOwnedElement, getDeepOwnedElements, getOwnedElement, getOwnedElementId, getOwnedElements, getOwnedElements, getOwnedIds, isRegistered, registerNameChange, removeOwnedElement
 
Methods inherited from interface be.ac.vub.cocompose.lang.core.ModelElement
getId, getModel, getName, getNamespace, getRootNamespace, setId, setName, setNamespace
 
Methods inherited from interface be.ac.vub.cocompose.lang.Element
addPropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface be.ac.vub.cocompose.lang.VisitedElement
accept
 

Method Detail

getRelationships

public List getRelationships()
Gets the relationships for this element.

Returns:
the list of relationships.

getSourceRelationships

public List getSourceRelationships()
Gets the source relationships for this element.

Returns:
the list of source relationships.

getTargetRelationships

public List getTargetRelationships()
Gets the target relationships for this element.

Returns:
the list of target relationships.

addRelationship

public void addRelationship(Relationship relationship)
Adds a relationship for this element.

Parameters:
relationship - - the relationship to add.

addRelationship

public void addRelationship(int index,
                            Relationship relationship)
Adds a relationship for this element at the specified index.

Parameters:
index - - the index at which to add the relationship.
relationship - - the relationship to add.

removeRelationship

public void removeRelationship(Relationship relationship)
Removes a relationship from this element.

Parameters:
relationship - - the relationship to remove.

getPosition

public Point getPosition()
Gets the element position.

Returns:
the position.

setPosition

public void setPosition(Point position)
Sets the element position.

Parameters:
position - - the position.

getBackgroundColor

public Color getBackgroundColor()
Gets the background color.

Returns:
the background color.

setBackgroundColor

public void setBackgroundColor(Color bgcolor)
Sets the background color.

Parameters:
bgcolor - - the background color.