TextualRepresentation SysML

class TextualRepresentation

Implementation of TextualRepresentation defined in the KerML specification.

Specification:

A TextualRepresentation is an AnnotatingElement whose body represents the represented_element in a given language. The represented_element 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 f_u_m_l

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

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.

%3 TextualRepresentation TextualRepresentation syside.TextualRepresentation AnnotatingElement AnnotatingElement syside.AnnotatingElement AnnotatingElement->TextualRepresentation Element Element syside.Element Element->AnnotatingElement AstNode AstNode syside.AstNode AstNode->Element
Members defined in TextualRepresentation (4 members)

STD

R

body

RW SysML

Implementation of body defined in the KerML specification.

language

RW SysML

Implementation of language defined in the KerML specification.

represented_element

R SysML

Implementation of represented_element defined in the KerML specification.

Members inherited from AnnotatingElement (5 members)

about

R

Container for owned annotations.

annotated_elements

R SysML

Implementation of annotated_element defined in the KerML specification.

annotations

R SysML

Implementation of annotation defined in the KerML specification.

owned_annotating_relationships

R SysML

Implementation of owned_annotating_relationship defined in the KerML specification.

owning_annotating_relationship

R SysML

Implementation of owning_annotating_relationship defined in the KerML specification.

Members inherited from Element (25 members)

alias_ids

R SysML

Implementation of alias_ids defined in the KerML specification.

comments

R

The owned Comments related by owned_relationships.

declared_name

RW SysML

Implementation of declared_name defined in the KerML specification.

declared_short_name

RW SysML

Implementation of declared_short_name defined in the KerML specification.

documentation

R SysML

Implementation of documentation defined in the KerML specification.

element_id

RW SysML

Implementation of element_id defined in the KerML specification.

is_implied_included

R SysML

Implementation of is_implied_included defined in the KerML specification.

is_library_element

R SysML

Implementation of is_library_element defined in the KerML specification.

metadata

R

The owned metadata related by owned_relationships.

name

R SysML

Implementation of name defined in the KerML specification.

owned_annotations

R SysML

Implementation of owned_annotation defined in the KerML specification.

owned_elements

R SysML

Implementation of owned_element defined in the KerML specification.

owned_relationships

R SysML

Implementation of owned_relationship defined in the KerML specification.

owner

R SysML

Implementation of owner defined in the KerML specification.

owning_membership

R SysML

Implementation of owning_membership defined in the KerML specification.

owning_namespace

R SysML

Implementation of owning_namespace defined in the KerML specification.

owning_relationship

R SysML

Implementation of owning_relationship defined in the KerML specification.

path

R

Return a unique description of the location of this Element in the containment structure rooted in a root Namespace. In most cases the segments will be identical to QualifiedName.

qualified_name

R SysML

Implementation of qualified_name defined in the KerML specification.

scoped_owner

R

The owner of this Element as the parent of owning_membership or owning_relationship otherwise.

sema_state

RW

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

short_name

R SysML

Implementation of short_name defined in the KerML specification.

textual_representations

R SysML

Implementation of textual_representation defined in the KerML specification.

__str__

matches_qualified_name

Check if the qualified name of this Element matches the provided segments of a qualified name.

Members inherited from AstNode (7 members)

cst_node

R

document

R

parent

R

__hash__

cast

isinstance

try_cast

Attributes

STD: tuple[type[syside.TextualRepresentation], ...] = ()
property body: str

Implementation of body defined in the KerML specification.

Specification:

The textual representation of the represented_element in the given language.

See section 8.3.2.3.6 of the KerML specification for more details.

property language: str

Implementation of language defined in the KerML specification.

Specification:

The natural or artificial language in which the body text is written.

See section 8.3.2.3.6 of the KerML specification for more details.

property represented_element: syside.Element | None

Implementation of represented_element defined in the KerML specification.

Specification:

The Element that is represented by this TextualRepresentation.

See section 8.3.2.3.6 of the KerML specification for more details.

Used in