org.andromda.core.cartridge.template
Class ModelElements

java.lang.Object
  extended by org.andromda.core.cartridge.template.ModelElements

public class ModelElements
extends java.lang.Object

Defines the <modelElements/> element within a <template/> within an XML cartridge descriptor. This allows the grouping of model elements by criteria defined within the nested ModelElementinstances.

Author:
Chad Brandon
See Also:
Template, ModelElement

Constructor Summary
ModelElements()
           
 
Method Summary
 void addModelElement(ModelElement modelElement)
          Adds a modelElement to the collection of modelElements.
 java.util.Set getAllMetafacades()
          Gets all metafacade instances from each ModelElement belonging to this ModelElements instance.
 java.util.Collection getModelElements()
          Returns all model elements belonging to this model elements instance.
 java.lang.String getVariable()
          The variable name to make the model element available to the template engine.
 boolean isEmpty()
          Returns true if this instance has no modelElements stored within it.
 void setVariable(java.lang.String variable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelElements

public ModelElements()
Method Detail

getVariable

public java.lang.String getVariable()
The variable name to make the model element available to the template engine. For example if you have the modelElement <<entity>> defined within your <<modelElements>> element you may want to define this value as entity. If on the other hand the outputToSingleFile flag is set to true you'd probably want to make it available as entities.

Returns:
Returns the variable.

setVariable

public void setVariable(java.lang.String variable)
Parameters:
variable - The variable to set.

addModelElement

public void addModelElement(ModelElement modelElement)
Adds a modelElement to the collection of modelElements.

Parameters:
modelElement - the new ModelElement to add.

getAllMetafacades

public java.util.Set getAllMetafacades()
Gets all metafacade instances from each ModelElement belonging to this ModelElements instance.

Returns:
Collection of all metafacades.

getModelElements

public java.util.Collection getModelElements()
Returns all model elements belonging to this model elements instance.

Returns:
Collection of all ModelElementinstances.

isEmpty

public boolean isEmpty()
Returns true if this instance has no modelElements stored within it.

Returns:
true/false


Copyright © 2003-2008 AndroMDA.org. All Rights Reserved.