Subsetting SysML

class Subsetting

Implementation of Subsetting defined in the KerML specification.

Specification:

Subsetting is Specialization in which the specific and general Types are Features. This means all values of the subsetting_feature (on instances of its domain, i.e., the intersection of its featuring_types) are values of the subsetted_feature on instances of its domain. To support this the domain of the subsetting_feature must be the same or specialize (at least indirectly) the domain of the subsetted_feature (via Specialization), and the co-domain (intersection of the types) of the subsetting_feature must specialize the co-domain of the subsetted_feature.

For language description, see section 7.3.4.4 of the KerML specification. For more details on the model, see section 8.3.3.3.10 of the KerML specification.

Children
Members defined in Subsetting (7 members)

CHAINABLE

R

Whether this relationship can be used with chained features.

STD

R

All subtypes of Subsetting according to the specification.

owning_feature

R SysML

Implementation of owning_feature defined in the KerML specification.

subsetted_feature

R SysML

Implementation of subsetted_feature defined in the KerML specification.

subsetted_feature_target

R

Syside specific accessor for manipulating the target of subsetted_feature.

subsetting_feature

R SysML

Implementation of subsetting_feature defined in the KerML specification.

subsetting_feature_target

R

Syside specific accessor for manipulating the target of subsetting_feature.

Members inherited from Specialization (6 members)

children

R

The elements enclosed by curly brackets in textual syntax.

general

R SysML

Implementation of general defined in the KerML specification.

general_target

R

Syside specific accessor for manipulating the target of general.

owning_type

R SysML

Implementation of owning_type defined in the KerML specification.

specific

R SysML

Implementation of specific defined in the KerML specification.

specific_target

R

Syside specific accessor for manipulating the target of specific.

Members inherited from Relationship (12 members)

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

The source CST node of self if one exists.

document

R

The document that owns this node.

parent

R

The parent node of self.

__hash__

Identity based hash of this node.

cast

  1. cast(self, *type: type[TNode]) -> TNode

isinstance

Chainable equivalent to isintance(self, type)

try_cast

Checked cast to type.

Attributes

CHAINABLE: bool = True

Whether this relationship can be used with chained features.

Using this in, e.g. append_chain, will not raise TypeError.

STD: tuple[type[syside.Subsetting], ...] = Ellipsis

All subtypes of Subsetting according to the specification.

This is needed because the implementation does not use multiple inheritance like the standard metamodel. However, all would-be inherited attributes are implemented explicitly on classes in Subsetting.Std.

When working with standard metamodel types, use:

if isinstance(element, Subsetting.STD):
    ...

For type hints, instead use Subsetting.Std:

def function(element: Element) -> Subsetting.Std:
    ...

Note that Subsetting.Std is only defined during TYPE_CHECKING, depending on the Python version used either from __future__ import annotations or def function(...) -> "Subsetting.Std" may be required to ensure that annotations are resolved lazily without an actual object present.

property owning_feature: syside.Feature | None

Implementation of owning_feature defined in the KerML specification.

Specification:

A subsetting_feature that is also the owning_related_element of this Subsetting.

See section 8.3.3.3.10 of the KerML specification for more details.

property subsetted_feature: syside.Feature | None

Implementation of subsetted_feature defined in the KerML specification.

Specification:

The Feature that is subsetted by the subsetting_feature of this Subsetting.

See section 8.3.3.3.10 of the KerML specification for more details.

property subsetted_feature_target: syside.ChainedFeatureReference

Syside specific accessor for manipulating the target of subsetted_feature.

property subsetting_feature: syside.Feature | None

Implementation of subsetting_feature defined in the KerML specification.

Specification:

The Feature that is a subset of the subsetted_feature of this Subsetting.

See section 8.3.3.3.10 of the KerML specification for more details.

property subsetting_feature_target: syside.ChainedFeatureReference

Syside specific accessor for manipulating the target of subsetting_feature.

Used in