Add missing Elements to UML model
Generated new SysML model, but with MyPy errors
This commit is contained in:
parent
6ea623f216
commit
d7c283a459
@ -1,10 +1,30 @@
|
||||
from gaphor.core.modeling.properties import association, attribute
|
||||
# This file is generated by profile_coder.py. DO NOT EDIT!
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import uuid
|
||||
from typing import TYPE_CHECKING, Callable, List, Optional
|
||||
|
||||
from gaphor.core.modeling.collection import collection
|
||||
from gaphor.core.modeling.element import Element
|
||||
from gaphor.core.modeling.properties import (
|
||||
association,
|
||||
attribute,
|
||||
derived,
|
||||
derivedunion,
|
||||
enumeration,
|
||||
redefine,
|
||||
relation_many,
|
||||
relation_one,
|
||||
)
|
||||
from gaphor.UML import (
|
||||
Abstraction,
|
||||
AcceptEventAction,
|
||||
ActivityEdge,
|
||||
ActivityPartition,
|
||||
AddStructuralFeatureValueAction,
|
||||
Behavior,
|
||||
ChangeEvent,
|
||||
Class,
|
||||
Classifier,
|
||||
Comment,
|
||||
@ -23,6 +43,7 @@ from gaphor.UML import (
|
||||
Operation,
|
||||
Optional,
|
||||
Parameter,
|
||||
ParameterSet,
|
||||
Port,
|
||||
Property,
|
||||
StructuralFeature,
|
||||
@ -30,127 +51,16 @@ from gaphor.UML import (
|
||||
)
|
||||
|
||||
|
||||
class AbstractRequirement:
|
||||
derived: attribute[AbstractRequirement]
|
||||
tracedTo: attribute[NamedElement]
|
||||
id: attribute[str]
|
||||
verifiedBy: attribute[NamedElement]
|
||||
master: attribute[AbstractRequirement]
|
||||
refinedBy: attribute[NamedElement]
|
||||
base_NamedElement: attribute[NamedElement]
|
||||
satisfiedBy: attribute[NamedElement]
|
||||
text: attribute[str]
|
||||
baseClass: association
|
||||
|
||||
|
||||
class TestCase:
|
||||
baseClass: association
|
||||
|
||||
|
||||
class Block:
|
||||
class Block(Class):
|
||||
isEncapsulated: attribute[int]
|
||||
baseClass: association
|
||||
|
||||
|
||||
class ConnectorProperty:
|
||||
connector: attribute[Connector]
|
||||
baseClass: association
|
||||
|
||||
|
||||
class ParticipantProperty:
|
||||
end: attribute[Property]
|
||||
baseClass: association
|
||||
|
||||
|
||||
class DistributedProperty:
|
||||
baseClass: association
|
||||
|
||||
|
||||
class ValueType:
|
||||
baseClass: association
|
||||
unit: association
|
||||
|
||||
|
||||
class ElementPropertyPath:
|
||||
baseClass: association
|
||||
propertyPath: association
|
||||
|
||||
|
||||
class DirectedRelationshipPropertyPath:
|
||||
baseClass: association
|
||||
targetContext: association
|
||||
sourceContext: association
|
||||
|
||||
|
||||
class BindingConnector:
|
||||
baseClass: association
|
||||
|
||||
|
||||
class PropertySpecificType:
|
||||
baseClass: association
|
||||
|
||||
|
||||
class EndPathMultiplicity:
|
||||
upper: attribute[int]
|
||||
lower: attribute[int]
|
||||
baseClass: association
|
||||
|
||||
|
||||
class AdjuntProperty:
|
||||
baseClass: association
|
||||
principal: association
|
||||
|
||||
|
||||
class ClassifierBehaviorProperty:
|
||||
pass
|
||||
|
||||
|
||||
class ProxyPort:
|
||||
baseClass: association
|
||||
|
||||
|
||||
class FullPort:
|
||||
baseClass: association
|
||||
|
||||
|
||||
class FlowProperty:
|
||||
direction: attribute
|
||||
baseClass: association
|
||||
|
||||
|
||||
class AddStructuralFeatureValueAction:
|
||||
pass
|
||||
|
||||
|
||||
class ChangeEvent:
|
||||
pass
|
||||
|
||||
|
||||
class ChangeSructuralFeatureEvent:
|
||||
baseClass: association
|
||||
structuralFeature: association
|
||||
|
||||
|
||||
class AcceptChangeStructuralFeatureEventAction:
|
||||
baseClass: association
|
||||
|
||||
|
||||
class DirectedFeature:
|
||||
featureDirection: attribute
|
||||
baseClass: association
|
||||
|
||||
|
||||
class Conform:
|
||||
baseClass: association
|
||||
|
||||
|
||||
class View:
|
||||
class View(Class):
|
||||
viewpoint: attribute[Viewpoint]
|
||||
stakeholder: attribute[Stakeholder]
|
||||
baseClass: association
|
||||
|
||||
|
||||
class Viewpoint:
|
||||
class Viewpoint(Class):
|
||||
method: attribute[Behavior]
|
||||
presentation: attribute[str]
|
||||
purpose: attribute[str]
|
||||
@ -158,83 +68,202 @@ class Viewpoint:
|
||||
stakeholder: attribute[Stakeholder]
|
||||
concernList: attribute[Comment]
|
||||
language: attribute[str]
|
||||
baseClass: association
|
||||
|
||||
|
||||
class Stakeholder:
|
||||
concern: attribute[str]
|
||||
class ConnectorProperty(Property):
|
||||
connector: attribute[Connector]
|
||||
|
||||
|
||||
class ParticipantProperty(Property):
|
||||
end: attribute[Property]
|
||||
|
||||
|
||||
class DistributedProperty(Property):
|
||||
pass
|
||||
|
||||
|
||||
class EndPathMultiplicity(Property):
|
||||
upper: attribute[int]
|
||||
lower: attribute[int]
|
||||
|
||||
|
||||
class AdjuntProperty(Property):
|
||||
principal: relation_one[None]
|
||||
|
||||
|
||||
class FlowProperty(Property):
|
||||
direction: attribute[None]
|
||||
|
||||
|
||||
class Tagged(Property):
|
||||
subsets: attribute[str]
|
||||
nonunique: attribute[bool]
|
||||
ordered: attribute[bool]
|
||||
|
||||
|
||||
class ClassifierBehaviorProperty(Property):
|
||||
pass
|
||||
|
||||
|
||||
class ValueType(DataType):
|
||||
unit: relation_one[None]
|
||||
|
||||
|
||||
class ElementPropertyPath(Element):
|
||||
propertyPath: relation_one[None]
|
||||
|
||||
|
||||
class DirectedRelationshipPropertyPath(DirectedRelationship):
|
||||
sourceContext: relation_one[None]
|
||||
targetContext: relation_one[None]
|
||||
|
||||
|
||||
class BindingConnector(Connector):
|
||||
pass
|
||||
|
||||
|
||||
class NestedConnectorEnd(ElementPropertyPath, ConnectorEnd):
|
||||
pass
|
||||
|
||||
|
||||
class PropertySpecificType(Classifier):
|
||||
pass
|
||||
|
||||
|
||||
class Stakeholder(Classifier):
|
||||
concernList: attribute[Comment]
|
||||
baseClass: association
|
||||
concern: attribute[str]
|
||||
|
||||
|
||||
class Expose:
|
||||
baseClass: association
|
||||
class ProxyPort(Port):
|
||||
pass
|
||||
|
||||
|
||||
class Rationale:
|
||||
baseClass: association
|
||||
class FullPort(Port):
|
||||
pass
|
||||
|
||||
|
||||
class Problem:
|
||||
baseClass: association
|
||||
class InvocationOnNestedPortAction(ElementPropertyPath, InvocationAction):
|
||||
onNestedPort: relation_one[None]
|
||||
|
||||
|
||||
class ElementGroup:
|
||||
class TriggerOnNestedPort(ElementPropertyPath, Trigger):
|
||||
onNestedPort: relation_one[None]
|
||||
|
||||
|
||||
class AddFlowPropertyValueOnNestedPortAction(
|
||||
ElementPropertyPath, AddStructuralFeatureValueAction
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
class ChangeSructuralFeatureEvent(ChangeEvent):
|
||||
structuralFeature: relation_one[None]
|
||||
|
||||
|
||||
class AcceptChangeStructuralFeatureEventAction(AcceptEventAction):
|
||||
pass
|
||||
|
||||
|
||||
class DirectedFeature(Feature):
|
||||
featureDirection: attribute[None]
|
||||
|
||||
|
||||
class Conform(Generalization):
|
||||
pass
|
||||
|
||||
|
||||
class Rationale(Comment):
|
||||
pass
|
||||
|
||||
|
||||
class Problem(Comment):
|
||||
pass
|
||||
|
||||
|
||||
class ElementGroup(Comment):
|
||||
criterion: attribute[str]
|
||||
member: attribute[Element]
|
||||
name: attribute[str]
|
||||
orderedMember: attribute[Element]
|
||||
size: attribute[int]
|
||||
baseClass: association
|
||||
|
||||
|
||||
class ParameterSet:
|
||||
class Expose(Dependency):
|
||||
pass
|
||||
|
||||
|
||||
class Rate:
|
||||
class Rate(Parameter, ActivityEdge):
|
||||
rate: attribute[InstanceSpecification]
|
||||
baseClass: association
|
||||
|
||||
|
||||
class Probability:
|
||||
probability: attribute
|
||||
baseClass: association
|
||||
class Probability(ParameterSet, ActivityEdge):
|
||||
probability: attribute[ValueSpecification]
|
||||
|
||||
|
||||
class ControlOperator:
|
||||
baseClass: association
|
||||
|
||||
|
||||
class NoBuffer:
|
||||
baseClass: association
|
||||
|
||||
|
||||
class Overwrite:
|
||||
baseClass: association
|
||||
|
||||
|
||||
class AllocateActivityPartition:
|
||||
baseClass: association
|
||||
|
||||
|
||||
class Trace:
|
||||
class TestCase(Operation, Behavior):
|
||||
pass
|
||||
|
||||
|
||||
class Refine:
|
||||
class ControlOperator(Behavior, Operation):
|
||||
pass
|
||||
|
||||
|
||||
class Tagged:
|
||||
nonunique: attribute[bool]
|
||||
ordered: attribute[bool]
|
||||
subsets: attribute[str]
|
||||
baseClass: association
|
||||
class NoBuffer(ObjectNode):
|
||||
pass
|
||||
|
||||
|
||||
class Requirement(AbstractRequirement):
|
||||
baseClass: association
|
||||
class Overwrite(ObjectNode):
|
||||
pass
|
||||
|
||||
|
||||
class Allocate(DirectedRelationshipPropertyPath, Abstraction):
|
||||
pass
|
||||
|
||||
|
||||
class AllocateActivityPartition(ActivityPartition):
|
||||
pass
|
||||
|
||||
|
||||
class AbstractRequirement(NamedElement):
|
||||
master: attribute[AbstractRequirement]
|
||||
refinedBy: attribute[NamedElement]
|
||||
satisfiedBy: attribute[NamedElement]
|
||||
base_NamedElement: attribute[NamedElement]
|
||||
text: attribute[str]
|
||||
derived: attribute[AbstractRequirement]
|
||||
tracedTo: attribute[NamedElement]
|
||||
id: attribute[str]
|
||||
verifiedBy: attribute[NamedElement]
|
||||
|
||||
|
||||
class InterfaceBlock(Block):
|
||||
pass
|
||||
|
||||
|
||||
class ConstraintBlock(Block):
|
||||
pass
|
||||
|
||||
|
||||
class BoundReference(EndPathMultiplicity):
|
||||
bindingPath: attribute[Property]
|
||||
boundend: attribute[ConnectorEnd]
|
||||
|
||||
|
||||
class Trace(DirectedRelationshipPropertyPath):
|
||||
pass
|
||||
|
||||
|
||||
class Refine(DirectedRelationshipPropertyPath):
|
||||
pass
|
||||
|
||||
|
||||
class Continuous(Rate):
|
||||
pass
|
||||
|
||||
|
||||
class Discrete(Rate):
|
||||
pass
|
||||
|
||||
|
||||
class Copy(Trace):
|
||||
@ -253,44 +282,5 @@ class Satisfy(Trace):
|
||||
pass
|
||||
|
||||
|
||||
class NestedConnectorEnd(ElementPropertyPath):
|
||||
baseClass: association
|
||||
|
||||
|
||||
class BoundReference(EndPathMultiplicity):
|
||||
bindingPath: attribute[Property]
|
||||
boundend: attribute[ConnectorEnd]
|
||||
|
||||
|
||||
class InterfaceBlock(Block):
|
||||
class Requirement(AbstractRequirement, Class):
|
||||
pass
|
||||
|
||||
|
||||
class InvocationOnNestedPortAction(ElementPropertyPath):
|
||||
onNestedPort: association
|
||||
baseClass: association
|
||||
|
||||
|
||||
class TriggerOnNestedPort(ElementPropertyPath):
|
||||
baseClass: association
|
||||
onNestedPort: association
|
||||
|
||||
|
||||
class AddFlowPropertyValueOnNestedPortAction(ElementPropertyPath):
|
||||
baseClass: association
|
||||
|
||||
|
||||
class ConstraintBlock(Block):
|
||||
pass
|
||||
|
||||
|
||||
class Continuous(Rate):
|
||||
pass
|
||||
|
||||
|
||||
class Discrete(Rate):
|
||||
pass
|
||||
|
||||
|
||||
class Allocate(DirectedRelationshipPropertyPath):
|
||||
baseClass: association
|
||||
|
@ -18,6 +18,7 @@ from gaphor.core.modeling import (
|
||||
PackageableElement,
|
||||
)
|
||||
from gaphor.core.modeling.collection import collection
|
||||
from gaphor.core.modeling.element import Element
|
||||
from gaphor.core.modeling.properties import (
|
||||
association,
|
||||
attribute,
|
||||
@ -193,7 +194,6 @@ class Generalization(DirectedRelationship):
|
||||
|
||||
class BehavioredClassifier(Classifier):
|
||||
ownedBehavior: relation_many[Behavior]
|
||||
ownedTrigger: relation_many[Trigger]
|
||||
implementation: relation_many[Implementation] # type: ignore[assignment]
|
||||
|
||||
|
||||
@ -497,6 +497,7 @@ class Constraint(PackageableElement):
|
||||
specification: attribute[str]
|
||||
stateInvariant: relation_one[StateInvariant]
|
||||
owningState: relation_one[State]
|
||||
parameterSet: relation_one[ParameterSet]
|
||||
context: derivedunion[Namespace]
|
||||
|
||||
|
||||
@ -718,6 +719,26 @@ class BehaviorExecutionSpecification(ExecutionSpecification):
|
||||
behavior: relation_one[Behavior]
|
||||
|
||||
|
||||
class ChangeEvent(Event):
|
||||
changeExpression: attribute[str]
|
||||
|
||||
|
||||
class StructuralFeatureAction(Action):
|
||||
pass
|
||||
|
||||
|
||||
class WriteStructuralFeatureAction(StructuralFeatureAction):
|
||||
pass
|
||||
|
||||
|
||||
class AddStructuralFeatureValueAction(WriteStructuralFeatureAction):
|
||||
isReplaceAll: attribute[int]
|
||||
|
||||
|
||||
class ParameterSet(NamedElement):
|
||||
condition: relation_many[Constraint]
|
||||
|
||||
|
||||
# class 'ValueSpecification' has been stereotyped as 'SimpleAttribute'
|
||||
# class 'InstanceValue' has been stereotyped as 'SimpleAttribute' too
|
||||
# class 'Expression' has been stereotyped as 'SimpleAttribute' too
|
||||
@ -806,6 +827,9 @@ Port.isService = attribute("isService", int)
|
||||
ActivityPartition.isDimension = attribute("isDimension", int, default=False)
|
||||
ActivityPartition.isExternal = attribute("isExternal", int, default=False)
|
||||
AcceptEventAction.isUnmarshall = attribute("isUnmarshall", int, default=False)
|
||||
AddStructuralFeatureValueAction.isReplaceAll = attribute(
|
||||
"isReplaceAll", int, default=False
|
||||
)
|
||||
Operation.precondition = association("precondition", Constraint, composite=True)
|
||||
Package.ownedDiagram = association(
|
||||
"ownedDiagram", Diagram, composite=True, opposite="package"
|
||||
@ -1212,7 +1236,6 @@ ReplyAction.returnInformation = association(
|
||||
)
|
||||
SendSignalAction.target = association("target", InputPin, composite=True)
|
||||
Collaboration.collaborationRole = association("collaborationRole", ConnectableElement)
|
||||
BehavioredClassifier.ownedTrigger = association("ownedTrigger", Trigger, composite=True)
|
||||
Trigger.event = association("event", Event, lower=1, upper=1)
|
||||
Signal.ownedAttribute = association("ownedAttribute", Property, composite=True)
|
||||
Reception.signal = association("signal", Signal, upper=1)
|
||||
@ -1245,6 +1268,14 @@ ExecutionOccurrenceSpecification.execution = association(
|
||||
)
|
||||
ActionExecutionSpecification.action = association("action", Action, lower=1, upper=1)
|
||||
BehaviorExecutionSpecification.behavior = association("behavior", Behavior, upper=1)
|
||||
# 'ChangeEvent.changeExpression' is a simple attribute
|
||||
ChangeEvent.changeExpression = attribute("changeExpression", str)
|
||||
Constraint.parameterSet = association(
|
||||
"parameterSet", ParameterSet, upper=1, opposite="condition"
|
||||
)
|
||||
ParameterSet.condition = association(
|
||||
"condition", Constraint, composite=True, opposite="parameterSet"
|
||||
)
|
||||
# 47: override MultiplicityElement.lower(MultiplicityElement.lowerValue): attribute[str]
|
||||
MultiplicityElement.lower = MultiplicityElement.lowerValue
|
||||
|
||||
@ -1405,7 +1436,6 @@ Namespace.ownedMember = derivedunion(
|
||||
StateMachine.region,
|
||||
Region.subvertex,
|
||||
Node.nestedNode,
|
||||
BehavioredClassifier.ownedTrigger,
|
||||
Signal.ownedAttribute,
|
||||
Class.ownedReception,
|
||||
Interface.ownedReception,
|
||||
@ -1564,6 +1594,7 @@ Element.owner = derivedunion(
|
||||
Pseudostate.state,
|
||||
Action.interaction,
|
||||
GeneralOrdering.interactionFragment,
|
||||
Constraint.parameterSet,
|
||||
)
|
||||
Element.ownedElement = derivedunion(
|
||||
Element,
|
||||
@ -1597,6 +1628,7 @@ Element.ownedElement = derivedunion(
|
||||
DeploymentTarget.deployment,
|
||||
Interaction.action,
|
||||
InteractionFragment.generalOrdering,
|
||||
ParameterSet.condition,
|
||||
)
|
||||
ConnectorEnd.definingEnd = derivedunion(ConnectorEnd, "definingEnd", Property, 0, 1)
|
||||
# 118: override StructuredClassifier.part: property
|
||||
|
1440
models/UML.gaphor
1440
models/UML.gaphor
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user