|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cumt.model.IdentifiedObject
org.cumt.model.PropertyAwareObject
org.cumt.model.BaseModelNode
org.cumt.model.Model
public class Model
Represents an UML model
| Field Summary |
|---|
| Fields inherited from class org.cumt.model.BaseModelNode |
|---|
ATTRIBUTES, DESCRIPTION, IGNORED_ON_GENERATION, NAME |
| Constructor Summary | |
|---|---|
Model()
|
|
| Method Summary | ||
|---|---|---|
void |
add(BaseModelNode node)
Adds a new node |
|
void |
addContainerListener(ContainerListener listener)
|
|
void |
addStereotype(Stereotype stereotype)
|
|
void |
addStereotypes(java.util.List<Stereotype> added)
|
|
void |
deleteVariable(java.lang.String name)
|
|
java.util.Set<Stereotype> |
findStereotypesForType(java.lang.Class<? extends BaseModelNode> type)
|
|
java.util.List<BaseModelNode> |
getContents()
Returns all the children |
|
static Model |
getModelFrom(BaseModelNode node)
Convenience method used to search for the model from any child node |
|
java.util.Set<Stereotype> |
getStereotypes()
|
|
java.lang.String |
getVariable(java.lang.String variable)
|
|
java.util.Set<java.lang.String> |
getVariableNames()
|
|
java.util.Map<java.lang.String,java.lang.String> |
getVariables()
|
|
void |
remove(BaseModelNode node)
Removes a node |
|
void |
removeContainerListener(ContainerListener listener)
|
|
void |
removeStereotypes(java.util.List<Stereotype> removed)
|
|
|
search(java.lang.Class<T> type)
Search for any object of a given type, including subclases of that type |
|
|
search(java.lang.Class<T> type,
java.lang.String name)
FIXME Include wildcards in name pattern Search for any object of a given type, including subclases of that type, and a given name |
|
static
|
search(java.lang.Class<T> type,
java.lang.String name,
Container<BaseModelNode> container)
Searches for objects of a given type and name in a container |
|
void |
setVariable(java.lang.String variable,
java.lang.String value)
|
|
void |
setVariables(java.util.Map<java.lang.String,java.lang.String> newModelVariables)
|
|
| Methods inherited from class org.cumt.model.BaseModelNode |
|---|
clone, 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 |
|---|
public Model()
| Method Detail |
|---|
public java.util.Set<Stereotype> getStereotypes()
public java.util.Set<Stereotype> findStereotypesForType(java.lang.Class<? extends BaseModelNode> type)
public void addStereotype(Stereotype stereotype)
public void addStereotypes(java.util.List<Stereotype> added)
public void removeStereotypes(java.util.List<Stereotype> removed)
public void add(BaseModelNode node)
Container
add in interface Container<BaseModelNode>public void remove(BaseModelNode node)
Container
remove in interface Container<BaseModelNode>public java.util.List<BaseModelNode> getContents()
Container
getContents in interface Container<BaseModelNode>public void addContainerListener(ContainerListener listener)
addContainerListener in interface Container<BaseModelNode>public void removeContainerListener(ContainerListener listener)
removeContainerListener in interface Container<BaseModelNode>public static Model getModelFrom(BaseModelNode node)
node - the child node where to start to look for. It has to be directly or
indirectly inside the model
public <T extends ModelObject> java.util.List<T> search(java.lang.Class<T> type)
type - the object type
public <T extends BaseModelNode> java.util.List<T> search(java.lang.Class<T> type,
java.lang.String name)
type - the object typename - the name to look for
public static <T extends BaseModelNode> java.util.List<T> search(java.lang.Class<T> type,
java.lang.String name,
Container<BaseModelNode> container)
type - the type to look for, includes subclassesname - the name to look forcontainer - the container where to look for
public java.util.Map<java.lang.String,java.lang.String> getVariables()
public void setVariable(java.lang.String variable,
java.lang.String value)
public java.lang.String getVariable(java.lang.String variable)
public java.util.Set<java.lang.String> getVariableNames()
public void deleteVariable(java.lang.String name)
public void setVariables(java.util.Map<java.lang.String,java.lang.String> newModelVariables)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||