TextualRepresentation SysML
- class TextualRepresentation
Implementation of
TextualRepresentationdefined in the KerML specification.Specification:
A
TextualRepresentationis anAnnotatingElementwhosebodyrepresents therepresented_elementin a givenlanguage. Therepresented_elementmust be theownerof theTextualRepresentation. The namedlanguagecan be a natural language, in which case thebodyis an informal representation, or an artificial language, in which case thebodyis expected to be a formal, machine-parsable representation.If the named
languageof aTextualRepresentationis machine-parsable, then thebodytext should be legal input text as defined for thatlanguage. The interpretation of the named language string shall be case insensitive. The followinglanguagenames are defined to correspond to the given standard languages:kermlKernel Modeling Language
oclObject Constraint Language
alfAction Language for f_u_m_l
Other specifications may define specific
languagestrings, other than those shown above, to be used to indicate the use of languages from those specifications in KerMLTextualRepresentation.If the
languageof aTextualRepresentationis “kerml”, then thebodytext shall be a legal representation of therepresented_elementin the KerML textual concrete syntax. A conforming tool can use such aTextualRepresentationAnnotationto record the original KerML concrete syntax text from which anElementwas parsed. In this case, it is a tool responsibility to ensure that thebodyof theTextualRepresentationremains correct (or the Annotation is removed) if the annotatedElementchanges other than by re-parsing thebodytext.An
Elementwith aTextualRepresentationin a language other than KerML is essentially a semantically “opaque”Elementspecified in the other language. However, a conforming KerML tool may interpret such an element consistently with the specification of the named language.For language description, see section 7.2.4.3 of the KerML specification. For more details on the model, see section 8.3.2.3.6 of the KerML specification.
Members defined in
TextualRepresentation(4 members)
R
RWThe textual representation of the
represented_elementin the givenlanguage.
RWThe natural or artificial language in which the
bodytext is written.
RThe
Elementthat is represented by thisTextualRepresentation.Members inherited from
AnnotatingElement(5 members)
RContainer for owned annotations.
RThe
Elementsthat are annotated by thisAnnotatingElement. Ifannotationis not empty, these are theannotated_elementsof theannotations. Ifannotationis empty, then it is theowning_namespaceof theAnnotatingElement.
RThe
Annotationsthat relate thisAnnotatingElementto itsannotated_elements. This includes theowning_annotating_relationship(if any) followed by all theowned_annotating_relationships.
RThe
owned_relationshipsof thisAnnotatingElementthat areAnnotations, for which thisAnnotatingElementis theannotating_element.
RThe
owning_relationshipof thisAnnotatingRelationship, if it is anAnnotationMembers inherited from
Element(23 members)
RThe owned
Commentsrelated byowned_relationships.
RWThe declared name of this
Element.
RWAn optional alternative name for the
Elementthat is intended to be shorter or in some way more succinct than its primaryname. It may act as a modeler-specified identifier for theElement, though it is then the responsibility of the modeler to maintain the uniqueness of this identifier within a model or relative to some other context.
RThe Documentation owned by this Element.
RW- The globally unique identifier for this Element. This is intended to be
set by tooling, and it must not change during the lifetime of the Element.
RWhether all necessary implied Relationships have been included in the
owned_relationshipsof this Element. This property may be true, even if there are not actually anyowned_relationshipswithis_implied = true, meaning that no such Relationships are actually implied for this Element. However, if it is false, thenowned_relationshipsmay not contain any implied Relationships. That is, either all required implied Relationships must be included, or none of them.
RWhether this Element is contained in the ownership tree of a library model.
RThe owned metadata related by
owned_relationships.
RThe name to be used for this
Elementduring name resolution within itsowning_namespace. This is derived using theeffective_name()operation. By default, it is the same as thedeclared_name, but this is overridden for certain kinds ofElementsto compute anameeven when thedeclared_nameis null.
RThe
owned_relationshipsof thisElementthat areAnnotations, for which thisElementis theannotated_element.
RThe Elements owned by this Element, derived as the owned_related_elements of the owned_relationships of this Element.
RThe Relationships for which this Element is the owning_related_element.
RThe owner of this Element, derived as the
owning_related_elementof theowning_relationshipof this Element, if any.
RThe
owning_relationshipof thisElement, if thatRelationshipis aMembership.
RThe
Namespacethat owns thisElement, which is themembership_owning_namespaceof theowning_membershipof thisElement, if any.
RThe Relationship for which this Element is an owned_related_element, if any.
RThe full ownership-qualified name of this
Element, represented in a form that is valid according to the KerML textual concrete syntax for qualified names (including use of unrestricted name notation and escaped characters, as necessary). Thequalified_nameis null if thisElementhas noowning_namespaceor if there is not a complete ownership chain of namedNamespacesfrom a rootNamespaceto thisElement.
RThe owner of this
Elementas the parent ofowning_membershiporowning_relationshipotherwise.
RWThe state of semantic resolution for this
Element. Based on this, sema may skip elements to avoid duplicate work, e.g. when resolving elements in a group of related documents.
RThe short name to be used for this
Elementduring name resolution within itsowning_namespace. This is derived using theeffective_short_name()operation. By default, it is the same as thedeclared_short_name, but this is overridden for certain kinds ofElementsto compute ashort_nameeven when thedeclared_nameis null.
RThe
TextualRepresentationsthat annotate thisElement.
Members inherited from
AstNode(7 members) Attributes
- STD: tuple[type[syside.TextualRepresentation], ...] = ()
- property body: str
The textual representation of the
represented_elementin the givenlanguage.
- property language: str
The natural or artificial language in which the
bodytext is written.
- property represented_element: syside.Element | None
The
Elementthat is represented by thisTextualRepresentation.