Element
Element
is defined in KerML specification on
page 138.
Excerpt from the machine readable specification:
An
Element
is a constituent of a model that is uniquely identified relative to all otherElements
. It can haveRelationships
with otherElements
. Some of theseRelationships
might imply ownership of otherElements
, which means that if anElement
is deleted from a model, then so are all theElements
that it owns.
The following diagram shows the inheritance hierarchy of Element
according to the specification:
![// Class: Element
digraph {
Element [label="Element (KerML)" shape=plaintext]
}](../../../_images/graphviz-a86c22b395af308504e0ea01dac6f261ee5e2a35.png)
The following table shows all attributes defined for
Element
according to the specification together with
the documentation from the machine readable specification. Note
that in SysIDE API, we use snake case for attribute names
instead of Pascal case used in the specification.
Attribute |
Documentation from machine readable specification |
Attributes defined in |
|
The declared name of this |
|
An optional alternative name for the |
|
The Documentation owned by this Element. |
|
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. |
|
Whether all necessary implied Relationships have been included in the
|
|
Whether this Element is contained in the ownership tree of a library model. |
|
The name to be used for this |
|
The |
|
The Elements owned by this Element, derived as the ownedRelatedElements of the ownedRelationships of this Element. |
|
The Relationships for which this Element is the owningRelatedElement. |
|
The owner of this Element, derived as the |
|
The |
|
The |
|
The Relationship for which this Element is an ownedRelatedElement, if any. |
|
The full ownership-qualified name of this |
|
The short name to be used for this |
|
The |
The following table lists SysIDE specific attributes available for
class Element
:
Python Attribute |
- class Element
-
- STD: tuple[type[syside.Element], ...] = ()
- property sema_state: syside.SemaState
- property qualified_name: syside.QualifiedName | None
- property owning_membership: syside.OwningMembership | None
- property owned_relationships: syside.LazyIterator[syside.Relationship]
- property owning_relationship: syside.Relationship | None
- property owning_namespace: syside.Namespace | None
- property owner: syside.Element | None
- property scoped_owner: syside.Element | None
- property owned_elements: syside.LazyIterator[syside.Element]
- property documentation: syside.LazyIterator[syside.Documentation]
- property owned_annotations: syside.LazyIterator[syside.Annotation]
- property comments: syside.LazyIterator[syside.Comment]
- property textual_representations: syside.LazyIterator[syside.TextualRepresentation]
- property metadata: syside.LazyIterator[syside.MetadataFeature | syside.MetadataUsage]
- isinstance(type: tuple[syside.AstNode.isinstance.type[syside.TNode], ...]) TypeGuard[syside.TNode]
- try_cast(type: tuple[syside.AstNode.try_cast.type[syside.TNode], ...]) syside.TNode | None
- cast(type: tuple[syside.AstNode.cast.type[syside.TNode], ...]) syside.TNode
- property parent: syside.Element | None
- property document: syside.Document
- property cst_node: syside.CstNode | None