Interface TextualRepresentation
- All Superinterfaces:
AnnotatingElement,BaseElement,Cloneable,Comparable,Element,org.eclipse.emf.ecore.EObject,ModelElement,com.dassault_systemes.modeler.modelextension.model.modelextension.ModelExtensionObject,org.eclipse.emf.common.notify.Notifier
A TextualRepresentation is an AnnotatingElement whose body represents the representedElement in a given language. The representedElement must be the owner of the TextualRepresentation. The named language can be a natural language, in which case the body is an informal representation, or an artificial language, in which case the body is expected to be a formal, machine-parsable representation.
If the named language of a TextualRepresentation is machine-parsable, then the body text should be legal input text as defined for that language. The interpretation of the named language string shall be case insensitive. The following language names are defined to correspond to the given standard languages:
kerml |
Kernel Modeling Language |
ocl |
Object Constraint Language |
alf |
Action Language for fUML |
Other specifications may define specific language strings, other than those shown above, to be used to indicate the use of languages from those specifications in KerML TextualRepresentation.
If the language of a TextualRepresentation is "kerml", then the body text shall be a legal representation of the representedElement in the KerML textual concrete syntax. A conforming tool can use such a TextualRepresentation Annotation to record the original KerML concrete syntax text from which an Element was parsed. In this case, it is a tool responsibility to ensure that the body of the TextualRepresentation remains correct (or the Annotation is removed) if the annotated Element changes other than by re-parsing the body text.
An Element with a TextualRepresentation in a language other than KerML is essentially a semantically "opaque" Element specified in the other language. However, a conforming KerML tool may interpret such an element consistently with the specification of the named language.
-
Method Summary
Modifier and TypeMethodDescriptiongetBody()The textual representation of therepresentedElementin the givenlanguage.The natural or artifical language in which thebodytext is written.TheElementthat is represented by thisTextualRepresentation.voidThe textual representation of therepresentedElementin the givenlanguage.voidsetLanguage(String value) The natural or artifical language in which thebodytext is written.Methods inherited from interface com.dassault_systemes.modeler.kerml.model.kerml.AnnotatingElement
getAnnotatedElement, getAnnotation, getOwnedAnnotatingRelationship, getOwningAnnotatingRelationshipMethods inherited from interface com.nomagic.magicdraw.uml.BaseElement
accept, addPropertyChangeListener, canAdd, canAdd, canAddChild, canBeDeleted, firePropertyChange, getClassType, getHumanName, getHumanType, getID, isEditable, isSelfChangeable, removePropertyChangeListener, setID, sGetIDMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.dassault_systemes.modeler.kerml.model.kerml.Element
effectiveName, effectiveShortName, escapedName, getAliasIds, getDeclaredName, getDeclaredShortName, getDocumentation, getElementId, getName, getOwnedAnnotation, getOwnedElement, getOwnedRelationship, getOwner, getOwningMembership, getOwningNamespace, getOwningRelationship, getQualifiedName, getShortName, getTextualRepresentation, isImpliedIncluded, isLibraryElement, libraryNamespace, path, setDeclaredName, setDeclaredShortName, setElementId, setIsImpliedIncluded, setOwner, setOwningMembership, setOwningRelationshipMethods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnsetMethods inherited from interface com.dassault_systemes.modeler.foundation.model.ModelElement
canChangeElementOwner, dispose, eDynamicGet, getElementOwner, getLocalID, getObjectParent, selfDispose, setLocalID, sGetLocalIDMethods inherited from interface com.dassault_systemes.modeler.modelextension.model.modelextension.ModelExtensionObject
getModelExtension, getModelExtensionMethods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
-
Method Details
-
getLanguage
The natural or artifical language in which the
bodytext is written.- Returns:
- the language value
- Model:
- derived="false" transient="false"
-
setLanguage
The natural or artifical language in which the
bodytext is written.- Parameters:
value- the language value- Model:
- derived="false" transient="false"
-
getRepresentedElement
The
Elementthat is represented by thisTextualRepresentation.- Returns:
- the representedElement value
- Model:
- derived="true"
transient="true"
opposite=
Element.getTextualRepresentation()subsets=Element.getOwner()redefines=AnnotatingElement.getAnnotatedElement()
-
getBody
The textual representation of the
representedElementin the givenlanguage.- Returns:
- the body value
- Model:
- derived="false" transient="false"
-
setBody
The textual representation of the
representedElementin the givenlanguage.- Parameters:
value- the body value- Model:
- derived="false" transient="false"
-