Package net.ssehub.easy.varModel.model
Interface IModelElement
- All Known Subinterfaces:
IConstraintHolder,IDecisionVariableContainer
- All Known Implementing Classes:
AbstractVariable,Attribute,AttributeAssignment,BasicDecisionVariableContainer,CollectionElementVariable,Comment,Compound,CompoundAccessStatement,ConstantDecisionVariableDeclaration,Constraint,ContainableModelElement,Container,CustomDatatype,DecisionVariableDeclaration,DerivedDatatype,DotAttribute,Enum,EnumLiteral,EvaluationBlock,ExplicitTypeVariableDeclaration,FreezeBlock,FreezeVariableType,FullDecisionVariableContainer,ModelElement,OperationDefinition,OrderedEnum,PartialEvaluationBlock,Project,ProjectDecisionVariableDeclaration,ProjectInterface,Reference,Sequence,Set,StructuredComment,StructuredDatatype
public interface IModelElement
Defines the interface for a model element.
- Author:
- Holger Eichelberger
-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IModelVisitor visitor) Accept method for the visitor.Returns the comment of the model element.getName()Returns the name of the model element.Returns the namespace introduced by this model element.Returns the parent model element.Returns the qualified name of this element.Returns the UniqueName of this model element.booleanReturns whether this element is transparent regarding the naming hierarchy.booleanpropagateAttribute(Attribute attribute) Propagates an attribute application from the parent to this element or contained elements.voidsetComment(String comment) Changes the (possibly internationalized) comment of this model element.
-
Method Details
-
getName
String getName()Returns the name of the model element.- Returns:
- Name of this model element.
-
getComment
String getComment()Returns the comment of the model element.- Returns:
- Comment of this model element.
- See Also:
-
setComment
Changes the (possibly internationalized) comment of this model element. Please note that comments are not stored in the model rather than in additional resource files associated to the model. Use#storeComments(de.uni_hildesheim.sse.model.management.ProjectInfo)for storing comments. Loading of comments is done as part of loading models.- Parameters:
comment- the new comment, turned into an empty string ifnull
-
getNameSpace
String getNameSpace()Returns the namespace introduced by this model element.- Returns:
- the namespace introduced by this model element.
-
accept
Accept method for the visitor.- Parameters:
visitor- The visitor, which should process this model element.
-
getQualifiedName
String getQualifiedName()Returns the qualified name of this element.- Returns:
- the qualified name
-
getUniqueName
String getUniqueName()Returns the UniqueName of this model element.- Returns:
- the unique name of this model element
-
propagateAttribute
Propagates an attribute application from the parent to this element or contained elements. This may imply the creation of clones of the givenattribute.- Parameters:
attribute- the attribute to be propagated- Returns:
trueif the operation was successful,falseif the element is about being attributed multiple times with the same attribute
-
isTransparent
boolean isTransparent()Returns whether this element is transparent regarding the naming hierarchy.- Returns:
trueif it is transparent,falseelse
-
getParent
IModelElement getParent()Returns the parent model element.- Returns:
- the parent model element (may be null)
-