be.ac.vub.cocompose.lang.impl.core
Class DefaultRole

java.lang.Object
  extended bybe.ac.vub.cocompose.lang.impl.DefaultElement
      extended bybe.ac.vub.cocompose.lang.impl.core.DefaultModelElement
          extended bybe.ac.vub.cocompose.lang.impl.core.DefaultNamespace
              extended bybe.ac.vub.cocompose.lang.impl.core.DefaultRelationElement
                  extended bybe.ac.vub.cocompose.lang.impl.core.DefaultRefinedElement
                      extended bybe.ac.vub.cocompose.lang.impl.core.DefaultRole
All Implemented Interfaces:
Cloneable, Element, ModelElement, Namespace, RefinedElement, RelationElement, Role, VisitedElement
Direct Known Subclasses:
EclipseRole

public class DefaultRole
extends DefaultRefinedElement
implements Role

The Solution Role language element.

Since:
0.2.0
Version:
0.2.0, 07/01/2004
Author:
Dennis Wagelaar

Constructor Summary
DefaultRole()
          Creates a DefaultRole.
 
Method Summary
 void accept(ModelVisitor modelVisitor)
          Accepts a visitor.
 void addPart(Concept concept)
          Adds a concept to the role part.
 void addPart(int index, Concept concept)
          Adds a concept to the role part.
 Multiplicity getMultiplicity()
          Returns the multiplicity constraint for this solution role.
 List getParts()
          Returns the concepts that belong to this role part.
 void removePart(Concept concept)
          Removes a concept from the role part.
 void setMultiplicity(Multiplicity multiplicity)
          Sets the multiplicity constraint for this solution role.
 
Methods inherited from class be.ac.vub.cocompose.lang.impl.core.DefaultRefinedElement
addInheritsFrom, addInheritsFrom, addOwnedElement, addSuperimposesOn, addSuperimposesOn, getDefaultElementOf, getIconUri, getInheritsFrom, getRefinements, getSuperimposesOn, removeInheritsFrom, removeOwnedElement, removeSuperimposesOn, setDefaultElementOf, setIconUri
 
Methods inherited from class be.ac.vub.cocompose.lang.impl.core.DefaultRelationElement
addRelationship, addRelationship, fireBackgroundColorUpdate, getBackgroundColor, getDefaultBackgroundColor, getPosition, getRelationships, getSourceRelationships, getTargetRelationships, removeRelationship, setBackgroundColor, setPosition
 
Methods inherited from class be.ac.vub.cocompose.lang.impl.core.DefaultNamespace
addOwnedElement, getDeepOwnedElement, getDeepOwnedElements, getOwnedElement, getOwnedElementId, getOwnedElements, getOwnedElements, getOwnedIds, isRegistered, registerNameChange, translateIndex, translateIndex
 
Methods inherited from class be.ac.vub.cocompose.lang.impl.core.DefaultModelElement
getId, getModel, getName, getNamespace, getRootNamespace, setId, setName, setNamespace, toString
 
Methods inherited from class be.ac.vub.cocompose.lang.impl.DefaultElement
addPropertyChangeListener, firePropertyChange, fireStructureChange, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface be.ac.vub.cocompose.lang.core.RefinedElement
addInheritsFrom, addInheritsFrom, addSuperimposesOn, addSuperimposesOn, getDefaultElementOf, getIconUri, getInheritsFrom, getRefinements, getSuperimposesOn, removeInheritsFrom, removeSuperimposesOn, setDefaultElementOf, setIconUri
 
Methods inherited from interface be.ac.vub.cocompose.lang.core.RelationElement
addRelationship, addRelationship, getBackgroundColor, getPosition, getRelationships, getSourceRelationships, getTargetRelationships, removeRelationship, setBackgroundColor, setPosition
 
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
 

Constructor Detail

DefaultRole

public DefaultRole()
Creates a DefaultRole.

Method Detail

accept

public void accept(ModelVisitor modelVisitor)
            throws ModelElementException
Accepts a visitor.

Specified by:
accept in interface VisitedElement
Overrides:
accept in class DefaultRefinedElement
Parameters:
modelVisitor - The visitor to accept.
Throws:
ModelElementException

addPart

public void addPart(Concept concept)
Adds a concept to the role part.

Specified by:
addPart in interface Role
Parameters:
concept - - the concept to add.

addPart

public void addPart(int index,
                    Concept concept)
Adds a concept to the role part.

Specified by:
addPart in interface Role
Parameters:
index - the index at which to add the element.
concept - - the concept to add.

removePart

public void removePart(Concept concept)
Removes a concept from the role part.

Specified by:
removePart in interface Role
Parameters:
concept - - the concept to remove.

getParts

public List getParts()
Returns the concepts that belong to this role part.

Specified by:
getParts in interface Role
Returns:
the list of concepts.

getMultiplicity

public Multiplicity getMultiplicity()
Returns the multiplicity constraint for this solution role.

Specified by:
getMultiplicity in interface Role
Returns:
the multiplicity constraint.

setMultiplicity

public void setMultiplicity(Multiplicity multiplicity)
Sets the multiplicity constraint for this solution role.

Specified by:
setMultiplicity in interface Role
Parameters:
multiplicity - the multiplicity constraint.