Namespace SysML
- class Namespace
Implementation of
Namespacedefined in the KerML specification.Specification:
A
Namespaceis anElementthat contains otherElements, known as itsmembers, viaMembershipRelationshipswith thoseElements. Themembersof aNamespacemay be owned by theNamespace, aliased in theNamespace, or imported into theNamespaceviaImportRelationships.A
Namespacecan provide names for itsmembersvia themember_namesandmember_short_namesspecified by theMembershipsin theNamespace. If aMembershipspecifies amember_nameand/ormember_short_name, then those are names of the correspondingmember_elementrelative to theNamespace. For anOwningMembership, theowned_member_nameandowned_member_short_nameare given by theElementnameandshort_name. Note that the sameElementmay be themember_elementof multipleMembershipsin aNamespace(though it may be owned at most once), each of which may define a separate alias for theElementrelative to theNamespace.For language description, see section 7.2.5 of the KerML specification. For more details on the model, see section 8.3.2.4.5 of the KerML specification.
Children
Members defined in
Namespace(12 members)
R
RThe elements enclosed by curly brackets in textual syntax.
RSysMLImplementation of
imported_membershipdefined in the KerML specification.
RSysMLImplementation of
memberdefined in the KerML specification.
RSysMLImplementation of
membershipdefined in the KerML specification.
RSysMLImplementation of
owned_importdefined in the KerML specification.
RSysMLImplementation of
owned_memberdefined in the KerML specification.
RSysMLImplementation of
owned_membershipdefined in the KerML specification.
RMetadata prefixes, prefixed with
#in textual syntax.
Access owned named members by name. Throws
KeyErrorif a member with such name does not exist.
Non-throwing variant of
__getitem__. Returns None if a named member was not found.
Access owned memberships by name. Returns None if an owned member or membership with such name does not exist.
Members inherited from
Element(25 members)
RSysMLImplementation of
alias_idsdefined in the KerML specification.
RThe owned
Commentsrelated byowned_relationships.
RWSysMLImplementation of
declared_namedefined in the KerML specification.
RWSysMLImplementation of
declared_short_namedefined in the KerML specification.
RSysMLImplementation of
documentationdefined in the KerML specification.
RWSysMLImplementation of
element_iddefined in the KerML specification.
RSysMLImplementation of
is_implied_includeddefined in the KerML specification.
RSysMLImplementation of
is_library_elementdefined in the KerML specification.
RThe owned metadata related by
owned_relationships.
RSysMLImplementation of
namedefined in the KerML specification.
RSysMLImplementation of
owned_annotationdefined in the KerML specification.
RSysMLImplementation of
owned_elementdefined in the KerML specification.
RSysMLImplementation of
owned_relationshipdefined in the KerML specification.
RSysMLImplementation of
ownerdefined in the KerML specification.
RSysMLImplementation of
owning_membershipdefined in the KerML specification.
RSysMLImplementation of
owning_namespacedefined in the KerML specification.
RSysMLImplementation of
owning_relationshipdefined in the KerML specification.
RReturn a unique description of the location of this
Elementin the containment structure rooted in a rootNamespace. In most cases the segments will be identical toQualifiedName.
RSysMLImplementation of
qualified_namedefined in the KerML specification.
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.
RSysMLImplementation of
short_namedefined in the KerML specification.
RSysMLImplementation of
textual_representationdefined in the KerML specification.
Check if the qualified name of this
Elementmatches the provided segments of a qualified name.Members inherited from
AstNode(7 members) Attributes
- STD: tuple[type[syside.Namespace], ...] = ()
- property children: syside.NamespaceBody
The elements enclosed by curly brackets in textual syntax.
- property imported_memberships: syside.LazyIterator[syside.Membership]
Implementation of
imported_membershipdefined in the KerML specification.Specification:
The
Membershipsin thisNamespacethat result from theowned_importsof thisNamespace.See section 8.3.2.4.5 of the KerML specification for more details.
- property members: syside.LazyIterator[syside.Element]
Implementation of
memberdefined in the KerML specification.Specification:
The set of all member
Elementsof thisNamespace, which are themember_elementsof allmembershipsof theNamespace.See section 8.3.2.4.5 of the KerML specification for more details.
- property memberships: syside.LazyIterator[syside.Membership]
Implementation of
membershipdefined in the KerML specification.Specification:
All
Membershipsin thisNamespace, including (at least) the union ofowned_membershipsandimported_memberships.See section 8.3.2.4.5 of the KerML specification for more details.
- property owned_imports: syside.LazyIterator[syside.Import]
Implementation of
owned_importdefined in the KerML specification.Specification:
The
owned_relationshipsof thisNamespacethat areImports, for which theNamespaceis theimport_owning_namespace.See section 8.3.2.4.5 of the KerML specification for more details.
- property owned_members: syside.LazyIterator[syside.Element]
Implementation of
owned_memberdefined in the KerML specification.Specification:
The owned
membersof thisNamespace, which are theowned_member_elementsof theowned_membershipsof theNamespace.See section 8.3.2.4.5 of the KerML specification for more details.
- property owned_memberships: syside.LazyIterator[syside.Membership]
Implementation of
owned_membershipdefined in the KerML specification.Specification:
The
owned_relationshipsof thisNamespacethat areMemberships, for which theNamespaceis themembership_owning_namespace.See section 8.3.2.4.5 of the KerML specification for more details.
- property prefixes: syside.NamespacePrefixes
Metadata prefixes, prefixed with
#in textual syntax.
Methods
- __getitem__(arg: str, /) syside.Element
Access owned named members by name. Throws
KeyErrorif a member with such name does not exist.
- get_member(arg: str, /) syside.Element | None
Non-throwing variant of
__getitem__. Returns None if a named member was not found.
- get_member(arg0: str, arg1: syside.Element, /) syside.Element
Overload for
get_memberthat returns the last argument if a member was not found.
- get_membership(arg: str, /) syside.Membership | None
Access owned memberships by name. Returns None if an owned member or membership with such name does not exist.
- get_membership(arg0: str, arg1: syside.Membership, /) syside.Membership
Overload for
get_membershipthat returns the last argument if a member was not found.