Relationship SysML

class Relationship

Implementation of Relationship defined in the KerML specification.

Specification:

A Relationship is an Element that relates other Element. Some of its related_elements may be owned, in which case those owned_related_elements will be deleted from a model if their owning_relationship is. A Relationship may also be owned by another Element, in which case the owned_related_elements of the Relationship are also considered to be transitively owned by the owning_related_element of the Relationship.

The related_elements of a Relationship are divided into source and target Elements. The Relationship is considered to be directed from the source to the target Elements. An undirected Relationship may have either all source or all target Elements.

A “relationship Element” in the abstract syntax is generically any Element that is an instance of either Relationship or a direct or indirect specialization of Relationship. Any other kind of Element is a “non-relationship Element”. It is a convention of that non-relationship Elements are only related via reified relationship Elements. Any meta-associations directly between non-relationship Elements must be derived from underlying reified Relationship.

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.

%3 Relationship Relationship syside.Relationship Element Element syside.Element Element->Relationship AstNode AstNode syside.AstNode AstNode->Element
Children
Members defined in Relationship (13 members)

STD

R

first_source

R

Convenience method for sources[0].

first_target

R

Convenience method for targets[0].

is_implied

RW SysML

Implementation of is_implied defined in the KerML specification.

is_visibility_implied

R

Returns True if this Relationship is using implicit visibility.

owned_related_elements

R SysML

Implementation of owned_related_element defined in the KerML specification.

owning_related_element

R SysML

Implementation of owning_related_element defined in the KerML specification.

related_elements

R SysML

Implementation of related_element defined in the KerML specification.

sources

R SysML

Implementation of source defined in the KerML specification.

targets

R SysML

Implementation of target defined in the KerML specification.

visibility

RW

The visibility level of the related elements from this Relationship relative to the owning_related_element.

reset_visibility

Reset visibility to its implicit value.

try_set_visibility

Non-throwing alternative to visibility setter.

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[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_implied defined 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 True if this Relationship is using implicit visibility.

Implementation of owned_related_element defined 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_element defined 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.

property related_elements: syside.LazyIterator[syside.Element]

Implementation of related_element defined in the KerML specification.

Specification:

The Elements that are related by this Relationship, derived as the union of the source and target Elements 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 source defined 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 target defined in the KerML specification.

Specification:

The related_elements to 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 Relationship relative to the owning_related_element.

Raises TypeError if visibility is immutable, e.g. on Expose elements.

Methods

reset_visibility() None

Reset visibility to its implicit value.

try_set_visibility(arg: syside.VisibilityKind | None) bool

Non-throwing alternative to visibility setter.

Used in