|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Default container and namespace mechanism interface for all CoCompose language elements.
Method Summary | |
void |
addOwnedElement(int index,
ModelElement modelElement)
Adds an element to this namespace. |
void |
addOwnedElement(ModelElement modelElement)
Adds an element to this namespace. |
List |
getDeepOwnedElements(Class elementClass)
Returns the elements of a given class within this namespace and nested namespaces. |
ModelElement |
getOwnedElement(String name)
Retrieves an owned element by its name. |
String |
getOwnedElementId(ModelElement modelElement)
Returns the Id of the given ModelElement or "orphan" if the element is not contained within this namespace. |
List |
getOwnedElements()
Returns the elements within this namespace. |
List |
getOwnedElements(Class elementClass)
Returns the elements of a given class within this namespace. |
boolean |
isRegistered(String name)
Checks whether a name is already registered within this namespace. |
void |
registerNameChange(String oldName,
String newName)
Registers an element name within this namespace. |
void |
removeOwnedElement(ModelElement modelElement)
Removes a element from this namespace. |
Methods inherited from interface be.ac.vub.cocompose.lang.core.ModelElement |
getId, getModel, getName, getNamespace, 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 |
public List getOwnedElements()
public List getOwnedElements(Class elementClass)
elementClass
- the element class.
public List getDeepOwnedElements(Class elementClass)
elementClass
- the element class.
public void addOwnedElement(ModelElement modelElement) throws ModelElementException
modelElement
- - the element to add.
ModelElementException
- - if the name of the element is already used within this namespace.public void addOwnedElement(int index, ModelElement modelElement) throws ModelElementException
index
- - the index at which to add the element.modelElement
- - the element to add.
ModelElementException
- - if the name of the element is already used within this namespace.public void removeOwnedElement(ModelElement modelElement)
modelElement
- - the element to remove.public ModelElement getOwnedElement(String name)
name
- - the name of the element to retrieve.
public boolean isRegistered(String name)
name
- - the name to check.
public void registerNameChange(String oldName, String newName) throws ModelElementException
oldName
- - the name to change.newName
- - the name to change into.
ModelElementException
- - if the new name is already used or if the old name does not exist in this namespace.public String getOwnedElementId(ModelElement modelElement)
modelElement
- - the element to get the Id for.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |