Relationship SysML
- class Relationship
Implementation of
Relationshipdefined in the KerML specification.Specification:
A
Relationshipis anElementthat relates otherElement. Some of itsrelated_elementsmay be owned, in which case thoseowned_related_elementswill be deleted from a model if theirowning_relationshipis. ARelationshipmay also be owned by anotherElement, in which case theowned_related_elementsof theRelationshipare also considered to be transitively owned by theowning_related_elementof theRelationship.The
related_elementsof aRelationshipare divided intosourceandtargetElements. TheRelationshipis considered to be directed from thesourceto thetargetElements. An undirectedRelationshipmay have either allsourceor alltargetElements.A “relationship
Element” in the abstract syntax is generically anyElementthat is an instance of eitherRelationshipor a direct or indirect specialization ofRelationship. Any other kind ofElementis a “non-relationshipElement”. It is a convention of that non-relationshipElementsare only related via reified relationshipElements. Any meta-associations directly between non-relationshipElementsmust be derived from underlying reifiedRelationship.For language description, see section 7.2.2 of the KerML specification. For more details on the model, see section 8.3.2.1.3 of the KerML specification.
Children
Members defined in
Relationship(13 members)
R
RConvenience method for sources[0].
RConvenience method for targets[0].
RWSysMLImplementation of
is_implieddefined in the KerML specification.
RReturns
Trueif thisRelationshipis using implicit visibility.
RSysMLImplementation of
owned_related_elementdefined in the KerML specification.
RSysMLImplementation of
owning_related_elementdefined in the KerML specification.
RSysMLImplementation of
related_elementdefined in the KerML specification.
RSysMLImplementation of
sourcedefined in the KerML specification.
RSysMLImplementation of
targetdefined in the KerML specification.
RWThe visibility level of the related elements from this
Relationshiprelative to theowning_related_element.
Reset visibility to its implicit value.
Non-throwing alternative to
visibilitysetter.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[Union[type[syside.Relationship], type[syside.Association], type[syside.ConnectionDefinition], type[syside.Connector], type[syside.ConnectorAsUsage], type[syside.FlowDefinition]], ...] = ()
- property first_source: syside.Element | None
Convenience method for sources[0].
- property first_target: syside.Element | None
Convenience method for targets[0].
- property is_implied: bool
Implementation of
is_implieddefined in the KerML specification.Specification:
Whether this Relationship was generated by tooling to meet semantic rules, rather than being directly created by a modeler.
See section 8.3.2.1.3 of the KerML specification for more details.
- property is_visibility_implied: bool
Returns
Trueif thisRelationshipis using implicit visibility.
Implementation of
owned_related_elementdefined in the KerML specification.Specification:
The related_elements of this Relationship that are owned by the Relationship.
See section 8.3.2.1.3 of the KerML specification for more details.
Implementation of
owning_related_elementdefined in the KerML specification.Specification:
The related_element of this Relationship that owns the Relationship, if any.
See section 8.3.2.1.3 of the KerML specification for more details.
Implementation of
related_elementdefined in the KerML specification.Specification:
The Elements that are related by this Relationship, derived as the union of the
sourceandtargetElements of the Relationship.See section 8.3.2.1.3 of the KerML specification for more details.
- property sources: syside.ContainerView[syside.Element]
Implementation of
sourcedefined in the KerML specification.Specification:
The
related_elements from which this Relationship is considered to be directed.See section 8.3.2.1.3 of the KerML specification for more details.
- property targets: syside.ContainerView[syside.Element]
Implementation of
targetdefined in the KerML specification.Specification:
The
related_elementsto which this Relationship is considered to be directed.See section 8.3.2.1.3 of the KerML specification for more details.
- property visibility: syside.VisibilityKind
The visibility level of the related elements from this
Relationshiprelative to theowning_related_element.Raises
TypeErrorif visibility is immutable, e.g. onExposeelements.
Methods
- reset_visibility() None
Reset visibility to its implicit value.
- try_set_visibility(arg: syside.VisibilityKind | None) bool
Non-throwing alternative to
visibilitysetter.