Skip to content

Commit 14805ce

Browse files
wip
1 parent c066b39 commit 14805ce

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1775
-737
lines changed

SysML2.NET.CodeGenerator.Tests/Expected/autoGenPimDto/Branch.cs

Lines changed: 96 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,105 @@
2424

2525
namespace SysML2.NET.PIM.DTO
2626
{
27+
using System;
28+
using System.CodeDom.Compiler;
29+
using System.Collections.Generic;
30+
31+
using SysML2.NET.Common;
32+
using SysML2.NET.Decorators;
33+
2734
/// <summary>
28-
///
2935
/// </summary>
30-
public class Branch : IBranch
36+
[Class(xmiId: "API_Model-Branch", isAbstract: false, isFinalSpecialization: false, isActive: false)]
37+
[GeneratedCode("sysml2.net", "latest")]
38+
public partial class Branch : IBranch
3139
{
32-
40+
/// <summary>
41+
/// Set of ID's that are assigned using legacy or tool specific implementations that don't conform to
42+
/// Kernel Object Lifecycle (KOL) or RFC 4122. For example git's SHA1 hashing id mechanism or historical
43+
/// SysML 1.X ID's
44+
/// </summary>
45+
[Property(xmiId: "API_Model-Record-alias", aggregation: AggregationKind.None, lowerValue: 1, upperValue: int.MaxValue, isOrdered: false, isReadOnly: true, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
46+
[Implements(implementation: "IRecord.Alias")]
47+
public List<string> Alias { get; set; } = [];
48+
49+
/// <summary>
50+
/// </summary>
51+
[Property(xmiId: "API_Model-CommitReference-created", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
52+
[Implements(implementation: "ICommitReference.Created")]
53+
public DateTime Created { get; set; }
54+
55+
/// <summary>
56+
/// </summary>
57+
[Property(xmiId: "API_Model-Record-description", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
58+
[Implements(implementation: "IRecord.Description")]
59+
public string Description { get; set; }
60+
61+
/// <summary>
62+
/// </summary>
63+
[Property(xmiId: "API_Model-Branch-head", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
64+
[RedefinedProperty(propertyName: "API_Model-CommitReference-referencedCommit")]
65+
[Implements(implementation: "IBranch.Head")]
66+
public new Guid Head { get; set; }
67+
68+
/// <summary>
69+
/// Uniqueness constraints?
70+
/// </summary>
71+
[Property(xmiId: "API_Model-Record-humanIdentifier", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: true, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
72+
[SubsettedProperty(propertyName: "API_Model-Record-alias")]
73+
[Implements(implementation: "IRecord.HumanIdentifier")]
74+
public string HumanIdentifier { get; set; }
75+
76+
/// <summary>
77+
/// Every Record shall have a calculated globally unique identifier. This identifier shall conform to
78+
/// RFC 4122.
79+
/// </summary>
80+
[Property(xmiId: "API_Model-Record-id", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: true, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
81+
[Implements(implementation: "IRecord.Id")]
82+
public Guid Id { get; set; }
83+
84+
/// <summary>
85+
/// </summary>
86+
[Property(xmiId: "API_Model-CommitReference-name", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
87+
[Implements(implementation: "ICommitReference.Name")]
88+
public string Name { get; set; }
89+
90+
/// <summary>
91+
/// </summary>
92+
[Property(xmiId: "API_Model-Branch-owningProject", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
93+
[RedefinedProperty(propertyName: "API_Model-CommitReference-owningProject")]
94+
[Implements(implementation: "IBranch.OwningProject")]
95+
public new Guid OwningProject { get; set; }
96+
97+
/// <summary>
98+
/// </summary>
99+
[Property(xmiId: "API_Model-CommitReference-owningProject", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
100+
[RedefinedByProperty("IBranch.OwningProject")]
101+
[Implements(implementation: "ICommitReference.OwningProject")]
102+
Guid ICommitReference.OwningProject
103+
{
104+
get => throw new InvalidOperationException("Redefined by property IBranch.OwningProject");
105+
set => throw new InvalidOperationException("Redefined by property IBranch.OwningProject");
106+
}
107+
108+
/// <summary>
109+
/// </summary>
110+
[Property(xmiId: "API_Model-CommitReference-referencedCommit", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
111+
[RedefinedByProperty("IBranch.Head")]
112+
[Implements(implementation: "ICommitReference.ReferencedCommit")]
113+
Guid ICommitReference.ReferencedCommit
114+
{
115+
get => throw new InvalidOperationException("Redefined by property IBranch.Head");
116+
set => throw new InvalidOperationException("Redefined by property IBranch.Head");
117+
}
118+
119+
/// <summary>
120+
/// The context specific URI from which the data represented in LinkedDataRecord's can be retrieved
121+
/// </summary>
122+
[Property(xmiId: "API_Model-Record-resourceIdentifier", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
123+
[Implements(implementation: "IRecord.ResourceIdentifier")]
124+
public Uri ResourceIdentifier { get; set; }
125+
33126
}
34127
}
35128

SysML2.NET.CodeGenerator.Tests/Expected/autoGenPimDto/Commit.cs

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,88 @@
2424

2525
namespace SysML2.NET.PIM.DTO
2626
{
27+
using System;
28+
using System.CodeDom.Compiler;
29+
using System.Collections.Generic;
30+
31+
using SysML2.NET.Core;
32+
using SysML2.NET.Decorators;
33+
2734
/// <summary>
2835
/// A record of changes made to ElementRecord's within a particular Branch of a Resource
2936
/// </summary>
30-
public class Commit : ICommit
37+
[Class(xmiId: "_19_0_2_12e503d9_1577820468971_790808_65979", isAbstract: false, isFinalSpecialization: false, isActive: false)]
38+
[GeneratedCode("sysml2.net", "latest")]
39+
public partial class Commit : ICommit
3140
{
32-
41+
/// <summary>
42+
/// Set of ID's that are assigned using legacy or tool specific implementations that don't conform to
43+
/// Kernel Object Lifecycle (KOL) or RFC 4122. For example git's SHA1 hashing id mechanism or historical
44+
/// SysML 1.X ID's
45+
/// </summary>
46+
[Property(xmiId: "_19_0_2_12e503d9_1577820469740_197983_66089", aggregation: AggregationKind.None, lowerValue: 1, upperValue: int.MaxValue, isOrdered: false, isReadOnly: true, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
47+
[Implements(implementation: "IRecord.Alias")]
48+
public List<string> Alias { get; set; } = [];
49+
50+
/// <summary>
51+
/// </summary>
52+
[Property(xmiId: "_19_0_2_12e503d9_1577820469724_226337_66058", aggregation: AggregationKind.None, lowerValue: 1, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
53+
[Implements(implementation: "ICommit.Change")]
54+
public List<Guid> Change { get; set; } = [];
55+
56+
/// <summary>
57+
/// </summary>
58+
[Property(xmiId: "_19_0_2_12e503d9_1577820469727_54677_66063", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
59+
[Implements(implementation: "ICommit.Created")]
60+
public DateTime Created { get; set; }
61+
62+
/// <summary>
63+
/// </summary>
64+
[Property(xmiId: "_19_0_4_58901f1_1629741832147_14565_28133", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
65+
[Implements(implementation: "IRecord.Description")]
66+
public string Description { get; set; }
67+
68+
/// <summary>
69+
/// Uniqueness constraints?
70+
/// </summary>
71+
[Property(xmiId: "_19_0_2_12e503d9_1577820469741_716007_66090", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: true, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
72+
[SubsettedProperty(propertyName: "_19_0_2_12e503d9_1577820469740_197983_66089")]
73+
[Implements(implementation: "IRecord.HumanIdentifier")]
74+
public string HumanIdentifier { get; set; }
75+
76+
/// <summary>
77+
/// Every Record shall have a calculated globally unique identifier. This identifier shall conform to
78+
/// RFC 4122.
79+
/// </summary>
80+
[Property(xmiId: "_19_0_2_12e503d9_1577820469739_885136_66087", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: true, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
81+
[Implements(implementation: "IRecord.Id")]
82+
public Guid Id { get; set; }
83+
84+
/// <summary>
85+
/// </summary>
86+
[Property(xmiId: "_19_0_2_12e503d9_1577820469728_610810_66065", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
87+
[Implements(implementation: "ICommit.OwningProject")]
88+
public Guid OwningProject { get; set; }
89+
90+
/// <summary>
91+
/// </summary>
92+
[Property(xmiId: "_19_0_2_12e503d9_1577820469727_74119_66064", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
93+
[Implements(implementation: "ICommit.PreviousCommits")]
94+
public List<Guid> PreviousCommits { get; set; } = [];
95+
96+
/// <summary>
97+
/// The context specific URI from which the data represented in LinkedDataRecord's can be retrieved
98+
/// </summary>
99+
[Property(xmiId: "_19_0_2_12e503d9_1577820469740_90190_66088", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
100+
[Implements(implementation: "IRecord.ResourceIdentifier")]
101+
public Uri ResourceIdentifier { get; set; }
102+
103+
/// <summary>
104+
/// </summary>
105+
[Property(xmiId: "_19_0_4_58901f1_1629496059367_814933_41", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: false, defaultValue: null)]
106+
[Implements(implementation: "ICommit.VersionedData")]
107+
public List<Guid> VersionedData { get; } = [];
108+
33109
}
34110
}
35111

SysML2.NET.CodeGenerator.Tests/Expected/autoGenPimDto/CompositeConstraint.cs

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,31 @@
2424

2525
namespace SysML2.NET.PIM.DTO
2626
{
27+
using System;
28+
using System.CodeDom.Compiler;
29+
using System.Collections.Generic;
30+
31+
using SysML2.NET.Core;
32+
using SysML2.NET.Decorators;
33+
2734
/// <summary>
28-
///
2935
/// </summary>
30-
public class CompositeConstraint : ICompositeConstraint
36+
[Class(xmiId: "_19_0_4_58901f1_1597377170613_382290_372", isAbstract: false, isFinalSpecialization: false, isActive: false)]
37+
[GeneratedCode("sysml2.net", "latest")]
38+
public partial class CompositeConstraint : ICompositeConstraint
3139
{
32-
40+
/// <summary>
41+
/// </summary>
42+
[Property(xmiId: "_19_0_4_58901f1_1597377207847_92212_477", aggregation: AggregationKind.Composite, lowerValue: 2, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
43+
[Implements(implementation: "ICompositeConstraint.Constraint")]
44+
public List<Guid> Constraint { get; set; } = [];
45+
46+
/// <summary>
47+
/// </summary>
48+
[Property(xmiId: "_19_0_4_58901f1_1597377244778_333596_491", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
49+
[Implements(implementation: "ICompositeConstraint.Operator")]
50+
public JoinOperator Operator { get; set; }
51+
3352
}
3453
}
3554

SysML2.NET.CodeGenerator.Tests/Expected/autoGenPimDto/DataDifference.cs

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,31 @@
2424

2525
namespace SysML2.NET.PIM.DTO
2626
{
27+
using System;
28+
using System.CodeDom.Compiler;
29+
using System.Collections.Generic;
30+
31+
using SysML2.NET.Core;
32+
using SysML2.NET.Decorators;
33+
2734
/// <summary>
28-
///
2935
/// </summary>
30-
public class DataDifference : IDataDifference
36+
[Class(xmiId: "_19_0_4_58901f1_1667597371888_316451_135", isAbstract: false, isFinalSpecialization: false, isActive: false)]
37+
[GeneratedCode("sysml2.net", "latest")]
38+
public partial class DataDifference : IDataDifference
3139
{
32-
40+
/// <summary>
41+
/// </summary>
42+
[Property(xmiId: "_19_0_4_58901f1_1667597388218_19169_136", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
43+
[Implements(implementation: "IDataDifference.BaseData")]
44+
public Guid BaseData { get; set; }
45+
46+
/// <summary>
47+
/// </summary>
48+
[Property(xmiId: "_19_0_4_58901f1_1667597418425_384059_139", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
49+
[Implements(implementation: "IDataDifference.CompareData")]
50+
public Guid CompareData { get; set; }
51+
3352
}
3453
}
3554

SysML2.NET.CodeGenerator.Tests/Expected/autoGenPimDto/DataVersion.cs

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,75 @@
2424

2525
namespace SysML2.NET.PIM.DTO
2626
{
27+
using System;
28+
using System.CodeDom.Compiler;
29+
using System.Collections.Generic;
30+
31+
using SysML2.NET.Core;
32+
using SysML2.NET.Decorators;
33+
2734
/// <summary>
28-
///
2935
/// </summary>
30-
public class DataVersion : IDataVersion
36+
[Class(xmiId: "_19_0_2_12e503d9_1577820468972_486874_65981", isAbstract: false, isFinalSpecialization: false, isActive: false)]
37+
[GeneratedCode("sysml2.net", "latest")]
38+
public partial class DataVersion : IDataVersion
3139
{
32-
40+
/// <summary>
41+
/// Set of ID's that are assigned using legacy or tool specific implementations that don't conform to
42+
/// Kernel Object Lifecycle (KOL) or RFC 4122. For example git's SHA1 hashing id mechanism or historical
43+
/// SysML 1.X ID's
44+
/// </summary>
45+
[Property(xmiId: "_19_0_2_12e503d9_1577820469740_197983_66089", aggregation: AggregationKind.None, lowerValue: 1, upperValue: int.MaxValue, isOrdered: false, isReadOnly: true, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
46+
[Implements(implementation: "IRecord.Alias")]
47+
public List<string> Alias { get; set; } = [];
48+
49+
/// <summary>
50+
/// </summary>
51+
[Property(xmiId: "_19_0_2_12e503d9_1577820469725_462619_66059", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
52+
[Implements(implementation: "IDataVersion.Commit")]
53+
public Guid Commit { get; set; }
54+
55+
/// <summary>
56+
/// </summary>
57+
[Property(xmiId: "_19_0_4_58901f1_1629741832147_14565_28133", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
58+
[Implements(implementation: "IRecord.Description")]
59+
public string Description { get; set; }
60+
61+
/// <summary>
62+
/// Uniqueness constraints?
63+
/// </summary>
64+
[Property(xmiId: "_19_0_2_12e503d9_1577820469741_716007_66090", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: true, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
65+
[SubsettedProperty(propertyName: "_19_0_2_12e503d9_1577820469740_197983_66089")]
66+
[Implements(implementation: "IRecord.HumanIdentifier")]
67+
public string HumanIdentifier { get; set; }
68+
69+
/// <summary>
70+
/// Every Record shall have a calculated globally unique identifier. This identifier shall conform to
71+
/// RFC 4122.
72+
/// </summary>
73+
[Property(xmiId: "_19_0_2_12e503d9_1577820469739_885136_66087", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: true, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
74+
[Implements(implementation: "IRecord.Id")]
75+
public Guid Id { get; set; }
76+
77+
/// <summary>
78+
/// </summary>
79+
[Property(xmiId: "_19_0_2_12e503d9_1577820469729_652900_66067", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
80+
[Implements(implementation: "IDataVersion.Identity")]
81+
public Guid Identity { get; set; }
82+
83+
/// <summary>
84+
/// </summary>
85+
[Property(xmiId: "_19_0_2_12e503d9_1577820469731_381637_66070", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
86+
[Implements(implementation: "IDataVersion.Payload")]
87+
public Guid Payload { get; set; }
88+
89+
/// <summary>
90+
/// The context specific URI from which the data represented in LinkedDataRecord's can be retrieved
91+
/// </summary>
92+
[Property(xmiId: "_19_0_2_12e503d9_1577820469740_90190_66088", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
93+
[Implements(implementation: "IRecord.ResourceIdentifier")]
94+
public Uri ResourceIdentifier { get; set; }
95+
3396
}
3497
}
3598

SysML2.NET.CodeGenerator.Tests/Expected/autoGenPimDto/ExternalData.cs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,25 @@
2424

2525
namespace SysML2.NET.PIM.DTO
2626
{
27+
using System;
28+
using System.CodeDom.Compiler;
29+
using System.Collections.Generic;
30+
31+
using SysML2.NET.Core;
32+
using SysML2.NET.Decorators;
33+
2734
/// <summary>
28-
///
2935
/// </summary>
30-
public class ExternalData : IExternalData
36+
[Class(xmiId: "_19_0_2_58901f1_1596536258540_797744_1918", isAbstract: false, isFinalSpecialization: false, isActive: false)]
37+
[GeneratedCode("sysml2.net", "latest")]
38+
public partial class ExternalData : IExternalData
3139
{
32-
40+
/// <summary>
41+
/// </summary>
42+
[Property(xmiId: "_19_0_2_8bf0285_1596606723805_618012_132", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: false, defaultValue: null)]
43+
[Implements(implementation: "IExternalData.ResourceIdentifier")]
44+
public Uri ResourceIdentifier { get; set; }
45+
3346
}
3447
}
3548

SysML2.NET.CodeGenerator.Tests/Expected/autoGenPimDto/IBranch.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ namespace SysML2.NET.PIM.DTO
2828
using System.CodeDom.Compiler;
2929
using System.Collections.Generic;
3030

31+
using SysML2.NET.Common;
3132
using SysML2.NET.Decorators;
3233

3334
/// <summary>

0 commit comments

Comments
 (0)