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

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
All Implemented Interfaces:
Cloneable, Element, ModelElement, Namespace, RefinedElement, RelationElement, VisitedElement
Direct Known Subclasses:
DefaultConcept, DefaultRole

public abstract class DefaultRefinedElement
extends DefaultRelationElement
implements RefinedElement

Represents a language element that can have refinements.

Since:
0.2.0
Version:
0.2.9, 26/04/2004
Author:
Dennis Wagelaar

Constructor Summary
DefaultRefinedElement()
           
 
Method Summary
 void accept(ModelVisitor modelVisitor)
          Accepts a visitor.
 void addInheritsFrom(int index, RefinedElement inheritsFrom)
          Adds an inherited element to this concept.
 void addInheritsFrom(RefinedElement inheritsFrom)
          Adds an inherited element to this concept.
 void addOwnedElement(int index, ModelElement modelElement)
          Adds an element to this namespace.
 void addSuperimposesOn(int index, RefinedElement superimposesOn)
          Adds a superimposition element to this concept.
 void addSuperimposesOn(RefinedElement superimposesOn)
          Adds a superimposition element to this concept.
 Model getDefaultElementOf()
          Gets the model of which this element is the default element, if any.
 String getIconUri()
          Gets the icon image URI.
 List getInheritsFrom()
          Gets the inherited elements.
 List getRefinements()
          Returns the refinements for this stereotype.
 List getSuperimposesOn()
          Gets the superimposition elements.
 void removeInheritsFrom(RefinedElement inheritsFrom)
          Removes an inherited element from this concept.
 void removeOwnedElement(ModelElement modelElement)
          Removes a element from this namespace.
 void removeSuperimposesOn(RefinedElement superimposesOn)
          Removes a superimposition element from this concept.
 void setDefaultElementOf(Model model)
          Sets the model of which this element is the default element, if any.
 void setIconUri(String uri)
          Gets the icon image URI.
 
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.RelationElement
addRelationship, addRelationship, getBackgroundColor, getPosition, getRelationships, getSourceRelationships, getTargetRelationships, removeRelationship, setBackgroundColor, setPosition
 
Methods inherited from interface be.ac.vub.cocompose.lang.core.Namespace
addOwnedElement, getDeepOwnedElement, getDeepOwnedElements, getOwnedElement, getOwnedElementId, getOwnedElements, getOwnedElements, getOwnedIds, isRegistered, registerNameChange
 
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

DefaultRefinedElement

public DefaultRefinedElement()
Method Detail

accept

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

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

addOwnedElement

public void addOwnedElement(int index,
                            ModelElement modelElement)
                     throws ModelElementException
Adds an element to this namespace.

Specified by:
addOwnedElement in interface Namespace
Overrides:
addOwnedElement in class DefaultNamespace
Parameters:
index - - the index at which to add the element.
modelElement - - the element to add.
Throws:
ModelElementException - - if the name of the element is already used within this namespace.

removeOwnedElement

public void removeOwnedElement(ModelElement modelElement)
Removes a element from this namespace.

Specified by:
removeOwnedElement in interface Namespace
Overrides:
removeOwnedElement in class DefaultNamespace
Parameters:
modelElement - - the element to remove.

getRefinements

public List getRefinements()
Returns the refinements for this stereotype.

Specified by:
getRefinements in interface RefinedElement
Returns:
a copy of the List of refinements.

getInheritsFrom

public List getInheritsFrom()
Gets the inherited elements.

Specified by:
getInheritsFrom in interface RefinedElement
Returns:
the list of inherited elements.

addInheritsFrom

public void addInheritsFrom(RefinedElement inheritsFrom)
Adds an inherited element to this concept.

Specified by:
addInheritsFrom in interface RefinedElement
Parameters:
inheritsFrom - the inherited element to add.

addInheritsFrom

public void addInheritsFrom(int index,
                            RefinedElement inheritsFrom)
Adds an inherited element to this concept.

Specified by:
addInheritsFrom in interface RefinedElement
Parameters:
index - the index at which to add the element.
inheritsFrom - the inherited element to add.

removeInheritsFrom

public void removeInheritsFrom(RefinedElement inheritsFrom)
Removes an inherited element from this concept.

Specified by:
removeInheritsFrom in interface RefinedElement
Parameters:
inheritsFrom - the inherited element to remove.

getSuperimposesOn

public List getSuperimposesOn()
Gets the superimposition elements.

Specified by:
getSuperimposesOn in interface RefinedElement
Returns:
the list of superimposition elements.

addSuperimposesOn

public void addSuperimposesOn(RefinedElement superimposesOn)
Adds a superimposition element to this concept.

Specified by:
addSuperimposesOn in interface RefinedElement
Parameters:
superimposesOn - the superimposition element to add.

addSuperimposesOn

public void addSuperimposesOn(int index,
                              RefinedElement superimposesOn)
Adds a superimposition element to this concept.

Specified by:
addSuperimposesOn in interface RefinedElement
Parameters:
index - the index at which to add the element.
superimposesOn - the superimposition element to add.

removeSuperimposesOn

public void removeSuperimposesOn(RefinedElement superimposesOn)
Removes a superimposition element from this concept.

Specified by:
removeSuperimposesOn in interface RefinedElement
Parameters:
superimposesOn - the superimposition element to remove.

getIconUri

public String getIconUri()
Gets the icon image URI.

Specified by:
getIconUri in interface RefinedElement
Returns:
the icon URI.

setIconUri

public void setIconUri(String uri)
Gets the icon image URI.

Specified by:
setIconUri in interface RefinedElement
Parameters:
uri - the icon URI.

getDefaultElementOf

public Model getDefaultElementOf()
Gets the model of which this element is the default element, if any.

Specified by:
getDefaultElementOf in interface RefinedElement
Returns:
the model of which this element is the default element, if any.

setDefaultElementOf

public void setDefaultElementOf(Model model)
Sets the model of which this element is the default element, if any.

Specified by:
setDefaultElementOf in interface RefinedElement
Parameters:
model - the model of which this element is the default element, if any.