-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDependency.cs
More file actions
328 lines (289 loc) · 21.6 KB
/
Dependency.cs
File metadata and controls
328 lines (289 loc) · 21.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
// -------------------------------------------------------------------------------------------------
// <copyright file="Dependency.cs" company="Starion Group S.A.">
//
// Copyright (C) 2022-2026 Starion Group S.A.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// </copyright>
// ------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------
// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
// ------------------------------------------------------------------------------------------------
namespace SysML2.NET.Core.POCO.Root.Dependencies
{
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Linq;
using SysML2.NET.Core.POCO.Root.Annotations;
using SysML2.NET.Core.POCO.Root.Elements;
using SysML2.NET.Core.POCO.Root.Namespaces;
using SysML2.NET.Collections;
using SysML2.NET.Decorators;
/// <summary>
/// A Dependency is a Relationship that indicates that one or more client Elements require one more
/// supplier Elements for their complete specification. In general, this means that a change to one of
/// the supplier Elements may necessitate a change to, or re-specification of, the client Elements.
/// Note that a Dependency is entirely a model-level Relationship, without
/// instance-level semantics.
/// </summary>
[Class(xmiId: "_19_0_2_12e503d9_1594006219028_628649_74", isAbstract: false, isFinalSpecialization: false, isActive: false)]
[GeneratedCode("SysML2.NET", "latest")]
public partial class Dependency : IDependency, IContainedRelationship
{
/// <summary>
/// Initialize a new instance of <see cref="Dependency" />
/// </summary>
public Dependency()
{
((IContainedRelationship)this).OwnedRelatedElement = new ContainerList<IRelationship, IElement>(this,
(element, relationship) => ((IContainedElement)element).OwningRelationship = relationship,
element => element.OwningRelationship);
((IContainedElement)this).OwnedRelationship = new ContainerList<IElement, IRelationship>(this,
(relationship, element) => ((IContainedRelationship)relationship).OwningRelatedElement = element,
relationship => relationship.OwningRelatedElement);
}
/// <summary>
/// Gets or sets the unique identifier
/// </summary>
[Property(xmiId: "sysml2.net", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[Implements(implementation: "IData.Id")]
public Guid Id { get; set; }
/// <summary>
/// Various alternative identifiers for this Element. Generally, these will be set by tools.
/// </summary>
[Property(xmiId: "_19_0_2_12e503d9_1594312532679_496267_4310", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[Implements(implementation: "IElement.AliasIds")]
public List<string> AliasIds { get; set; } = [];
/// <summary>
/// The Element or Elements dependent on the supplier Elements.
/// </summary>
[Property(xmiId: "_19_0_2_12e503d9_1594006406653_175551_182", aggregation: AggregationKind.None, lowerValue: 1, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[RedefinedProperty(propertyName: "_18_5_3_12e503d9_1533160674971_696758_43228")]
[Implements(implementation: "IDependency.Client")]
public List<IElement> Client { get; set; } = [];
/// <summary>
/// The declared name of this Element.
/// </summary>
[Property(xmiId: "_18_5_3_12e503d9_1533160674987_737648_43307", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[Implements(implementation: "IElement.DeclaredName")]
public string DeclaredName { get; set; }
/// <summary>
/// An optional alternative name for the Element that is intended to be shorter or in some way more
/// succinct than its primary name. It may act as a modeler-specified identifier for the Element, though
/// it is then the responsibility of the modeler to maintain the uniqueness of this identifier within a
/// model or relative to some other context.
/// </summary>
[Property(xmiId: "_19_0_2_12e503d9_1594160442439_915308_4153", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[Implements(implementation: "IElement.DeclaredShortName")]
public string DeclaredShortName { get; set; }
/// <summary>
/// The Documentation owned by this Element.
/// </summary>
[Property(xmiId: "_19_0_2_12e503d9_1594150061166_345630_1621", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[SubsettedProperty(propertyName: "_19_0_2_12e503d9_1594145755059_76214_87")]
[SubsettedProperty(propertyName: "_18_5_3_12e503d9_1543092869879_112608_17278")]
[Implements(implementation: "IElement.Documentation")]
public List<IDocumentation> documentation => this.ComputeDocumentation();
/// <summary>
/// The globally unique identifier for this Element. This is intended to be set by tooling, and it must
/// not change during the lifetime of the Element.
/// </summary>
[Property(xmiId: "_18_5_3_12e503d9_1533160674986_844338_43305", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[Implements(implementation: "IElement.ElementId")]
public string ElementId { get; set; }
/// <summary>
/// Whether this Relationship was generated by tooling to meet semantic rules, rather than being
/// directly created by a modeler.
/// </summary>
[Property(xmiId: "_19_0_4_12e503d9_1662070829631_521257_3623", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: "false")]
[Implements(implementation: "IRelationship.IsImplied")]
public bool IsImplied { get; set; }
/// <summary>
/// Whether all necessary implied Relationships have been included in the ownedRelationships of this
/// Element. This property may be true, even if there are not actually any ownedRelationships with
/// isImplied = true, meaning that no such Relationships are actually implied for this Element. However,
/// if it is false, then ownedRelationships may not contain any implied Relationships. That is, either
/// all required implied Relationships must be included, or none of them.
/// </summary>
[Property(xmiId: "_19_0_4_12e503d9_1662070949317_79713_3658", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: "false")]
[Implements(implementation: "IElement.IsImpliedIncluded")]
public bool IsImpliedIncluded { get; set; }
/// <summary>
/// Whether this Element is contained in the ownership tree of a library model.
/// </summary>
[Property(xmiId: "_19_0_4_12e503d9_1665443500960_5561_723", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[Implements(implementation: "IElement.IsLibraryElement")]
public bool isLibraryElement => this.ComputeIsLibraryElement();
/// <summary>
/// The name to be used for this Element during name resolution within its owningNamespace. This is
/// derived using the effectiveName() operation. By default, it is the same as the declaredName, but
/// this is overridden for certain kinds of Elements to compute a name even when the declaredName is
/// null.
/// </summary>
[Property(xmiId: "_19_0_4_12e503d9_1617485009541_709355_27528", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[Implements(implementation: "IElement.Name")]
public string name => this.ComputeName();
/// <summary>
/// The ownedRelationships of this Element that are Annotations, for which this Element is the
/// annotatedElement.
/// </summary>
[Property(xmiId: "_19_0_2_12e503d9_1594152527165_702130_2500", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[SubsettedProperty(propertyName: "_18_5_3_12e503d9_1543092026091_217766_16748")]
[SubsettedProperty(propertyName: "_18_5_3_12e503d9_1543094430277_599480_18543")]
[Implements(implementation: "IElement.OwnedAnnotation")]
public List<IAnnotation> ownedAnnotation => this.ComputeOwnedAnnotation();
/// <summary>
/// The Elements owned by this Element, derived as the ownedRelatedElements of the ownedRelationships of
/// this Element.
/// </summary>
[Property(xmiId: "_18_5_3_12e503d9_1543092869879_112608_17278", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[Implements(implementation: "IElement.OwnedElement")]
public List<IElement> ownedElement => this.ComputeOwnedElement();
/// <summary>
/// The relatedElements of this Relationship that are owned by the Relationship.
/// </summary>
[Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")]
[Implements(implementation: "IRelationship.OwnedRelatedElement")]
public IReadOnlyList<IElement> OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement;
/// <summary>Backing field for IRelationship.OwnedRelatedElement</summary>
ContainerList<IRelationship, IElement> IContainedRelationship.OwnedRelatedElement { get; set; }
/// <summary>
/// The Relationships for which this Element is the owningRelatedElement.
/// </summary>
[Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")]
[Implements(implementation: "IElement.OwnedRelationship")]
public IReadOnlyList<IRelationship> OwnedRelationship => ((IContainedElement)this).OwnedRelationship;
/// <summary>Backing field for IElement.OwnedRelationship</summary>
ContainerList<IElement, IRelationship> IContainedElement.OwnedRelationship { get; set; }
/// <summary>
/// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this
/// Element, if any.
/// </summary>
[Property(xmiId: "_18_5_3_12e503d9_1543092869879_744477_17277", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[Implements(implementation: "IElement.Owner")]
public IElement owner => this.ComputeOwner();
/// <summary>
/// The owningRelationship of this Element, if that Relationship is a Membership.
/// </summary>
[Property(xmiId: "_18_5_3_12e503d9_1533160674972_622493_43236", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674973_469277_43243")]
[SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674986_482273_43303")]
[Implements(implementation: "IElement.OwningMembership")]
public IOwningMembership owningMembership => this.ComputeOwningMembership();
/// <summary>
/// The Namespace that owns this Element, which is the membershipOwningNamespace of the owningMembership
/// of this Element, if any.
/// </summary>
[Property(xmiId: "_18_5_3_12e503d9_1533160674986_474739_43306", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674980_717955_43271")]
[Implements(implementation: "IElement.OwningNamespace")]
public INamespace owningNamespace => this.ComputeOwningNamespace();
/// <summary>
/// The relatedElement of this Relationship that owns the Relationship, if any.
/// </summary>
[Property(xmiId: "_18_5_3_12e503d9_1543092026091_693018_16749", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")]
[Implements(implementation: "IRelationship.OwningRelatedElement")]
public IElement OwningRelatedElement => ((IContainedRelationship)this).OwningRelatedElement;
/// <summary>Backing field for IRelationship.OwningRelatedElement</summary>
IElement IContainedRelationship.OwningRelatedElement { get; set; }
/// <summary>
/// The Relationship for which this Element is an ownedRelatedElement, if any.
/// </summary>
[Property(xmiId: "_18_5_3_12e503d9_1533160674986_482273_43303", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")]
[Implements(implementation: "IElement.OwningRelationship")]
public IRelationship OwningRelationship => ((IContainedElement)this).OwningRelationship;
/// <summary>Backing field for IElement.OwningRelationship</summary>
IRelationship IContainedElement.OwningRelationship { get; set; }
/// <summary>
/// The full ownership-qualified name of this Element, represented in a form that is valid according to
/// the KerML textual concrete syntax for qualified names (including use of unrestricted name notation
/// and escaped characters, as necessary). The qualifiedName is null if this Element has no
/// owningNamespace or if there is not a complete ownership chain of named Namespaces from a root
/// Namespace to this Element. If the owningNamespace has other Elements with the same name as this one,
/// then the qualifiedName is null for all such Elements other than the first.
/// </summary>
[Property(xmiId: "_19_0_4_12e503d9_1611356604987_900871_594", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[Implements(implementation: "IElement.QualifiedName")]
public string qualifiedName => this.ComputeQualifiedName();
/// <summary>
/// The Elements that are related by this Relationship, derived as the union of the source and target
/// Elements of the Relationship.
/// </summary>
[Property(xmiId: "_18_5_3_12e503d9_1533160674961_132339_43177", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: false, defaultValue: null)]
[Implements(implementation: "IRelationship.RelatedElement")]
public List<IElement> relatedElement => this.ComputeRelatedElement();
/// <summary>
/// The short name to be used for this Element during name resolution within its owningNamespace. This
/// is derived using the effectiveShortName() operation. By default, it is the same as the
/// declaredShortName, but this is overridden for certain kinds of Elements to compute a shortName even
/// when the declaredName is null.
/// </summary>
[Property(xmiId: "_19_0_4_12e503d9_1673496405504_544235_24", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[Implements(implementation: "IElement.ShortName")]
public string shortName => this.ComputeShortName();
/// <summary>
/// The relatedElements from which this Relationship is considered to be directed.
/// </summary>
[Property(xmiId: "_18_5_3_12e503d9_1533160674971_696758_43228", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")]
[RedefinedByProperty("IDependency.Client")]
[Implements(implementation: "IRelationship.Source")]
List<IElement> Root.Elements.IRelationship.Source
{
get => [.. this.Client];
set
{
this.Client = value;
}
}
/// <summary>
/// The Element or Elements on which the client Elements depend in some respect.
/// </summary>
[Property(xmiId: "_19_0_2_12e503d9_1594006525044_548771_207", aggregation: AggregationKind.None, lowerValue: 1, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[RedefinedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_138197_43179")]
[Implements(implementation: "IDependency.Supplier")]
public List<IElement> Supplier { get; set; } = [];
/// <summary>
/// The relatedElements to which this Relationship is considered to be directed.
/// </summary>
[Property(xmiId: "_18_5_3_12e503d9_1533160674961_138197_43179", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")]
[RedefinedByProperty("IDependency.Supplier")]
[Implements(implementation: "IRelationship.Target")]
List<IElement> Root.Elements.IRelationship.Target
{
get => [.. this.Supplier];
set
{
this.Supplier = value;
}
}
/// <summary>
/// The TextualRepresentations that annotate this Element.
/// </summary>
[Property(xmiId: "_19_0_2_12e503d9_1594154758493_640290_3388", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: true, defaultValue: null)]
[SubsettedProperty(propertyName: "_19_0_2_12e503d9_1594145755059_76214_87")]
[SubsettedProperty(propertyName: "_18_5_3_12e503d9_1543092869879_112608_17278")]
[Implements(implementation: "IElement.TextualRepresentation")]
public List<ITextualRepresentation> textualRepresentation => this.ComputeTextualRepresentation();
}
}
// ------------------------------------------------------------------------------------------------
// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!--------
// ------------------------------------------------------------------------------------------------