From 5551fbc6140be257b973a714f53bdda63f32ce5d Mon Sep 17 00:00:00 2001 From: atheate Date: Fri, 9 Oct 2026 11:58:24 +0200 Subject: [PATCH 1/2] Fix #388 --- .../ApiSerializerTestFixture.cs | 12 +++---- .../DeSerializerTestFixture.cs | 36 +++++++++++++++++-- .../PIM/CommitDeSerializer.cs | 19 +++++----- .../PIM/CommitSerializer.cs | 14 ++++++-- SysML2.NET/PIM/DTO/Branch.cs | 5 ++- SysML2.NET/PIM/DTO/Commit.cs | 32 ++++++++++++++--- SysML2.NET/PIM/DTO/CommitReference.cs | 6 ++++ SysML2.NET/PIM/DTO/CompositeConstraint.cs | 6 +++- SysML2.NET/PIM/DTO/DataDifference.cs | 4 +++ SysML2.NET/PIM/DTO/DataVersion.cs | 18 +++++++++- SysML2.NET/PIM/DTO/ExternalData.cs | 3 ++ SysML2.NET/PIM/DTO/ExternalRelationship.cs | 6 ++++ SysML2.NET/PIM/DTO/MergeResult.cs | 4 +++ SysML2.NET/PIM/DTO/PrimitiveConstraint.cs | 10 ++++-- SysML2.NET/PIM/DTO/Project.cs | 33 ++++++++++++++++- SysML2.NET/PIM/DTO/ProjectUsage.cs | 4 +++ SysML2.NET/PIM/DTO/Query.cs | 22 ++++++++++++ SysML2.NET/PIM/DTO/Tag.cs | 3 ++ SysML2.NET/PIM/POCO/Branch.cs | 5 ++- SysML2.NET/PIM/POCO/Commit.cs | 13 +++++-- SysML2.NET/PIM/POCO/CommitReference.cs | 9 ++++- SysML2.NET/PIM/POCO/CompositeConstraint.cs | 6 +++- SysML2.NET/PIM/POCO/DataDifference.cs | 3 ++ SysML2.NET/PIM/POCO/DataIdentity.cs | 5 ++- SysML2.NET/PIM/POCO/DataVersion.cs | 15 ++++++-- SysML2.NET/PIM/POCO/ExternalData.cs | 3 ++ SysML2.NET/PIM/POCO/ExternalRelationship.cs | 6 ++++ SysML2.NET/PIM/POCO/MergeResult.cs | 4 +++ SysML2.NET/PIM/POCO/PrimitiveConstraint.cs | 10 ++++-- SysML2.NET/PIM/POCO/Project.cs | 28 +++++++++++---- SysML2.NET/PIM/POCO/ProjectUsage.cs | 4 +++ SysML2.NET/PIM/POCO/Query.cs | 15 +++++++- SysML2.NET/PIM/POCO/Tag.cs | 3 ++ SysML2.NET/PIM/Record.cs | 17 ++++++--- 34 files changed, 328 insertions(+), 55 deletions(-) diff --git a/SysML2.NET.Serializer.Json.Tests/ApiSerializerTestFixture.cs b/SysML2.NET.Serializer.Json.Tests/ApiSerializerTestFixture.cs index da6673267..e8a6bd10e 100644 --- a/SysML2.NET.Serializer.Json.Tests/ApiSerializerTestFixture.cs +++ b/SysML2.NET.Serializer.Json.Tests/ApiSerializerTestFixture.cs @@ -1,20 +1,20 @@ // ------------------------------------------------------------------------------------------------- // -// +// // Copyright 2022-2025 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. -// +// // // ------------------------------------------------------------------------------------------------ @@ -73,7 +73,7 @@ private void CreateTestData() Created = new DateTime(1976, 8, 20, 0, 0, 0, DateTimeKind.Utc), Description = "", OwningProject = Guid.Parse("9b0e1914-3241-461e-b9ee-a3ff5120de4e"), - PreviousCommit = Guid.Empty, + PreviousCommits = [Guid.Parse("8d3c3f31-2b2f-4f4b-8f35-6b2e0f4a4a11")], ResourceIdentifier = "http://www.stariongroup.eu/commit", }; diff --git a/SysML2.NET.Serializer.Json.Tests/DeSerializerTestFixture.cs b/SysML2.NET.Serializer.Json.Tests/DeSerializerTestFixture.cs index ffe351f42..57ba1154f 100644 --- a/SysML2.NET.Serializer.Json.Tests/DeSerializerTestFixture.cs +++ b/SysML2.NET.Serializer.Json.Tests/DeSerializerTestFixture.cs @@ -64,6 +64,20 @@ public class DeSerializerTestFixture /// private const int LargePayloadElementCount = 4000; + /// + /// A merge commit json object that names two immediately preceding commits + /// + private const string MergeCommit = """[{"@id":"6d7ad9fd-6520-4ff2-885b-8c5c129e6c27","@type":"Commit","created":"2023-03-13T17:53:59.111354-04:00","description":null,"owningProject":{"@id":"000e9890-6935-43e6-a5d7-5d7cac601f4c"},"previousCommit":[{"@id":"1e4c2a06-0f2f-4a3c-9d64-0f4b2f6d9a11"},{"@id":"2b7d5e18-6a4f-4d1e-8c32-7d5a1c8e4b22"}]}]"""; + + /// + /// The identifiers that the payload names as preceding commits + /// + private static readonly Guid[] MergeCommitPredecessors = + [ + Guid.Parse("1e4c2a06-0f2f-4a3c-9d64-0f4b2f6d9a11"), + Guid.Parse("2b7d5e18-6a4f-4d1e-8c32-7d5a1c8e4b22") + ]; + private DeSerializer deSerializer; [SetUp] @@ -209,7 +223,7 @@ public void Verify_that_particular_project_and_commits_from_restapi_json_can_be_ using (Assert.EnterMultipleScope()) { Assert.That(firstCommit.OwningProject, Is.EqualTo(Guid.Parse("000e9890-6935-43e6-a5d7-5d7cac601f4c"))); - Assert.That(firstCommit.PreviousCommit, Is.EqualTo(Guid.Empty)); + Assert.That(firstCommit.PreviousCommits, Has.Count.EqualTo(0)); Assert.That(firstCommit.Description, Is.Null); Assert.That(firstCommit.Created, Is.EqualTo(DateTime.Parse("2023-03-13T17:53:59.111354-04:00", CultureInfo.InvariantCulture))); } @@ -232,12 +246,30 @@ public void Verify_that_particular_project_and_particular_commit_from_restapi_js using (Assert.EnterMultipleScope()) { Assert.That(firstCommit.OwningProject, Is.EqualTo(Guid.Parse("000e9890-6935-43e6-a5d7-5d7cac601f4c"))); - Assert.That(firstCommit.PreviousCommit, Is.EqualTo(Guid.Empty)); + Assert.That(firstCommit.PreviousCommits, Has.Count.EqualTo(0)); Assert.That(firstCommit.Description, Is.Null); Assert.That(firstCommit.Created, Is.EqualTo(DateTime.Parse("2023-03-13T17:53:59.111354-04:00", CultureInfo.InvariantCulture))); } } + [Test] + [TestCase(false)] + [TestCase(true)] + public void Verify_that_a_merge_commit_from_restapi_json_can_be_deserialized(bool shouldDeserializeDerivedProperties) + { + using var stream = new MemoryStream(Encoding.UTF8.GetBytes(MergeCommit)); + + var data = this.deSerializer.DeSerialize(stream, SerializationModeKind.JSON, SerializationTargetKind.PSM, shouldDeserializeDerivedProperties); + + var mergeCommit = data.OfType().Single(); + + using (Assert.EnterMultipleScope()) + { + Assert.That(mergeCommit.PreviousCommits, Is.EqualTo(MergeCommitPredecessors)); + Assert.That(mergeCommit.OwningProject, Is.EqualTo(Guid.Parse("000e9890-6935-43e6-a5d7-5d7cac601f4c"))); + } + } + [Test] [TestCase(false)] [TestCase(true)] diff --git a/SysML2.NET.Serializer.Json/PIM/CommitDeSerializer.cs b/SysML2.NET.Serializer.Json/PIM/CommitDeSerializer.cs index 62d99b6ba..d0b3f9d7e 100644 --- a/SysML2.NET.Serializer.Json/PIM/CommitDeSerializer.cs +++ b/SysML2.NET.Serializer.Json/PIM/CommitDeSerializer.cs @@ -145,18 +145,17 @@ internal static Commit DeSerialize(JsonElement jsonElement, SerializationModeKin if (jsonElement.TryGetProperty("previousCommit"u8, out JsonElement previousCommitProperty)) { - if (previousCommitProperty.ValueKind == JsonValueKind.Null) + if (previousCommitProperty.ValueKind == JsonValueKind.Array) { - dtoInstance.PreviousCommit = Guid.Empty; - } - else - { - if (previousCommitProperty.TryGetProperty("@id"u8, out JsonElement previousCommitPropertyIdProperty)) + foreach (var previousCommitItem in previousCommitProperty.EnumerateArray()) { - var propertyValue = previousCommitPropertyIdProperty.GetString(); - if (propertyValue != null) + if (previousCommitItem.TryGetProperty("@id"u8, out JsonElement previousCommitItemIdProperty)) { - dtoInstance.PreviousCommit = Guid.Parse(propertyValue); + var propertyValue = previousCommitItemIdProperty.GetString(); + if (propertyValue != null) + { + dtoInstance.PreviousCommits.Add(Guid.Parse(propertyValue)); + } } } } @@ -165,7 +164,7 @@ internal static Commit DeSerialize(JsonElement jsonElement, SerializationModeKin { if (logger.IsEnabled(LogLevel.Debug)) { - logger.LogDebug("the owningProject Json property was not found in the Commit: {Id}", dtoInstance.Id); + logger.LogDebug("the previousCommit Json property was not found in the Commit: {Id}", dtoInstance.Id); } } diff --git a/SysML2.NET.Serializer.Json/PIM/CommitSerializer.cs b/SysML2.NET.Serializer.Json/PIM/CommitSerializer.cs index 53405053c..8b6528f9c 100644 --- a/SysML2.NET.Serializer.Json/PIM/CommitSerializer.cs +++ b/SysML2.NET.Serializer.Json/PIM/CommitSerializer.cs @@ -75,9 +75,17 @@ internal static void Serialize(object obj, Utf8JsonWriter writer, SerializationM writer.WriteString("@id"u8, commit.OwningProject); writer.WriteEndObject(); writer.WriteString("resourceIdentifier"u8, commit.ResourceIdentifier); - writer.WriteStartObject("previousCommit"u8); - writer.WriteString("@id"u8, commit.PreviousCommit); - writer.WriteEndObject(); + writer.WriteStartArray("previousCommit"u8); + if (commit.PreviousCommits != null) + { + foreach (var item in commit.PreviousCommits) + { + writer.WriteStartObject(); + writer.WriteString("@id"u8, item); + writer.WriteEndObject(); + } + } + writer.WriteEndArray(); writer.WriteEndObject(); break; diff --git a/SysML2.NET/PIM/DTO/Branch.cs b/SysML2.NET/PIM/DTO/Branch.cs index ca048e762..244d3ec92 100644 --- a/SysML2.NET/PIM/DTO/Branch.cs +++ b/SysML2.NET/PIM/DTO/Branch.cs @@ -22,10 +22,12 @@ namespace SysML2.NET.PIM.DTO { using System; + using SysML2.NET.Decorators; + /// /// A is a type of CommitReference. A is a pointer to a (Branch.head). /// The history of a on a given branch can be computed by recursively navigating - /// , starting from the head of the (Branch.head) + /// , starting from the head of the (Branch.head) /// public class Branch : CommitReference { @@ -33,6 +35,7 @@ public class Branch : CommitReference /// Gets or sets the commit to which the branch is currently pointing. It represents the latest state of the /// on the given branch /// + [Property(lowerValue: 1, upperValue: 1)] public Guid Head { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/Commit.cs b/SysML2.NET/PIM/DTO/Commit.cs index cc4cd9f25..5e0f144bc 100644 --- a/SysML2.NET/PIM/DTO/Commit.cs +++ b/SysML2.NET/PIM/DTO/Commit.cs @@ -23,6 +23,7 @@ namespace SysML2.NET.PIM.DTO using System; using System.Collections.Generic; + using SysML2.NET.Decorators; using SysML2.NET.PIM; /// @@ -31,9 +32,9 @@ namespace SysML2.NET.PIM.DTO /// a . A has 0 or more s /// /// - /// s are immutable. For a given record, the value of change + /// s are immutable. For a given record, the value of /// cannot be modified after a has been created. If a modification is required, a new - /// record can be created with a different value of change. + /// record can be created with a different value of . /// s are not destructible1. A record cannot be deleted during normal /// end-user operation. s represent the history and evolution of a . /// Deleting and mutating records must be disabled for the normal end-user operations @@ -44,16 +45,39 @@ public class Commit : Record /// /// Gets or sets the timestamp at which the was created /// + [Property(lowerValue: 1, upperValue: 1)] public DateTime Created { get; set; } /// /// Gets or sets the that owns the . /// + [Property(lowerValue: 1, upperValue: 1)] public Guid OwningProject { get; set; } /// - /// Gets or sets the immediately preceding s + /// Gets or sets the set of immediately preceding s /// - public Guid PreviousCommit { get; set; } + [Property(lowerValue: 0, upperValue: int.MaxValue)] + public List PreviousCommits { get; set; } = []; + + /// + /// Gets or sets the set of records representing data that is created, updated, + /// or deleted in the + /// + /// + /// A deletion is recorded by a whose payload is null. + /// + [Property(lowerValue: 1, upperValue: int.MaxValue)] + public List Change { get; set; } = []; + + /// + /// Gets or sets the set of cumulative records in a at the + /// + /// + /// Derived by Systems Modeling API and Services, Clause 7.1.2 from and the + /// versioned data of . + /// + [Property(lowerValue: 0, upperValue: int.MaxValue, isDerived: true)] + public List VersionedData { get; set; } = []; } } diff --git a/SysML2.NET/PIM/DTO/CommitReference.cs b/SysML2.NET/PIM/DTO/CommitReference.cs index a12e5bba5..5e4b80ad4 100644 --- a/SysML2.NET/PIM/DTO/CommitReference.cs +++ b/SysML2.NET/PIM/DTO/CommitReference.cs @@ -23,6 +23,7 @@ namespace SysML2.NET.PIM.DTO using System; using SysML2.NET.Common; + using SysML2.NET.Decorators; /// /// An abstract subclass of that references a specific (Commit Reference.referencedCommit). Project.commit is the set of all the Commit records for a given Project. @@ -34,21 +35,26 @@ public abstract class CommitReference : Record /// /// Gets or sets the timestamp at which the was created. /// + [Property(lowerValue: 1, upperValue: 1)] public DateTime Created { get; set; } /// /// Gets or sets the timestamp at which the was deleted /// + [Property(lowerValue: 1, upperValue: 1)] public DateTime Deleted { get; set; } /// /// Gets or sets the Project that owns the given /// + [Property(lowerValue: 1, upperValue: 1)] public Guid OwningProject { get; set; } /// /// Gets or sets the name of the /// + [Property(lowerValue: 1, upperValue: 1)] + [RedefinedProperty(propertyName: "Record.Name")] public new string Name { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/CompositeConstraint.cs b/SysML2.NET/PIM/DTO/CompositeConstraint.cs index 7f01a7a11..c1398dbe2 100644 --- a/SysML2.NET/PIM/DTO/CompositeConstraint.cs +++ b/SysML2.NET/PIM/DTO/CompositeConstraint.cs @@ -22,8 +22,10 @@ namespace SysML2.NET.PIM.DTO { using System.Collections.Generic; + using SysML2.NET.Decorators; + /// - /// a subtype of that represents complex conditions composed of two or more + /// a concrete subtype of that represents complex conditions composed of two or more /// s or s using logical AND or OR operators /// public class CompositeConstraint : Constraint @@ -34,11 +36,13 @@ public class CompositeConstraint : Constraint /// /// There must be at least 2 /// + [Property(lowerValue: 2, upperValue: int.MaxValue)] public List Constraint { get; set; } = []; /// /// Gets or sets the logical operator for composing the s /// + [Property(lowerValue: 1, upperValue: 1)] public JoinOperator Operator { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/DataDifference.cs b/SysML2.NET/PIM/DTO/DataDifference.cs index a766e11c4..6edaf8ea8 100644 --- a/SysML2.NET/PIM/DTO/DataDifference.cs +++ b/SysML2.NET/PIM/DTO/DataDifference.cs @@ -22,6 +22,8 @@ namespace SysML2.NET.PIM.DTO { using System; + using SysML2.NET.Decorators; + /// /// Represents a single difference between two compared versions of the same /// @@ -30,11 +32,13 @@ public class DataDifference /// /// Gets or sets the taken as the baseline of the comparison, or null when the data was added /// + [Property(lowerValue: 0, upperValue: 1)] public Guid? BaseData { get; set; } /// /// Gets or sets the compared against the baseline, or null when the data was deleted /// + [Property(lowerValue: 0, upperValue: 1)] public Guid? CompareData { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/DataVersion.cs b/SysML2.NET/PIM/DTO/DataVersion.cs index a8f2250e1..7b1c3e169 100644 --- a/SysML2.NET/PIM/DTO/DataVersion.cs +++ b/SysML2.NET/PIM/DTO/DataVersion.cs @@ -23,6 +23,7 @@ namespace SysML2.NET.PIM.DTO using System; using SysML2.NET.Common; + using SysML2.NET.Decorators; /// /// A subclass of that represents at a specific version in its lifecycle. @@ -32,18 +33,33 @@ namespace SysML2.NET.PIM.DTO public class DataVersion : Record { /// - /// Gets or sets the at which the wrapped data (payload) was created, modified, or deleted. + /// Gets or sets the at which the wrapped data (payload) was created, modified, or deleted. /// + [Property(lowerValue: 1, upperValue: 1)] public Guid Commit { get; set; } + /// + /// Gets or sets the that owns the + /// + /// + /// Derived by Systems Modeling API and Services, Clause 7.1.2 from the owning project of . + /// + [Property(lowerValue: 1, upperValue: 1, isDerived: true)] + public Guid Project { get; set; } + /// /// Gets or sets the contained /// + [Property(lowerValue: 1, upperValue: 1)] public DataIdentity Identity { get; set; } /// /// Gets or sets the that is the payload /// + /// + /// null when no data with the given identity is present at the . + /// + [Property(lowerValue: 0, upperValue: 1)] public IData Payload { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/ExternalData.cs b/SysML2.NET/PIM/DTO/ExternalData.cs index bfeea1909..cbbe69ba5 100644 --- a/SysML2.NET/PIM/DTO/ExternalData.cs +++ b/SysML2.NET/PIM/DTO/ExternalData.cs @@ -23,6 +23,7 @@ namespace SysML2.NET.PIM.DTO using System; using SysML2.NET.Common; + using SysML2.NET.Decorators; /// /// ExternalData is a realization of Data, and represents a resource external to a given tool or @@ -33,11 +34,13 @@ public class ExternalData : IData /// /// Gets or sets the unique identifier /// + [Property(lowerValue: 1, upperValue: 1, isReadOnly: true)] public Guid Id { get; set; } /// /// Gets or sets the string representation of the IRI of the resource represented by the ExternalData /// + [Property(lowerValue: 1, upperValue: 1)] public string ResourceIdentifier { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/ExternalRelationship.cs b/SysML2.NET/PIM/DTO/ExternalRelationship.cs index 959cf816e..413bb2734 100644 --- a/SysML2.NET/PIM/DTO/ExternalRelationship.cs +++ b/SysML2.NET/PIM/DTO/ExternalRelationship.cs @@ -23,6 +23,7 @@ namespace SysML2.NET.PIM.DTO using System; using SysML2.NET.Common; + using SysML2.NET.Decorators; /// /// ExternalRelationship is a realization of Data, and represents the relationship between a @@ -35,6 +36,7 @@ public class ExternalRelationship : IData /// /// Gets or sets the unique identifier /// + [Property(lowerValue: 1, upperValue: 1)] public Guid Id { get; set; } /// @@ -44,21 +46,25 @@ public class ExternalRelationship : IData /// would contain mathematical expressions, such as equations, representing the mapping.This is an optional /// attribute. /// + [Property(lowerValue: 0, upperValue: 1)] public string Specification { get; set; } /// /// Gets or sets the name of the expression language used for the specification. This is an optional attribute. /// + [Property(lowerValue: 0, upperValue: 1)] public string Language { get; set; } /// /// Gets or sets the /// + [Property(lowerValue: 1, upperValue: 1)] public Guid ElementEnd { get; set; } /// /// Gets or sets the /// + [Property(lowerValue: 1, upperValue: 1)] public Guid ExternalDataEnd { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/MergeResult.cs b/SysML2.NET/PIM/DTO/MergeResult.cs index 4ccde2c02..3550aba8a 100644 --- a/SysML2.NET/PIM/DTO/MergeResult.cs +++ b/SysML2.NET/PIM/DTO/MergeResult.cs @@ -23,6 +23,8 @@ namespace SysML2.NET.PIM.DTO using System; using System.Collections.Generic; + using SysML2.NET.Decorators; + /// /// Represents the outcome of merging one into another /// @@ -31,11 +33,13 @@ public class MergeResult /// /// Gets or sets the records that could not be merged automatically /// + [Property(lowerValue: 0, upperValue: int.MaxValue)] public List Conflict { get; set; } = []; /// /// Gets or sets the that records the merge /// + [Property(lowerValue: 0, upperValue: 1)] public Guid MergeCommit { get; set; } } } \ No newline at end of file diff --git a/SysML2.NET/PIM/DTO/PrimitiveConstraint.cs b/SysML2.NET/PIM/DTO/PrimitiveConstraint.cs index f1de4a81a..8c0978d3b 100644 --- a/SysML2.NET/PIM/DTO/PrimitiveConstraint.cs +++ b/SysML2.NET/PIM/DTO/PrimitiveConstraint.cs @@ -22,30 +22,36 @@ namespace SysML2.NET.PIM.DTO { using System.Collections.Generic; + using SysML2.NET.Decorators; + /// - /// a subtype of Constraint that represents simple conditions that be modeled using the + /// a concrete subtype of that represents simple conditions that be modeled using the /// property-operator -value tuple. e.g. mass <= 4 kg, or type instanceOf Generalization /// - public class PrimitiveConstraint + public class PrimitiveConstraint : Constraint { /// /// Gets or sets the name of a property of Element or its subtypes that is being constrained /// + [Property(lowerValue: 1, upperValue: 1)] public string Property { get; set; } /// /// Gets or sets the mathematical operators /// + [Property(lowerValue: 1, upperValue: 1)] public Operator Operator { get; set; } /// /// Gets or sets list of primitive objects, such as String, Boolean, Integer, Double, and UUID /// + [Property(lowerValue: 1, upperValue: int.MaxValue)] public List Value { get; set;} = []; /// /// Gets or sets a value indicating a logical NOT operator is applied to the /// + [Property(lowerValue: 1, upperValue: 1)] public bool Inverse { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/Project.cs b/SysML2.NET/PIM/DTO/Project.cs index f85036624..5c5484b5b 100644 --- a/SysML2.NET/PIM/DTO/Project.cs +++ b/SysML2.NET/PIM/DTO/Project.cs @@ -23,6 +23,7 @@ namespace SysML2.NET.PIM.DTO using System; using System.Collections.Generic; + using SysML2.NET.Decorators; using SysML2.NET.PIM; /// @@ -34,26 +35,56 @@ public class Project : Record /// /// Gets or sets the collection of /// - public List Commits { get; set; } = new List(); + [Property(lowerValue: 0, upperValue: int.MaxValue)] + public List Commits { get; set; } = []; + + /// + /// Gets or sets the set of all s in the + /// + [Property(lowerValue: 0, upperValue: int.MaxValue)] + public List CommitReferences { get; set; } = []; + + /// + /// Gets or sets the set of all es in the + /// + /// + /// A has one or more branches; a default branch is created with the . + /// + [Property(lowerValue: 1, upperValue: int.MaxValue)] + [SubsettedProperty(propertyName: "Project.CommitReferences")] + public List Branches { get; set; } = []; + + /// + /// Gets or sets the set of all s in the + /// + [Property(lowerValue: 0, upperValue: int.MaxValue)] + [SubsettedProperty(propertyName: "Project.CommitReferences")] + public List Tags { get; set; } = []; /// /// Gets or sets the when the project was created /// + [Property(lowerValue: 1, upperValue: 1)] public DateTime Created { get; set; } /// /// Gets or sets the human readable name /// + [Property(lowerValue: 1, upperValue: 1)] + [RedefinedProperty(propertyName: "Record.Name")] public new string Name { get; set; } /// /// Gets or sets the default in the which is a subset of /// + [Property(lowerValue: 1, upperValue: 1)] + [SubsettedProperty(propertyName: "Project.Branches")] public Guid DefaultBranch { get; set; } /// /// Gets or sets the collection of /// + [Property(lowerValue: 0, upperValue: int.MaxValue)] public List Queries { get; set; } = []; } } diff --git a/SysML2.NET/PIM/DTO/ProjectUsage.cs b/SysML2.NET/PIM/DTO/ProjectUsage.cs index 03ce74367..0b4c05dc8 100644 --- a/SysML2.NET/PIM/DTO/ProjectUsage.cs +++ b/SysML2.NET/PIM/DTO/ProjectUsage.cs @@ -23,6 +23,7 @@ namespace SysML2.NET.PIM.DTO using System; using SysML2.NET.Common; + using SysML2.NET.Decorators; /// /// a realization of that represents the use of a in the context of another @@ -33,16 +34,19 @@ public class ProjectUsage : IData /// /// Gets or sets the unique identifier /// + [Property(lowerValue: 1, upperValue: 1, isReadOnly: true)] public Guid Id { get; set; } /// /// Gets or sets the reference to the of the being used. /// + [Property(lowerValue: 1, upperValue: 1)] public Guid UsedCommit { get; set; } /// /// Gets or sets the reference to the of the being used. /// + [Property(lowerValue: 1, upperValue: 1)] public Guid UsedProject { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/Query.cs b/SysML2.NET/PIM/DTO/Query.cs index e178a3d1d..22df598c4 100644 --- a/SysML2.NET/PIM/DTO/Query.cs +++ b/SysML2.NET/PIM/DTO/Query.cs @@ -23,6 +23,8 @@ namespace SysML2.NET.PIM.DTO using System; using System.Collections.Generic; + using SysML2.NET.Decorators; + /// /// is a subclass of that represents a precise and language-independent /// request for information retrieval using the Systems Modeling API and Services. @@ -33,24 +35,44 @@ public class Query : Record /// /// Gets or sets the name of the Query /// + [Property(lowerValue: 1, upperValue: 1)] + [RedefinedProperty(propertyName: "Record.Name")] public new string Name { get; set; } + /// + /// Gets or sets the that owns the + /// + [Property(lowerValue: 1, upperValue: 1)] + public Guid Project { get; set; } + /// /// list of properties of Element or its subtypes that will be included for each Element object in the /// query response. Element is the root-metaclass in KerML. If no properties are specified, then all the /// properties will be included for each Element in the query response /// + [Property(lowerValue: 0, upperValue: int.MaxValue)] public List Select { get; set; } = []; /// /// represents the conditions that Elements in the query response must satisfy /// + [Property(lowerValue: 1, upperValue: 1)] public Constraint Where { get; set; } /// /// list of Data objects that define the scope context for query execution. The default scope of a /// Query is the owning Project /// + [Property(lowerValue: 0, upperValue: int.MaxValue)] public List Scope { get; set; } = []; + + /// + /// Gets or sets the list of properties used for sorting the data objects in the query response + /// + /// + /// The order of the properties in the list governs the sorting order. + /// + [Property(lowerValue: 0, upperValue: int.MaxValue, isOrdered: true)] + public List OrderBy { get; set; } = []; } } diff --git a/SysML2.NET/PIM/DTO/Tag.cs b/SysML2.NET/PIM/DTO/Tag.cs index e0e50414e..1e073e48e 100644 --- a/SysML2.NET/PIM/DTO/Tag.cs +++ b/SysML2.NET/PIM/DTO/Tag.cs @@ -22,6 +22,8 @@ namespace SysML2.NET.PIM.DTO { using System; + using SysML2.NET.Decorators; + /// /// a is used for annotating specific commits-of-interest during development, /// such as for representing milestones, releases, baselines, or snapshots. A @@ -32,6 +34,7 @@ public class Tag : CommitReference /// /// Gets or sets a reference to the tagged /// + [Property(lowerValue: 1, upperValue: 1)] public Guid TaggedCommit { get; set; } } } diff --git a/SysML2.NET/PIM/POCO/Branch.cs b/SysML2.NET/PIM/POCO/Branch.cs index 9f549c9ff..864c006ff 100644 --- a/SysML2.NET/PIM/POCO/Branch.cs +++ b/SysML2.NET/PIM/POCO/Branch.cs @@ -20,10 +20,12 @@ namespace SysML2.NET.PIM.POCO { + using SysML2.NET.Decorators; + /// /// A is a type of . A is a pointer to a (Branch.head). /// The history of a on a given can be computed by recursively navigating - /// , starting from the head of the (Branch.head) + /// , starting from the head of the (Branch.head) /// public class Branch : CommitReference { @@ -31,6 +33,7 @@ public class Branch : CommitReference /// Gets or sets the commit to which the branch is currently pointing. It represents the latest state of the /// on the given branch /// + [Property(lowerValue: 1, upperValue: 1)] public Commit Head { get; set; } } } \ No newline at end of file diff --git a/SysML2.NET/PIM/POCO/Commit.cs b/SysML2.NET/PIM/POCO/Commit.cs index 3b5c23993..7e9a8b818 100644 --- a/SysML2.NET/PIM/POCO/Commit.cs +++ b/SysML2.NET/PIM/POCO/Commit.cs @@ -23,6 +23,7 @@ namespace SysML2.NET.PIM.POCO using System; using System.Collections.Generic; + using SysML2.NET.Decorators; using SysML2.NET.PIM; /// @@ -44,27 +45,35 @@ public class Commit : Record /// /// Gets or sets the timestamp at which the was created /// + [Property(lowerValue: 1, upperValue: 1)] public DateTime Created { get; set; } /// /// Gets or sets the that owns the . /// + [Property(lowerValue: 1, upperValue: 1)] public Project OwningProject { get; set; } /// /// Gets or sets the set of immediately preceding s /// - public List PreviousCommit { get; set; } = new List(); + [Property(lowerValue: 0, upperValue: int.MaxValue)] + public List PreviousCommits { get; set; } = []; /// /// Gets or sets the the set of records representing that is /// created, updated, or deleted in the /// - public List Change { get; set; } = new List(); + [Property(lowerValue: 1, upperValue: int.MaxValue)] + public List Change { get; set; } = []; /// /// Queries the derived property VersionedData /// + /// The set of cumulative records at the . + /// Thrown until the derivation is supported. + [Property(lowerValue: 0, upperValue: int.MaxValue, isDerived: true)] + [DerivedProperty(name: "VersionedData")] public List QueryVersionedData() { throw new NotImplementedException("Derived property VersionedData not yet supported"); diff --git a/SysML2.NET/PIM/POCO/CommitReference.cs b/SysML2.NET/PIM/POCO/CommitReference.cs index 9a8c1053b..a296c0465 100644 --- a/SysML2.NET/PIM/POCO/CommitReference.cs +++ b/SysML2.NET/PIM/POCO/CommitReference.cs @@ -22,9 +22,11 @@ namespace SysML2.NET.PIM.POCO { using System; + using SysML2.NET.Decorators; + /// /// An abstract subclass of that references a specific (Commit Reference.referencedCommit). Project.commit is the set of all the Commit records for a given Project. - /// identifies specific records in a that provide the context for navigating the + /// identifies specific records in a that provide the context for navigating the /// in a Project. Two special types of are and /// public abstract class CommitReference : Record @@ -32,21 +34,26 @@ public abstract class CommitReference : Record /// /// Gets or sets the timestamp at which the was created. /// + [Property(lowerValue: 1, upperValue: 1)] public DateTime Created { get; set; } /// /// Gets or sets the timestamp at which the was deleted /// + [Property(lowerValue: 1, upperValue: 1)] public DateTime Deleted { get; set; } /// /// Gets or sets the name of the /// + [Property(lowerValue: 1, upperValue: 1)] + [RedefinedProperty(propertyName: "Record.Name")] public new string Name { get; set; } /// /// Gets or sets the Project that owns the given /// + [Property(lowerValue: 1, upperValue: 1)] public Project OwningProject { get; set; } } } diff --git a/SysML2.NET/PIM/POCO/CompositeConstraint.cs b/SysML2.NET/PIM/POCO/CompositeConstraint.cs index 7a49f2845..08172eea0 100644 --- a/SysML2.NET/PIM/POCO/CompositeConstraint.cs +++ b/SysML2.NET/PIM/POCO/CompositeConstraint.cs @@ -22,8 +22,10 @@ namespace SysML2.NET.PIM.POCO { using System.Collections.Generic; + using SysML2.NET.Decorators; + /// - /// a subtype of that represents complex conditions composed of two or more + /// a concrete subtype of that represents complex conditions composed of two or more /// s or s using logical AND or OR operators /// public class CompositeConstraint : Constraint @@ -34,11 +36,13 @@ public class CompositeConstraint : Constraint /// /// There must be at least 2 /// + [Property(lowerValue: 2, upperValue: int.MaxValue)] public List Constraint { get; set; } = []; /// /// Gets or sets the logical operator for composing the s /// + [Property(lowerValue: 1, upperValue: 1)] public JoinOperator Operator { get; set; } } } diff --git a/SysML2.NET/PIM/POCO/DataDifference.cs b/SysML2.NET/PIM/POCO/DataDifference.cs index 67fb80d7d..fe3accbff 100644 --- a/SysML2.NET/PIM/POCO/DataDifference.cs +++ b/SysML2.NET/PIM/POCO/DataDifference.cs @@ -20,6 +20,7 @@ namespace SysML2.NET.PIM.POCO { + using SysML2.NET.Decorators; /// /// Represents a single difference between two compared versions of the same @@ -29,11 +30,13 @@ public class DataDifference /// /// Gets or sets the taken as the baseline of the comparison, or null when the data was added /// + [Property(lowerValue: 0, upperValue: 1)] public DataVersion BaseData { get; set; } /// /// Gets or sets the compared against the baseline, or null when the data was deleted /// + [Property(lowerValue: 0, upperValue: 1)] public DataVersion CompareData { get; set; } } } \ No newline at end of file diff --git a/SysML2.NET/PIM/POCO/DataIdentity.cs b/SysML2.NET/PIM/POCO/DataIdentity.cs index 5f95d8d3e..05f0b052f 100644 --- a/SysML2.NET/PIM/POCO/DataIdentity.cs +++ b/SysML2.NET/PIM/POCO/DataIdentity.cs @@ -22,6 +22,8 @@ namespace SysML2.NET.PIM.POCO { using System.Collections.Generic; + using SysML2.NET.Decorators; + /// /// A subclass of that represents a unique, version-independent representation of /// through its lifecycle. A is associated with 1 or more Version @@ -32,6 +34,7 @@ public class DataIdentity : Record /// /// Gets or sets the the set of records representing all versions of the given /// - public List Version = new List(); + [Property(lowerValue: 1, upperValue: int.MaxValue)] + public List Version { get; set; } = []; } } diff --git a/SysML2.NET/PIM/POCO/DataVersion.cs b/SysML2.NET/PIM/POCO/DataVersion.cs index 8aad1d49d..710bbc6f5 100644 --- a/SysML2.NET/PIM/POCO/DataVersion.cs +++ b/SysML2.NET/PIM/POCO/DataVersion.cs @@ -23,7 +23,8 @@ namespace SysML2.NET.PIM.POCO using System; using SysML2.NET.Common; - + using SysML2.NET.Decorators; + /// /// A subclass of that represents at a specific version in its lifecycle. /// A record is associated with only one (1) record. @@ -34,23 +35,31 @@ public class DataVersion : Record /// /// Gets or sets the at which the wrapped data (payload) was created, modified, or deleted. /// + [Property(lowerValue: 1, upperValue: 1)] public Commit Commit { get; set; } /// /// Gets or sets a reference to corresponding the /// + [Property(lowerValue: 1, upperValue: 1)] public DataIdentity Identity { get; set; } /// /// Gets or sets the payload /// + /// + /// null when no data with the given identity is present at the . + /// + [Property(lowerValue: 0, upperValue: 1)] public IData Payload { get; set; } /// /// Queries the derived property /// - /// - /// + /// The that owns the . + /// Thrown until the derivation is supported. + [Property(lowerValue: 1, upperValue: 1, isDerived: true)] + [DerivedProperty(name: "Project")] public Project QueryProject() { throw new NotImplementedException("Derived property Project not yet supported"); diff --git a/SysML2.NET/PIM/POCO/ExternalData.cs b/SysML2.NET/PIM/POCO/ExternalData.cs index 868a29a7d..45ee9a646 100644 --- a/SysML2.NET/PIM/POCO/ExternalData.cs +++ b/SysML2.NET/PIM/POCO/ExternalData.cs @@ -23,6 +23,7 @@ namespace SysML2.NET.PIM.POCO using System; using SysML2.NET.Common; + using SysML2.NET.Decorators; /// /// ExternalData is a realization of Data, and represents a resource external to a given tool or @@ -33,11 +34,13 @@ public class ExternalData : IData /// /// Gets or sets the unique identifier /// + [Property(lowerValue: 1, upperValue: 1, isReadOnly: true)] public Guid Id { get; set; } /// /// Gets or sets the string representation of the IRI of the resource represented by the ExternalData /// + [Property(lowerValue: 1, upperValue: 1)] public string ResourceIdentifier { get; set; } } } diff --git a/SysML2.NET/PIM/POCO/ExternalRelationship.cs b/SysML2.NET/PIM/POCO/ExternalRelationship.cs index 6fbb1af54..4f6b36867 100644 --- a/SysML2.NET/PIM/POCO/ExternalRelationship.cs +++ b/SysML2.NET/PIM/POCO/ExternalRelationship.cs @@ -25,6 +25,7 @@ namespace SysML2.NET.PIM.POCO using SysML2.NET.Common; using SysML2.NET.Core.POCO; using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Decorators; /// /// ExternalRelationship is a realization of Data, and represents the relationship between a @@ -37,6 +38,7 @@ public class ExternalRelationship : IData /// /// Gets or sets the unique identifier /// + [Property(lowerValue: 1, upperValue: 1)] public Guid Id { get; set; } /// @@ -46,21 +48,25 @@ public class ExternalRelationship : IData /// would contain mathematical expressions, such as equations, representing the mapping.This is an optional /// attribute. /// + [Property(lowerValue: 0, upperValue: 1)] public string Specification { get; set; } /// /// Gets or sets the name of the expression language used for the specification. This is an optional attribute. /// + [Property(lowerValue: 0, upperValue: 1)] public string Language { get; set; } /// /// Gets or sets the /// + [Property(lowerValue: 1, upperValue: 1)] public IElement ElementEnd { get; set; } /// /// Gets or sets the /// + [Property(lowerValue: 1, upperValue: 1)] public ExternalData ExternalDataEnd { get; set; } } } diff --git a/SysML2.NET/PIM/POCO/MergeResult.cs b/SysML2.NET/PIM/POCO/MergeResult.cs index ed377a44e..17c44ecd0 100644 --- a/SysML2.NET/PIM/POCO/MergeResult.cs +++ b/SysML2.NET/PIM/POCO/MergeResult.cs @@ -22,6 +22,8 @@ namespace SysML2.NET.PIM.POCO { using System.Collections.Generic; + using SysML2.NET.Decorators; + /// /// Represents the outcome of merging one into another /// @@ -30,11 +32,13 @@ public class MergeResult /// /// Gets or sets the records that could not be merged automatically /// + [Property(lowerValue: 0, upperValue: int.MaxValue)] public List Conflict { get; set; } = []; /// /// Gets or sets the that records the merge /// + [Property(lowerValue: 0, upperValue: 1)] public Commit MergeCommit { get; set; } } } \ No newline at end of file diff --git a/SysML2.NET/PIM/POCO/PrimitiveConstraint.cs b/SysML2.NET/PIM/POCO/PrimitiveConstraint.cs index 5a106a9ad..1b1ed9196 100644 --- a/SysML2.NET/PIM/POCO/PrimitiveConstraint.cs +++ b/SysML2.NET/PIM/POCO/PrimitiveConstraint.cs @@ -22,8 +22,10 @@ namespace SysML2.NET.PIM.POCO { using System.Collections.Generic; + using SysML2.NET.Decorators; + /// - /// a subtype of Constraint that represents simple conditions that be modeled using the + /// a concrete subtype of that represents simple conditions that be modeled using the /// property-operator -value tuple. e.g. mass <= 4 kg, or type instanceOf Generalization /// public class PrimitiveConstraint : Constraint @@ -31,21 +33,25 @@ public class PrimitiveConstraint : Constraint /// /// Gets or sets the name of a property of Element or its subtypes that is being constrained /// + [Property(lowerValue: 1, upperValue: 1)] public string Property { get; set; } /// /// Gets or sets the mathematical operatores /// + [Property(lowerValue: 1, upperValue: 1)] public Operator Operator { get; set; } /// /// Gets or sets list of primitive objects, such as String, Boolean, Integer, Double, and UUID /// - public List Value { get; set; } = new List(); + [Property(lowerValue: 1, upperValue: int.MaxValue)] + public List Value { get; set; } = []; /// /// Gets or sets a value indicating a logical NOT operator is applied to the /// + [Property(lowerValue: 1, upperValue: 1)] public bool Inverse { get; set; } } } \ No newline at end of file diff --git a/SysML2.NET/PIM/POCO/Project.cs b/SysML2.NET/PIM/POCO/Project.cs index added9758..07626e172 100644 --- a/SysML2.NET/PIM/POCO/Project.cs +++ b/SysML2.NET/PIM/POCO/Project.cs @@ -25,6 +25,7 @@ namespace SysML2.NET.PIM.POCO using System.Linq; using SysML2.NET.Common; + using SysML2.NET.Decorators; using SysML2.NET.PIM; /// @@ -36,11 +37,14 @@ public class Project : Record /// /// Gets or sets a human-friendly identifier for a Project /// + [Property(lowerValue: 1, upperValue: 1)] + [RedefinedProperty(propertyName: "Record.Name")] public new string Name { get; set; } /// /// Gets or sets the timestamp at which the was created /// + [Property(lowerValue: 1, upperValue: 1)] public DateTime Created { get; set; } /// @@ -50,37 +54,47 @@ public class Project : Record /// /// this is a derived attribute /// + [Property(lowerValue: 0, upperValue: int.MaxValue, isDerived: true)] public IEnumerable IdentifiedData => throw new NotImplementedException(); /// /// Gets all the s in the /// - public List Commits { get; set; } = new List(); + [Property(lowerValue: 0, upperValue: int.MaxValue)] + public List Commits { get; set; } = []; /// /// Gets or sets all s in the /// - public List CommitReference { get; set; } = new List(); + [Property(lowerValue: 0, upperValue: int.MaxValue)] + public List CommitReferences { get; set; } = []; /// - /// Gets or sets all the branches in the Project which is a subset of + /// Gets all the branches in the which is a subset of /// - public IEnumerable Branches => this.CommitReference.OfType(); + [Property(lowerValue: 1, upperValue: int.MaxValue, isDerived: true)] + [SubsettedProperty(propertyName: "Project.CommitReferences")] + public IEnumerable Branches => this.CommitReferences.OfType(); /// /// Gets or sets the default in the which is a subset of /// + [Property(lowerValue: 1, upperValue: 1)] + [SubsettedProperty(propertyName: "Project.Branches")] public Branch DefaultBranch { get; set; } /// - /// Gets all the s in the which is a subset of + /// Gets all the s in the which is a subset of /// - public IEnumerable Tags => this.CommitReference.OfType(); + [Property(lowerValue: 0, upperValue: int.MaxValue, isDerived: true)] + [SubsettedProperty(propertyName: "Project.CommitReferences")] + public IEnumerable Tags => this.CommitReferences.OfType(); /// /// Gets or sets the records owned by the . Each record represents a /// saved for the given . /// - public List Queries { get; set; } = new List(); + [Property(lowerValue: 0, upperValue: int.MaxValue)] + public List Queries { get; set; } = []; } } diff --git a/SysML2.NET/PIM/POCO/ProjectUsage.cs b/SysML2.NET/PIM/POCO/ProjectUsage.cs index 29e1a375c..d5e91c605 100644 --- a/SysML2.NET/PIM/POCO/ProjectUsage.cs +++ b/SysML2.NET/PIM/POCO/ProjectUsage.cs @@ -23,6 +23,7 @@ namespace SysML2.NET.PIM.POCO using System; using SysML2.NET.Common; + using SysML2.NET.Decorators; /// /// a realization of that represents the use of a in the context of another @@ -33,16 +34,19 @@ public class ProjectUsage : IData /// /// Gets or sets the unique identifier /// + [Property(lowerValue: 1, upperValue: 1, isReadOnly: true)] public Guid Id { get; set; } /// /// Gets or sets the reference to the of the being used. /// + [Property(lowerValue: 1, upperValue: 1)] public Commit UsedCommit { get; set; } /// /// Gets or sets the reference to the being used. /// + [Property(lowerValue: 1, upperValue: 1)] public Project UsedProject { get; set; } } } diff --git a/SysML2.NET/PIM/POCO/Query.cs b/SysML2.NET/PIM/POCO/Query.cs index 1e64da087..a31388a2a 100644 --- a/SysML2.NET/PIM/POCO/Query.cs +++ b/SysML2.NET/PIM/POCO/Query.cs @@ -23,6 +23,7 @@ namespace SysML2.NET.PIM.POCO using System.Collections.Generic; using SysML2.NET.Common; + using SysML2.NET.Decorators; /// /// is a subclass of that represents a precise and language-independent @@ -34,30 +35,42 @@ public class Query : Record /// /// Gets or sets the name of the Query /// + [Property(lowerValue: 1, upperValue: 1)] + [RedefinedProperty(propertyName: "Record.Name")] public new string Name { get; set; } + /// + /// Gets or sets the that owns the + /// + [Property(lowerValue: 1, upperValue: 1)] + public Project Project { get; set; } + /// /// list of properties of Element or its subtypes that will be included for each Element object in the /// query response. Element is the root-metaclass in KerML. If no properties are specified, then all the /// properties will be included for each Element in the query response /// + [Property(lowerValue: 0, upperValue: int.MaxValue)] public List Select { get; set; } = []; /// /// Gets or sets the list of Element objects that define the scope for query execution. The default scope of a is - /// the owning + /// the owning /// + [Property(lowerValue: 0, upperValue: int.MaxValue)] public List Scope { get; set; } = []; /// /// represents the conditions that Elements in the query response must satisfy /// + [Property(lowerValue: 1, upperValue: 1)] public Constraint Where { get; set; } /// /// Gets or sets a list of properties of Data (or its realizations) that are used for sorting the Data objects in the /// query response.The order of properties in the list governs the sorting order /// + [Property(lowerValue: 0, upperValue: int.MaxValue, isOrdered: true)] public List OrderBy { get; set; } = []; } } diff --git a/SysML2.NET/PIM/POCO/Tag.cs b/SysML2.NET/PIM/POCO/Tag.cs index 746f35548..47940d448 100644 --- a/SysML2.NET/PIM/POCO/Tag.cs +++ b/SysML2.NET/PIM/POCO/Tag.cs @@ -22,6 +22,8 @@ namespace SysML2.NET.PIM.POCO { using System; + using SysML2.NET.Decorators; + /// /// a is used for annotating specific commits-of-interest during development, /// such as for representing milestones, releases, baselines, or snapshots. A @@ -33,6 +35,7 @@ public class Tag : CommitReference /// Gets or sets a reference to the which the Tag is pointing. It represents a /// -of-interest in the owning . /// + [Property(lowerValue: 1, upperValue: 1)] public Commit TaggedCommit { get; set; } } } diff --git a/SysML2.NET/PIM/Record.cs b/SysML2.NET/PIM/Record.cs index 295e4a6a2..caf6522a4 100644 --- a/SysML2.NET/PIM/Record.cs +++ b/SysML2.NET/PIM/Record.cs @@ -1,20 +1,20 @@ // ------------------------------------------------------------------------------------------------- // -// +// // Copyright 2022-2025 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. -// +// // // ------------------------------------------------------------------------------------------------ @@ -24,6 +24,7 @@ namespace SysML2.NET.PIM using System.Collections.Generic; using SysML2.NET.Common; + using SysML2.NET.Decorators; /// /// A Record represents any data that is consumed (input) or produced (output) by the Systems Modeling API @@ -42,28 +43,34 @@ protected Record() /// /// Gets or sets the unique identifier of the /// + [Property(lowerValue: 1, upperValue: 1)] public Guid Id { get; set; } /// /// Gets or sets string representation of the IRI for the /// + [Property(lowerValue: 0, upperValue: 1)] public string ResourceIdentifier { get; set; } /// /// Gets or sets a collection of other identifiers for this record, especially if the record was created or represented /// in other software applications and systems /// + [Property(lowerValue: 0, upperValue: int.MaxValue)] public List Alias { get; set; } /// /// Gets or sets a statement that provides details about the . /// + [Property(lowerValue: 1, upperValue: 1)] public string Description { get; set; } /// /// Gets or sets an optional human-friendly identifier for a record. The value assigned to the name for a given /// record must be in the set of values assigned to alias for that record /// + [Property(lowerValue: 0, upperValue: 1)] + [SubsettedProperty(propertyName: "Record.Alias")] public string Name { get; set; } } } From aeef85fc652e7f536c5394eb1159fa8fda92429c Mon Sep 17 00:00:00 2001 From: atheate Date: Tue, 13 Oct 2026 10:49:26 +0200 Subject: [PATCH 2/2] Requested changes. Did not surface multiplicity since following UML model for the PIM --- SysML2.NET/PIM/DTO/Branch.cs | 2 +- SysML2.NET/PIM/DTO/Commit.cs | 12 +- SysML2.NET/PIM/DTO/CommitReference.cs | 8 +- SysML2.NET/PIM/DTO/CompositeConstraint.cs | 4 +- SysML2.NET/PIM/DTO/DataDifference.cs | 4 +- SysML2.NET/PIM/DTO/DataVersion.cs | 12 +- SysML2.NET/PIM/DTO/ExternalData.cs | 4 +- SysML2.NET/PIM/DTO/ExternalRelationship.cs | 10 +- SysML2.NET/PIM/DTO/MergeResult.cs | 8 +- SysML2.NET/PIM/DTO/PrimitiveConstraint.cs | 8 +- SysML2.NET/PIM/DTO/Project.cs | 16 +- SysML2.NET/PIM/DTO/ProjectUsage.cs | 6 +- SysML2.NET/PIM/DTO/Query.cs | 156 ++++++++++---------- SysML2.NET/PIM/DTO/Tag.cs | 2 +- SysML2.NET/PIM/POCO/Branch.cs | 2 +- SysML2.NET/PIM/POCO/Commit.cs | 28 ++-- SysML2.NET/PIM/POCO/CommitReference.cs | 8 +- SysML2.NET/PIM/POCO/CompositeConstraint.cs | 4 +- SysML2.NET/PIM/POCO/DataDifference.cs | 4 +- SysML2.NET/PIM/POCO/DataIdentity.cs | 2 +- SysML2.NET/PIM/POCO/DataVersion.cs | 25 ++-- SysML2.NET/PIM/POCO/ExternalData.cs | 4 +- SysML2.NET/PIM/POCO/ExternalRelationship.cs | 10 +- SysML2.NET/PIM/POCO/MergeResult.cs | 4 +- SysML2.NET/PIM/POCO/PrimitiveConstraint.cs | 8 +- SysML2.NET/PIM/POCO/Project.cs | 31 ++-- SysML2.NET/PIM/POCO/ProjectUsage.cs | 6 +- SysML2.NET/PIM/POCO/Query.cs | 152 +++++++++---------- SysML2.NET/PIM/POCO/Tag.cs | 2 +- SysML2.NET/PIM/Record.cs | 152 +++++++++---------- 30 files changed, 359 insertions(+), 335 deletions(-) diff --git a/SysML2.NET/PIM/DTO/Branch.cs b/SysML2.NET/PIM/DTO/Branch.cs index 244d3ec92..e3535beba 100644 --- a/SysML2.NET/PIM/DTO/Branch.cs +++ b/SysML2.NET/PIM/DTO/Branch.cs @@ -35,7 +35,7 @@ public class Branch : CommitReference /// Gets or sets the commit to which the branch is currently pointing. It represents the latest state of the /// on the given branch /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1614695877725_676676_515", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Guid Head { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/Commit.cs b/SysML2.NET/PIM/DTO/Commit.cs index 5e0f144bc..271da9b0f 100644 --- a/SysML2.NET/PIM/DTO/Commit.cs +++ b/SysML2.NET/PIM/DTO/Commit.cs @@ -45,19 +45,19 @@ public class Commit : Record /// /// Gets or sets the timestamp at which the was created /// - [Property(lowerValue: 1, upperValue: 1)] + [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: true, defaultValue: null)] public DateTime Created { get; set; } /// /// Gets or sets the that owns the . /// - [Property(lowerValue: 1, upperValue: 1)] + [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: true, defaultValue: null)] public Guid OwningProject { get; set; } /// /// Gets or sets the set of immediately preceding s /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] + [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: true, defaultValue: null)] public List PreviousCommits { get; set; } = []; /// @@ -67,7 +67,7 @@ public class Commit : Record /// /// A deletion is recorded by a whose payload is null. /// - [Property(lowerValue: 1, upperValue: int.MaxValue)] + [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: true, defaultValue: null)] public List Change { get; set; } = []; /// @@ -77,7 +77,7 @@ public class Commit : Record /// Derived by Systems Modeling API and Services, Clause 7.1.2 from and the /// versioned data of . /// - [Property(lowerValue: 0, upperValue: int.MaxValue, isDerived: true)] - public List VersionedData { get; set; } = []; + [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: true, defaultValue: null)] + public List versionedData { get; internal set; } = []; } } diff --git a/SysML2.NET/PIM/DTO/CommitReference.cs b/SysML2.NET/PIM/DTO/CommitReference.cs index 5e4b80ad4..7089fcf51 100644 --- a/SysML2.NET/PIM/DTO/CommitReference.cs +++ b/SysML2.NET/PIM/DTO/CommitReference.cs @@ -35,25 +35,25 @@ public abstract class CommitReference : Record /// /// Gets or sets the timestamp at which the was created. /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1628778313797_665973_538", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DateTime Created { get; set; } /// /// Gets or sets the timestamp at which the was deleted /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_2022x_2_f940371_1740179401841_624617_283", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DateTime Deleted { get; set; } /// /// Gets or sets the Project that owns the given /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1628779129336_65342_713", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Guid OwningProject { get; set; } /// /// Gets or sets the name of the /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1671293488580_668503_7742", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [RedefinedProperty(propertyName: "Record.Name")] public new string Name { get; set; } } diff --git a/SysML2.NET/PIM/DTO/CompositeConstraint.cs b/SysML2.NET/PIM/DTO/CompositeConstraint.cs index c1398dbe2..dd7a78de5 100644 --- a/SysML2.NET/PIM/DTO/CompositeConstraint.cs +++ b/SysML2.NET/PIM/DTO/CompositeConstraint.cs @@ -36,13 +36,13 @@ public class CompositeConstraint : Constraint /// /// There must be at least 2 /// - [Property(lowerValue: 2, upperValue: int.MaxValue)] + [Property(xmiId: "_19_0_4_58901f1_1597377207847_92212_477", aggregation: AggregationKind.None, lowerValue: 2, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Constraint { get; set; } = []; /// /// Gets or sets the logical operator for composing the s /// - [Property(lowerValue: 1, upperValue: 1)] + [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: true, defaultValue: null)] public JoinOperator Operator { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/DataDifference.cs b/SysML2.NET/PIM/DTO/DataDifference.cs index 6edaf8ea8..a023b3f67 100644 --- a/SysML2.NET/PIM/DTO/DataDifference.cs +++ b/SysML2.NET/PIM/DTO/DataDifference.cs @@ -32,13 +32,13 @@ public class DataDifference /// /// Gets or sets the taken as the baseline of the comparison, or null when the data was added /// - [Property(lowerValue: 0, upperValue: 1)] + [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: true, defaultValue: null)] public Guid? BaseData { get; set; } /// /// Gets or sets the compared against the baseline, or null when the data was deleted /// - [Property(lowerValue: 0, upperValue: 1)] + [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: true, defaultValue: null)] public Guid? CompareData { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/DataVersion.cs b/SysML2.NET/PIM/DTO/DataVersion.cs index 7b1c3e169..ed8b5c400 100644 --- a/SysML2.NET/PIM/DTO/DataVersion.cs +++ b/SysML2.NET/PIM/DTO/DataVersion.cs @@ -35,22 +35,22 @@ public class DataVersion : Record /// /// Gets or sets the at which the wrapped data (payload) was created, modified, or deleted. /// - [Property(lowerValue: 1, upperValue: 1)] + [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: true, defaultValue: null)] public Guid Commit { get; set; } /// - /// Gets or sets the that owns the + /// Gets the that owns the /// /// /// Derived by Systems Modeling API and Services, Clause 7.1.2 from the owning project of . /// - [Property(lowerValue: 1, upperValue: 1, isDerived: true)] - public Guid Project { get; set; } + [Property(xmiId: "_19_0_2_12e503d9_1577820469730_358203_66069", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: true, defaultValue: null)] + public Guid project { get; internal set; } /// /// Gets or sets the contained /// - [Property(lowerValue: 1, upperValue: 1)] + [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: true, defaultValue: null)] public DataIdentity Identity { get; set; } /// @@ -59,7 +59,7 @@ public class DataVersion : Record /// /// null when no data with the given identity is present at the . /// - [Property(lowerValue: 0, upperValue: 1)] + [Property(xmiId: "_19_0_2_12e503d9_1577820469731_381637_66070", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public IData Payload { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/ExternalData.cs b/SysML2.NET/PIM/DTO/ExternalData.cs index cbbe69ba5..60d12fa1a 100644 --- a/SysML2.NET/PIM/DTO/ExternalData.cs +++ b/SysML2.NET/PIM/DTO/ExternalData.cs @@ -34,13 +34,13 @@ public class ExternalData : IData /// /// Gets or sets the unique identifier /// - [Property(lowerValue: 1, upperValue: 1, isReadOnly: true)] + [Property(xmiId: "sysml2.net", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Guid Id { get; set; } /// /// Gets or sets the string representation of the IRI of the resource represented by the ExternalData /// - [Property(lowerValue: 1, upperValue: 1)] + [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: true, defaultValue: null)] public string ResourceIdentifier { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/ExternalRelationship.cs b/SysML2.NET/PIM/DTO/ExternalRelationship.cs index 413bb2734..63f486e9e 100644 --- a/SysML2.NET/PIM/DTO/ExternalRelationship.cs +++ b/SysML2.NET/PIM/DTO/ExternalRelationship.cs @@ -36,7 +36,7 @@ public class ExternalRelationship : IData /// /// Gets or sets the unique identifier /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "sysml2.net", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Guid Id { get; set; } /// @@ -46,25 +46,25 @@ public class ExternalRelationship : IData /// would contain mathematical expressions, such as equations, representing the mapping.This is an optional /// attribute. /// - [Property(lowerValue: 0, upperValue: 1)] + [Property(xmiId: "_19_0_2_58901f1_1596708855858_697400_1579", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string Specification { get; set; } /// /// Gets or sets the name of the expression language used for the specification. This is an optional attribute. /// - [Property(lowerValue: 0, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1629815682552_46136_30600", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string Language { get; set; } /// /// Gets or sets the /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1629755852196_23786_29899", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Guid ElementEnd { get; set; } /// /// Gets or sets the /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1629755861218_259967_29912", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Guid ExternalDataEnd { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/MergeResult.cs b/SysML2.NET/PIM/DTO/MergeResult.cs index 3550aba8a..4e818eeb5 100644 --- a/SysML2.NET/PIM/DTO/MergeResult.cs +++ b/SysML2.NET/PIM/DTO/MergeResult.cs @@ -33,13 +33,13 @@ public class MergeResult /// /// Gets or sets the records that could not be merged automatically /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] + [Property(xmiId: "_19_0_4_58901f1_1667600196883_169912_162", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Conflict { get; set; } = []; /// - /// Gets or sets the that records the merge + /// Gets or sets the that records the merge, or null when the merge was unsuccessful /// - [Property(lowerValue: 0, upperValue: 1)] - public Guid MergeCommit { get; set; } + [Property(xmiId: "_19_0_4_58901f1_1667600196883_581172_161", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] + public Guid? MergeCommit { get; set; } } } \ No newline at end of file diff --git a/SysML2.NET/PIM/DTO/PrimitiveConstraint.cs b/SysML2.NET/PIM/DTO/PrimitiveConstraint.cs index 8c0978d3b..a5c6878e6 100644 --- a/SysML2.NET/PIM/DTO/PrimitiveConstraint.cs +++ b/SysML2.NET/PIM/DTO/PrimitiveConstraint.cs @@ -33,25 +33,25 @@ public class PrimitiveConstraint : Constraint /// /// Gets or sets the name of a property of Element or its subtypes that is being constrained /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1597377425985_159367_499", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string Property { get; set; } /// /// Gets or sets the mathematical operators /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1597377427373_325175_501", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Operator Operator { get; set; } /// /// Gets or sets list of primitive objects, such as String, Boolean, Integer, Double, and UUID /// - [Property(lowerValue: 1, upperValue: int.MaxValue)] + [Property(xmiId: "_19_0_4_58901f1_1597377431228_229452_503", aggregation: AggregationKind.None, lowerValue: 1, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Value { get; set;} = []; /// /// Gets or sets a value indicating a logical NOT operator is applied to the /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1597377338703_200864_497", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public bool Inverse { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/Project.cs b/SysML2.NET/PIM/DTO/Project.cs index 5c5484b5b..938f34801 100644 --- a/SysML2.NET/PIM/DTO/Project.cs +++ b/SysML2.NET/PIM/DTO/Project.cs @@ -35,13 +35,13 @@ public class Project : Record /// /// Gets or sets the collection of /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] + [Property(xmiId: "_19_0_2_12e503d9_1577820469733_493524_66075", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Commits { get; set; } = []; /// /// Gets or sets the set of all s in the /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] + [Property(xmiId: "_19_0_4_58901f1_1628779129336_898482_712", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List CommitReferences { get; set; } = []; /// @@ -50,41 +50,41 @@ public class Project : Record /// /// A has one or more branches; a default branch is created with the . /// - [Property(lowerValue: 1, upperValue: int.MaxValue)] + [Property(xmiId: "_19_0_4_58901f1_1614694201382_729306_245", aggregation: AggregationKind.None, lowerValue: 1, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "Project.CommitReferences")] public List Branches { get; set; } = []; /// /// Gets or sets the set of all s in the /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] + [Property(xmiId: "_19_0_4_58901f1_1628779424605_974596_740", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "Project.CommitReferences")] public List Tags { get; set; } = []; /// /// Gets or sets the when the project was created /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_f940371_1694730728649_158871_419", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DateTime Created { get; set; } /// /// Gets or sets the human readable name /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1671293441918_865671_7736", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [RedefinedProperty(propertyName: "Record.Name")] public new string Name { get; set; } /// /// Gets or sets the default in the which is a subset of /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1614694296040_474053_271", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "Project.Branches")] public Guid DefaultBranch { get; set; } /// /// Gets or sets the collection of /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] + [Property(xmiId: "_19_0_4_58901f1_1597396233220_492135_901", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Queries { get; set; } = []; } } diff --git a/SysML2.NET/PIM/DTO/ProjectUsage.cs b/SysML2.NET/PIM/DTO/ProjectUsage.cs index 0b4c05dc8..a03b2aeaa 100644 --- a/SysML2.NET/PIM/DTO/ProjectUsage.cs +++ b/SysML2.NET/PIM/DTO/ProjectUsage.cs @@ -34,19 +34,19 @@ public class ProjectUsage : IData /// /// Gets or sets the unique identifier /// - [Property(lowerValue: 1, upperValue: 1, isReadOnly: true)] + [Property(xmiId: "sysml2.net", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Guid Id { get; set; } /// /// Gets or sets the reference to the of the being used. /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1628380685338_895164_312", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Guid UsedCommit { get; set; } /// /// Gets or sets the reference to the of the being used. /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "sysml2.net", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Guid UsedProject { get; set; } } } diff --git a/SysML2.NET/PIM/DTO/Query.cs b/SysML2.NET/PIM/DTO/Query.cs index 22df598c4..768a60b80 100644 --- a/SysML2.NET/PIM/DTO/Query.cs +++ b/SysML2.NET/PIM/DTO/Query.cs @@ -1,78 +1,78 @@ -// ------------------------------------------------------------------------------------------------- -// -// -// Copyright 2022-2025 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. -// -// -// ------------------------------------------------------------------------------------------------ - -namespace SysML2.NET.PIM.DTO -{ - using System; - using System.Collections.Generic; - - using SysML2.NET.Decorators; - - /// - /// is a subclass of that represents a precise and language-independent - /// request for information retrieval using the Systems Modeling API and Services. - /// can be mapped to commonly used query languages, such as SQL, Gremlin, GraphQL, and SPARQL - /// - public class Query : Record - { - /// - /// Gets or sets the name of the Query - /// - [Property(lowerValue: 1, upperValue: 1)] - [RedefinedProperty(propertyName: "Record.Name")] - public new string Name { get; set; } - - /// - /// Gets or sets the that owns the - /// - [Property(lowerValue: 1, upperValue: 1)] - public Guid Project { get; set; } - - /// - /// list of properties of Element or its subtypes that will be included for each Element object in the - /// query response. Element is the root-metaclass in KerML. If no properties are specified, then all the - /// properties will be included for each Element in the query response - /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] - public List Select { get; set; } = []; - - /// - /// represents the conditions that Elements in the query response must satisfy - /// - [Property(lowerValue: 1, upperValue: 1)] - public Constraint Where { get; set; } - - /// - /// list of Data objects that define the scope context for query execution. The default scope of a - /// Query is the owning Project - /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] - public List Scope { get; set; } = []; - - /// - /// Gets or sets the list of properties used for sorting the data objects in the query response - /// - /// - /// The order of the properties in the list governs the sorting order. - /// - [Property(lowerValue: 0, upperValue: int.MaxValue, isOrdered: true)] - public List OrderBy { get; set; } = []; - } -} +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2025 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. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.PIM.DTO +{ + using System; + using System.Collections.Generic; + + using SysML2.NET.Decorators; + + /// + /// is a subclass of that represents a precise and language-independent + /// request for information retrieval using the Systems Modeling API and Services. + /// can be mapped to commonly used query languages, such as SQL, Gremlin, GraphQL, and SPARQL + /// + public class Query : Record + { + /// + /// Gets or sets the name of the Query + /// + [Property(xmiId: "_19_0_4_58901f1_1671293480578_778123_7740", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] + [RedefinedProperty(propertyName: "Record.Name")] + public new string Name { get; set; } + + /// + /// Gets or sets the that owns the + /// + [Property(xmiId: "_19_0_4_58901f1_1597396233221_999408_902", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] + public Guid Project { get; set; } + + /// + /// list of properties of Element or its subtypes that will be included for each Element object in the + /// query response. Element is the root-metaclass in KerML. If no properties are specified, then all the + /// properties will be included for each Element in the query response + /// + [Property(xmiId: "_19_0_4_58901f1_1597377655027_119603_507", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] + public List Select { get; set; } = []; + + /// + /// represents the conditions that Elements in the query response must satisfy + /// + [Property(xmiId: "_19_0_4_58901f1_1597377630809_759194_505", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] + public Constraint Where { get; set; } + + /// + /// list of Data objects that define the scope context for query execution. The default scope of a + /// Query is the owning Project + /// + [Property(xmiId: "_19_0_4_58901f1_1597377703876_758020_511", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] + public List Scope { get; set; } = []; + + /// + /// Gets or sets the list of properties used for sorting the data objects in the query response + /// + /// + /// The order of the properties in the list governs the sorting order. + /// + [Property(xmiId: "_19_0_4_58901f1_1597387733264_611302_866", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] + public List OrderBy { get; set; } = []; + } +} diff --git a/SysML2.NET/PIM/DTO/Tag.cs b/SysML2.NET/PIM/DTO/Tag.cs index 1e073e48e..06f3a50c3 100644 --- a/SysML2.NET/PIM/DTO/Tag.cs +++ b/SysML2.NET/PIM/DTO/Tag.cs @@ -34,7 +34,7 @@ public class Tag : CommitReference /// /// Gets or sets a reference to the tagged /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1628778728157_220677_662", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Guid TaggedCommit { get; set; } } } diff --git a/SysML2.NET/PIM/POCO/Branch.cs b/SysML2.NET/PIM/POCO/Branch.cs index 864c006ff..32f61ce28 100644 --- a/SysML2.NET/PIM/POCO/Branch.cs +++ b/SysML2.NET/PIM/POCO/Branch.cs @@ -33,7 +33,7 @@ public class Branch : CommitReference /// Gets or sets the commit to which the branch is currently pointing. It represents the latest state of the /// on the given branch /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1614695877725_676676_515", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Commit Head { get; set; } } } \ No newline at end of file diff --git a/SysML2.NET/PIM/POCO/Commit.cs b/SysML2.NET/PIM/POCO/Commit.cs index 7e9a8b818..cea4063cc 100644 --- a/SysML2.NET/PIM/POCO/Commit.cs +++ b/SysML2.NET/PIM/POCO/Commit.cs @@ -45,38 +45,46 @@ public class Commit : Record /// /// Gets or sets the timestamp at which the was created /// - [Property(lowerValue: 1, upperValue: 1)] + [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: true, defaultValue: null)] public DateTime Created { get; set; } /// /// Gets or sets the that owns the . /// - [Property(lowerValue: 1, upperValue: 1)] + [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: true, defaultValue: null)] public Project OwningProject { get; set; } /// /// Gets or sets the set of immediately preceding s /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] + [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: true, defaultValue: null)] public List PreviousCommits { get; set; } = []; /// /// Gets or sets the the set of records representing that is /// created, updated, or deleted in the /// - [Property(lowerValue: 1, upperValue: int.MaxValue)] + [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: true, defaultValue: null)] public List Change { get; set; } = []; /// - /// Queries the derived property VersionedData + /// Gets the set of cumulative records in a at the + /// + [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: true, defaultValue: null)] + public List versionedData => this.ComputeVersionedData(); + + /// + /// Computes the cumulative records from and the versioned data of /// /// The set of cumulative records at the . - /// Thrown until the derivation is supported. - [Property(lowerValue: 0, upperValue: int.MaxValue, isDerived: true)] - [DerivedProperty(name: "VersionedData")] - public List QueryVersionedData() + /// Thrown until the derivation is supported. + /// + /// Systems Modeling API and Services, Clause 7.1.2 formalizes the derivation in OCL. + /// + [DerivedProperty(nameof(versionedData))] + private List ComputeVersionedData() { - throw new NotImplementedException("Derived property VersionedData not yet supported"); + throw new NotSupportedException("Derived property versionedData not yet supported"); } } } diff --git a/SysML2.NET/PIM/POCO/CommitReference.cs b/SysML2.NET/PIM/POCO/CommitReference.cs index a296c0465..7b65d95fc 100644 --- a/SysML2.NET/PIM/POCO/CommitReference.cs +++ b/SysML2.NET/PIM/POCO/CommitReference.cs @@ -34,26 +34,26 @@ public abstract class CommitReference : Record /// /// Gets or sets the timestamp at which the was created. /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1628778313797_665973_538", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DateTime Created { get; set; } /// /// Gets or sets the timestamp at which the was deleted /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_2022x_2_f940371_1740179401841_624617_283", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DateTime Deleted { get; set; } /// /// Gets or sets the name of the /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1671293488580_668503_7742", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [RedefinedProperty(propertyName: "Record.Name")] public new string Name { get; set; } /// /// Gets or sets the Project that owns the given /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1628779129336_65342_713", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Project OwningProject { get; set; } } } diff --git a/SysML2.NET/PIM/POCO/CompositeConstraint.cs b/SysML2.NET/PIM/POCO/CompositeConstraint.cs index 08172eea0..eb5b2b788 100644 --- a/SysML2.NET/PIM/POCO/CompositeConstraint.cs +++ b/SysML2.NET/PIM/POCO/CompositeConstraint.cs @@ -36,13 +36,13 @@ public class CompositeConstraint : Constraint /// /// There must be at least 2 /// - [Property(lowerValue: 2, upperValue: int.MaxValue)] + [Property(xmiId: "_19_0_4_58901f1_1597377207847_92212_477", aggregation: AggregationKind.None, lowerValue: 2, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Constraint { get; set; } = []; /// /// Gets or sets the logical operator for composing the s /// - [Property(lowerValue: 1, upperValue: 1)] + [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: true, defaultValue: null)] public JoinOperator Operator { get; set; } } } diff --git a/SysML2.NET/PIM/POCO/DataDifference.cs b/SysML2.NET/PIM/POCO/DataDifference.cs index fe3accbff..27edaedc5 100644 --- a/SysML2.NET/PIM/POCO/DataDifference.cs +++ b/SysML2.NET/PIM/POCO/DataDifference.cs @@ -30,13 +30,13 @@ public class DataDifference /// /// Gets or sets the taken as the baseline of the comparison, or null when the data was added /// - [Property(lowerValue: 0, upperValue: 1)] + [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: true, defaultValue: null)] public DataVersion BaseData { get; set; } /// /// Gets or sets the compared against the baseline, or null when the data was deleted /// - [Property(lowerValue: 0, upperValue: 1)] + [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: true, defaultValue: null)] public DataVersion CompareData { get; set; } } } \ No newline at end of file diff --git a/SysML2.NET/PIM/POCO/DataIdentity.cs b/SysML2.NET/PIM/POCO/DataIdentity.cs index 05f0b052f..d786aa98b 100644 --- a/SysML2.NET/PIM/POCO/DataIdentity.cs +++ b/SysML2.NET/PIM/POCO/DataIdentity.cs @@ -34,7 +34,7 @@ public class DataIdentity : Record /// /// Gets or sets the the set of records representing all versions of the given /// - [Property(lowerValue: 1, upperValue: int.MaxValue)] + [Property(xmiId: "_19_0_2_12e503d9_1577820469729_822777_66066", aggregation: AggregationKind.None, lowerValue: 1, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Version { get; set; } = []; } } diff --git a/SysML2.NET/PIM/POCO/DataVersion.cs b/SysML2.NET/PIM/POCO/DataVersion.cs index 710bbc6f5..61556a2a5 100644 --- a/SysML2.NET/PIM/POCO/DataVersion.cs +++ b/SysML2.NET/PIM/POCO/DataVersion.cs @@ -35,13 +35,13 @@ public class DataVersion : Record /// /// Gets or sets the at which the wrapped data (payload) was created, modified, or deleted. /// - [Property(lowerValue: 1, upperValue: 1)] + [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: true, defaultValue: null)] public Commit Commit { get; set; } /// /// Gets or sets a reference to corresponding the /// - [Property(lowerValue: 1, upperValue: 1)] + [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: true, defaultValue: null)] public DataIdentity Identity { get; set; } /// @@ -50,19 +50,24 @@ public class DataVersion : Record /// /// null when no data with the given identity is present at the . /// - [Property(lowerValue: 0, upperValue: 1)] + [Property(xmiId: "_19_0_2_12e503d9_1577820469731_381637_66070", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public IData Payload { get; set; } /// - /// Queries the derived property + /// Gets the that owns the /// - /// The that owns the . - /// Thrown until the derivation is supported. - [Property(lowerValue: 1, upperValue: 1, isDerived: true)] - [DerivedProperty(name: "Project")] - public Project QueryProject() + [Property(xmiId: "_19_0_2_12e503d9_1577820469730_358203_66069", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: true, defaultValue: null)] + public Project project => this.ComputeProject(); + + /// + /// Computes the owning from the owning project of + /// + /// The that owns the . + /// Thrown until the derivation is supported. + [DerivedProperty(nameof(project))] + private Project ComputeProject() { - throw new NotImplementedException("Derived property Project not yet supported"); + throw new NotSupportedException("Derived property project not yet supported"); } } } diff --git a/SysML2.NET/PIM/POCO/ExternalData.cs b/SysML2.NET/PIM/POCO/ExternalData.cs index 45ee9a646..6ff3cbd76 100644 --- a/SysML2.NET/PIM/POCO/ExternalData.cs +++ b/SysML2.NET/PIM/POCO/ExternalData.cs @@ -34,13 +34,13 @@ public class ExternalData : IData /// /// Gets or sets the unique identifier /// - [Property(lowerValue: 1, upperValue: 1, isReadOnly: true)] + [Property(xmiId: "sysml2.net", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Guid Id { get; set; } /// /// Gets or sets the string representation of the IRI of the resource represented by the ExternalData /// - [Property(lowerValue: 1, upperValue: 1)] + [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: true, defaultValue: null)] public string ResourceIdentifier { get; set; } } } diff --git a/SysML2.NET/PIM/POCO/ExternalRelationship.cs b/SysML2.NET/PIM/POCO/ExternalRelationship.cs index 4f6b36867..a53f75c83 100644 --- a/SysML2.NET/PIM/POCO/ExternalRelationship.cs +++ b/SysML2.NET/PIM/POCO/ExternalRelationship.cs @@ -38,7 +38,7 @@ public class ExternalRelationship : IData /// /// Gets or sets the unique identifier /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "sysml2.net", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Guid Id { get; set; } /// @@ -48,25 +48,25 @@ public class ExternalRelationship : IData /// would contain mathematical expressions, such as equations, representing the mapping.This is an optional /// attribute. /// - [Property(lowerValue: 0, upperValue: 1)] + [Property(xmiId: "_19_0_2_58901f1_1596708855858_697400_1579", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string Specification { get; set; } /// /// Gets or sets the name of the expression language used for the specification. This is an optional attribute. /// - [Property(lowerValue: 0, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1629815682552_46136_30600", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string Language { get; set; } /// /// Gets or sets the /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1629755852196_23786_29899", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public IElement ElementEnd { get; set; } /// /// Gets or sets the /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1629755861218_259967_29912", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public ExternalData ExternalDataEnd { get; set; } } } diff --git a/SysML2.NET/PIM/POCO/MergeResult.cs b/SysML2.NET/PIM/POCO/MergeResult.cs index 17c44ecd0..5097ecca0 100644 --- a/SysML2.NET/PIM/POCO/MergeResult.cs +++ b/SysML2.NET/PIM/POCO/MergeResult.cs @@ -32,13 +32,13 @@ public class MergeResult /// /// Gets or sets the records that could not be merged automatically /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] + [Property(xmiId: "_19_0_4_58901f1_1667600196883_169912_162", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Conflict { get; set; } = []; /// /// Gets or sets the that records the merge /// - [Property(lowerValue: 0, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1667600196883_581172_161", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Commit MergeCommit { get; set; } } } \ No newline at end of file diff --git a/SysML2.NET/PIM/POCO/PrimitiveConstraint.cs b/SysML2.NET/PIM/POCO/PrimitiveConstraint.cs index 1b1ed9196..e439ee1eb 100644 --- a/SysML2.NET/PIM/POCO/PrimitiveConstraint.cs +++ b/SysML2.NET/PIM/POCO/PrimitiveConstraint.cs @@ -33,25 +33,25 @@ public class PrimitiveConstraint : Constraint /// /// Gets or sets the name of a property of Element or its subtypes that is being constrained /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1597377425985_159367_499", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string Property { get; set; } /// /// Gets or sets the mathematical operatores /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1597377427373_325175_501", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Operator Operator { get; set; } /// /// Gets or sets list of primitive objects, such as String, Boolean, Integer, Double, and UUID /// - [Property(lowerValue: 1, upperValue: int.MaxValue)] + [Property(xmiId: "_19_0_4_58901f1_1597377431228_229452_503", aggregation: AggregationKind.None, lowerValue: 1, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Value { get; set; } = []; /// /// Gets or sets a value indicating a logical NOT operator is applied to the /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1597377338703_200864_497", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public bool Inverse { get; set; } } } \ No newline at end of file diff --git a/SysML2.NET/PIM/POCO/Project.cs b/SysML2.NET/PIM/POCO/Project.cs index 07626e172..aef820771 100644 --- a/SysML2.NET/PIM/POCO/Project.cs +++ b/SysML2.NET/PIM/POCO/Project.cs @@ -37,14 +37,14 @@ public class Project : Record /// /// Gets or sets a human-friendly identifier for a Project /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1671293441918_865671_7736", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [RedefinedProperty(propertyName: "Record.Name")] public new string Name { get; set; } /// /// Gets or sets the timestamp at which the was created /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_f940371_1694730728649_158871_419", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DateTime Created { get; set; } /// @@ -54,39 +54,39 @@ public class Project : Record /// /// this is a derived attribute /// - [Property(lowerValue: 0, upperValue: int.MaxValue, isDerived: true)] - public IEnumerable IdentifiedData => throw new NotImplementedException(); + [Property(xmiId: "sysml2.net", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: true, isDerivedUnion: false, isUnique: true, defaultValue: null)] + public IEnumerable identifiedData => this.ComputeIdentifiedData(); /// /// Gets all the s in the /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] + [Property(xmiId: "_19_0_2_12e503d9_1577820469733_493524_66075", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Commits { get; set; } = []; /// /// Gets or sets all s in the /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] + [Property(xmiId: "_19_0_4_58901f1_1628779129336_898482_712", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List CommitReferences { get; set; } = []; /// /// Gets all the branches in the which is a subset of /// - [Property(lowerValue: 1, upperValue: int.MaxValue, isDerived: true)] + [Property(xmiId: "_19_0_4_58901f1_1614694201382_729306_245", aggregation: AggregationKind.None, lowerValue: 1, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "Project.CommitReferences")] public IEnumerable Branches => this.CommitReferences.OfType(); /// /// Gets or sets the default in the which is a subset of /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1614694296040_474053_271", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "Project.Branches")] public Branch DefaultBranch { get; set; } /// /// Gets all the s in the which is a subset of /// - [Property(lowerValue: 0, upperValue: int.MaxValue, isDerived: true)] + [Property(xmiId: "_19_0_4_58901f1_1628779424605_974596_740", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "Project.CommitReferences")] public IEnumerable Tags => this.CommitReferences.OfType(); @@ -94,7 +94,18 @@ public class Project : Record /// Gets or sets the records owned by the . Each record represents a /// saved for the given . /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] + [Property(xmiId: "_19_0_4_58901f1_1597396233220_492135_901", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Queries { get; set; } = []; + + /// + /// Computes the records corresponding to the contained in the + /// + /// The set of records contained in the . + /// Thrown until the derivation is supported. + [DerivedProperty(nameof(identifiedData))] + private IEnumerable ComputeIdentifiedData() + { + throw new NotSupportedException("Derived property identifiedData not yet supported"); + } } } diff --git a/SysML2.NET/PIM/POCO/ProjectUsage.cs b/SysML2.NET/PIM/POCO/ProjectUsage.cs index d5e91c605..34dcb9f9e 100644 --- a/SysML2.NET/PIM/POCO/ProjectUsage.cs +++ b/SysML2.NET/PIM/POCO/ProjectUsage.cs @@ -34,19 +34,19 @@ public class ProjectUsage : IData /// /// Gets or sets the unique identifier /// - [Property(lowerValue: 1, upperValue: 1, isReadOnly: true)] + [Property(xmiId: "sysml2.net", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Guid Id { get; set; } /// /// Gets or sets the reference to the of the being used. /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1628380685338_895164_312", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Commit UsedCommit { get; set; } /// /// Gets or sets the reference to the being used. /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "sysml2.net", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Project UsedProject { get; set; } } } diff --git a/SysML2.NET/PIM/POCO/Query.cs b/SysML2.NET/PIM/POCO/Query.cs index a31388a2a..d4b03a2c4 100644 --- a/SysML2.NET/PIM/POCO/Query.cs +++ b/SysML2.NET/PIM/POCO/Query.cs @@ -1,76 +1,76 @@ -// ------------------------------------------------------------------------------------------------- -// -// -// Copyright 2022-2025 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. -// -// -// ------------------------------------------------------------------------------------------------ - -namespace SysML2.NET.PIM.POCO -{ - using System.Collections.Generic; - - using SysML2.NET.Common; - using SysML2.NET.Decorators; - - /// - /// is a subclass of that represents a precise and language-independent - /// request for information retrieval using the Systems Modeling API and Services. - /// can be mapped to commonly used query languages, such as SQL, Gremlin, GraphQL, and SPARQL - /// - public class Query : Record - { - /// - /// Gets or sets the name of the Query - /// - [Property(lowerValue: 1, upperValue: 1)] - [RedefinedProperty(propertyName: "Record.Name")] - public new string Name { get; set; } - - /// - /// Gets or sets the that owns the - /// - [Property(lowerValue: 1, upperValue: 1)] - public Project Project { get; set; } - - /// - /// list of properties of Element or its subtypes that will be included for each Element object in the - /// query response. Element is the root-metaclass in KerML. If no properties are specified, then all the - /// properties will be included for each Element in the query response - /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] - public List Select { get; set; } = []; - - /// - /// Gets or sets the list of Element objects that define the scope for query execution. The default scope of a is - /// the owning - /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] - public List Scope { get; set; } = []; - - /// - /// represents the conditions that Elements in the query response must satisfy - /// - [Property(lowerValue: 1, upperValue: 1)] - public Constraint Where { get; set; } - - /// - /// Gets or sets a list of properties of Data (or its realizations) that are used for sorting the Data objects in the - /// query response.The order of properties in the list governs the sorting order - /// - [Property(lowerValue: 0, upperValue: int.MaxValue, isOrdered: true)] - public List OrderBy { get; set; } = []; - } -} +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2025 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. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.PIM.POCO +{ + using System.Collections.Generic; + + using SysML2.NET.Common; + using SysML2.NET.Decorators; + + /// + /// is a subclass of that represents a precise and language-independent + /// request for information retrieval using the Systems Modeling API and Services. + /// can be mapped to commonly used query languages, such as SQL, Gremlin, GraphQL, and SPARQL + /// + public class Query : Record + { + /// + /// Gets or sets the name of the Query + /// + [Property(xmiId: "_19_0_4_58901f1_1671293480578_778123_7740", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] + [RedefinedProperty(propertyName: "Record.Name")] + public new string Name { get; set; } + + /// + /// Gets or sets the that owns the + /// + [Property(xmiId: "_19_0_4_58901f1_1597396233221_999408_902", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] + public Project Project { get; set; } + + /// + /// list of properties of Element or its subtypes that will be included for each Element object in the + /// query response. Element is the root-metaclass in KerML. If no properties are specified, then all the + /// properties will be included for each Element in the query response + /// + [Property(xmiId: "_19_0_4_58901f1_1597377655027_119603_507", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] + public List Select { get; set; } = []; + + /// + /// Gets or sets the list of Element objects that define the scope for query execution. The default scope of a is + /// the owning + /// + [Property(xmiId: "_19_0_4_58901f1_1597377703876_758020_511", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] + public List Scope { get; set; } = []; + + /// + /// represents the conditions that Elements in the query response must satisfy + /// + [Property(xmiId: "_19_0_4_58901f1_1597377630809_759194_505", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] + public Constraint Where { get; set; } + + /// + /// Gets or sets a list of properties of Data (or its realizations) that are used for sorting the Data objects in the + /// query response.The order of properties in the list governs the sorting order + /// + [Property(xmiId: "_19_0_4_58901f1_1597387733264_611302_866", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] + public List OrderBy { get; set; } = []; + } +} diff --git a/SysML2.NET/PIM/POCO/Tag.cs b/SysML2.NET/PIM/POCO/Tag.cs index 47940d448..c0768348e 100644 --- a/SysML2.NET/PIM/POCO/Tag.cs +++ b/SysML2.NET/PIM/POCO/Tag.cs @@ -35,7 +35,7 @@ public class Tag : CommitReference /// Gets or sets a reference to the which the Tag is pointing. It represents a /// -of-interest in the owning . /// - [Property(lowerValue: 1, upperValue: 1)] + [Property(xmiId: "_19_0_4_58901f1_1628778728157_220677_662", aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Commit TaggedCommit { get; set; } } } diff --git a/SysML2.NET/PIM/Record.cs b/SysML2.NET/PIM/Record.cs index caf6522a4..f24d14ef0 100644 --- a/SysML2.NET/PIM/Record.cs +++ b/SysML2.NET/PIM/Record.cs @@ -1,76 +1,76 @@ - // ------------------------------------------------------------------------------------------------- -// -// -// Copyright 2022-2025 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. -// -// -// ------------------------------------------------------------------------------------------------ - -namespace SysML2.NET.PIM -{ - using System; - using System.Collections.Generic; - - using SysML2.NET.Common; - using SysML2.NET.Decorators; - - /// - /// A Record represents any data that is consumed (input) or produced (output) by the Systems Modeling API - /// and Services.A Record is an abstract concept from which other concrete concepts inherit. - /// - public abstract class Record : IIdentified - { - /// - /// Initializes a new instance of the class. - /// - protected Record() - { - this.Alias = new List(); - } - - /// - /// Gets or sets the unique identifier of the - /// - [Property(lowerValue: 1, upperValue: 1)] - public Guid Id { get; set; } - - /// - /// Gets or sets string representation of the IRI for the - /// - [Property(lowerValue: 0, upperValue: 1)] - public string ResourceIdentifier { get; set; } - - /// - /// Gets or sets a collection of other identifiers for this record, especially if the record was created or represented - /// in other software applications and systems - /// - [Property(lowerValue: 0, upperValue: int.MaxValue)] - public List Alias { get; set; } - - /// - /// Gets or sets a statement that provides details about the . - /// - [Property(lowerValue: 1, upperValue: 1)] - public string Description { get; set; } - - /// - /// Gets or sets an optional human-friendly identifier for a record. The value assigned to the name for a given - /// record must be in the set of values assigned to alias for that record - /// - [Property(lowerValue: 0, upperValue: 1)] - [SubsettedProperty(propertyName: "Record.Alias")] - public string Name { get; set; } - } -} + // ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2025 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. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.PIM +{ + using System; + using System.Collections.Generic; + + using SysML2.NET.Common; + using SysML2.NET.Decorators; + + /// + /// A Record represents any data that is consumed (input) or produced (output) by the Systems Modeling API + /// and Services.A Record is an abstract concept from which other concrete concepts inherit. + /// + public abstract class Record : IIdentified + { + /// + /// Initializes a new instance of the class. + /// + protected Record() + { + this.Alias = new List(); + } + + /// + /// Gets or sets the unique identifier of the + /// + [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: true, defaultValue: null)] + public Guid Id { get; set; } + + /// + /// Gets or sets string representation of the IRI for the + /// + [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: true, defaultValue: null)] + public string ResourceIdentifier { get; set; } + + /// + /// Gets or sets a collection of other identifiers for this record, especially if the record was created or represented + /// in other software applications and systems + /// + [Property(xmiId: "_19_0_2_12e503d9_1577820469740_197983_66089", aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] + public List Alias { get; set; } + + /// + /// Gets or sets a statement that provides details about the . + /// + [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: true, defaultValue: null)] + public string Description { get; set; } + + /// + /// Gets or sets an optional human-friendly identifier for a record. The value assigned to the name for a given + /// record must be in the set of values assigned to alias for that record + /// + [Property(xmiId: "_19_0_2_12e503d9_1577820469741_716007_66090", aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] + [SubsettedProperty(propertyName: "Record.Alias")] + public string Name { get; set; } + } +}