Element SysML
- class Element
Implementation of
Elementdefined in the KerML specification.Specification:
An
Elementis a constituent of a model that is uniquely identified relative to all otherElements. It can haveRelationshipswith otherElements. Some of theseRelationshipsmight imply ownership of otherElements, which means that if anElementis deleted from a model, then so are all theElementsthat it owns.For language description, see section 7.2.2 of the KerML specification. For more details on the model, see section 8.3.2.1.2 of the KerML specification.
Children
Members defined in
Element(24 members)
R
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.Element], ...] = ()
- property comments: syside.LazyIterator[syside.Comment]
The owned
Commentsrelated byowned_relationships.
- property declared_name: str | None
The declared name of this
Element.
- property declared_short_name: str | None
An 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.
- property documentation: syside.LazyIterator[syside.Documentation]
The Documentation owned by this Element.
- property element_id: uuid.UUID
- 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.
Note that
element_idmay be deprecated in a future release to improve performance as it has no use outside of serialization. In such cases, we may instead create and storeelement_idsonly during serialization. Otherwise__hash__is guaranteed to remain stable while theElementis alive, however it may be reused onDocumentrebuilds.
- property is_implied_included: bool
Whether 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.
- property is_library_element: bool
Whether this Element is contained in the ownership tree of a library model.
- property metadata: syside.LazyIterator[syside.MetadataFeature | syside.MetadataUsage]
The owned metadata related by
owned_relationships.
- property name: str | None
The 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.
- property owned_annotations: syside.LazyIterator[syside.Annotation]
The
owned_relationshipsof thisElementthat areAnnotations, for which thisElementis theannotated_element.
- property owned_elements: syside.LazyIterator[syside.Element]
The Elements owned by this Element, derived as the owned_related_elements of the owned_relationships of this Element.
- property owned_relationships: syside.LazyIterator[syside.Relationship]
The Relationships for which this Element is the owning_related_element.
- property owner: syside.Element | None
The owner of this Element, derived as the
owning_related_elementof theowning_relationshipof this Element, if any.
- property owning_membership: syside.OwningMembership | None
The
owning_relationshipof thisElement, if thatRelationshipis aMembership.
- property owning_namespace: syside.Namespace | None
The
Namespacethat owns thisElement, which is themembership_owning_namespaceof theowning_membershipof thisElement, if any.
- property owning_relationship: syside.Relationship | None
The Relationship for which this Element is an owned_related_element, if any.
- property qualified_name: syside.QualifiedName | None
The 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.
- property scoped_owner: syside.Element | None
The owner of this
Elementas the parent ofowning_membershiporowning_relationshipotherwise.
- property sema_state: syside.SemaState
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.
- property short_name: str | None
The 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.
- property textual_representations: syside.LazyIterator[syside.TextualRepresentation]
The
TextualRepresentationsthat annotate thisElement.
Methods
- __str__() str
- matches_qualified_name(arg: Sequence[str], /) bool
Check if the qualified name of this
Elementmatches the provided segments of a qualified name.