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 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

      void setComment(String comment)
      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 if null
    • getNameSpace

      String getNameSpace()
      Returns the namespace introduced by this model element.
      Returns:
      the namespace introduced by this model element.
    • accept

      void accept(IModelVisitor visitor)
      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

      boolean propagateAttribute(Attribute attribute)
      Propagates an attribute application from the parent to this element or contained elements. This may imply the creation of clones of the given attribute.
      Parameters:
      attribute - the attribute to be propagated
      Returns:
      true if the operation was successful, false if 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:
      true if it is transparent, false else
    • getParent

      IModelElement getParent()
      Returns the parent model element.
      Returns:
      the parent model element (may be null)