From 29e60b1e0364b4d8016ae9ecb20f2dc739ffc49b Mon Sep 17 00:00:00 2001 From: samatstarion Date: Sat, 6 Jun 2026 15:25:14 +0200 Subject: [PATCH 1/4] [Add] uml-like metadata decorators on the model; fixes #27 Adds ClassAttribute and PropertyAttribute decorators (plus an AggregationKind enum) under ReqIFSharp/Decorators, modelled on uml4net's Decorators, and applies them to all 54 model classes so the ReqIF metamodel (abstractness, multiplicity, containment vs reference) is self-documenting. Multiplicity and aggregation values are sourced from the embedded reqif.xsd. A reflection-driven ModelMetadataTestFixture guards completeness: it fails if any model class or metamodel property is left undecorated, with a documented exclusion list for container back-references and convenience accessors. The decorators are inert metadata, so serialization behaviour is unchanged. --- .../Decorators/ClassAttributeTestFixture.cs | 64 ++++++ .../Decorators/ModelMetadataTestFixture.cs | 203 ++++++++++++++++++ .../PropertyAttributeTestFixture.cs | 77 +++++++ ReqIFSharp/AccessControlledElement.cs | 2 + ReqIFSharp/AlternativeID.cs | 2 + .../AttributeDefinition.cs | 1 + .../AttributeDefinitionBoolean.cs | 3 + .../AttributeDefinitionDate.cs | 3 + .../AttributeDefinitionEnumeration.cs | 4 + .../AttributeDefinitionInteger.cs | 3 + .../AttributeDefinitionReal.cs | 3 + .../AttributeDefinitionSimple.cs | 1 + .../AttributeDefinitionString.cs | 3 + .../AttributeDefinitionXHTML.cs | 3 + ReqIFSharp/AttributeValue/AttributeValue.cs | 1 + .../AttributeValue/AttributeValueBoolean.cs | 3 + .../AttributeValue/AttributeValueDate.cs | 3 + .../AttributeValueEnumeration.cs | 3 + .../AttributeValue/AttributeValueInteger.cs | 3 + .../AttributeValue/AttributeValueReal.cs | 3 + .../AttributeValue/AttributeValueSimple.cs | 1 + .../AttributeValue/AttributeValueString.cs | 3 + .../AttributeValue/AttributeValueXHTML.cs | 5 + ReqIFSharp/AttributeValue/ExternalObject.cs | 5 + ReqIFSharp/Datatype/DatatypeDefinition.cs | 1 + .../Datatype/DatatypeDefinitionBoolean.cs | 1 + ReqIFSharp/Datatype/DatatypeDefinitionDate.cs | 1 + .../Datatype/DatatypeDefinitionEnumeration.cs | 2 + .../Datatype/DatatypeDefinitionInteger.cs | 3 + ReqIFSharp/Datatype/DatatypeDefinitionReal.cs | 4 + .../Datatype/DatatypeDefinitionSimple.cs | 1 + .../Datatype/DatatypeDefinitionString.cs | 4 +- .../Datatype/DatatypeDefinitionXHTML.cs | 1 + ReqIFSharp/Datatype/EmbeddedValue.cs | 3 + ReqIFSharp/Datatype/EnumValue.cs | 2 + ReqIFSharp/Decorators/AggregationKind.cs | 45 ++++ ReqIFSharp/Decorators/ClassAttribute.cs | 58 +++++ ReqIFSharp/Decorators/PropertyAttribute.cs | 126 +++++++++++ ReqIFSharp/Identifiable.cs | 6 + ReqIFSharp/ReqIF.cs | 5 + ReqIFSharp/ReqIFContent.cs | 7 + ReqIFSharp/ReqIFHeader.cs | 9 + ReqIFSharp/ReqIFToolExtension.cs | 2 + .../RelationGroup.cs | 5 + .../SpecElementWithAttributes.cs | 2 + .../SpecHierarchy.cs | 5 + .../SpecElementWithAttributes/SpecObject.cs | 2 + .../SpecElementWithAttributes/SpecRelation.cs | 4 + .../Specification.cs | 3 + ReqIFSharp/SpecType/RelationGroupType.cs | 1 + ReqIFSharp/SpecType/SpecObjectType.cs | 1 + ReqIFSharp/SpecType/SpecRelationType.cs | 1 + ReqIFSharp/SpecType/SpecType.cs | 2 + ReqIFSharp/SpecType/SpecificationType.cs | 1 + 54 files changed, 709 insertions(+), 1 deletion(-) create mode 100644 ReqIFSharp.Tests/Decorators/ClassAttributeTestFixture.cs create mode 100644 ReqIFSharp.Tests/Decorators/ModelMetadataTestFixture.cs create mode 100644 ReqIFSharp.Tests/Decorators/PropertyAttributeTestFixture.cs create mode 100644 ReqIFSharp/Decorators/AggregationKind.cs create mode 100644 ReqIFSharp/Decorators/ClassAttribute.cs create mode 100644 ReqIFSharp/Decorators/PropertyAttribute.cs diff --git a/ReqIFSharp.Tests/Decorators/ClassAttributeTestFixture.cs b/ReqIFSharp.Tests/Decorators/ClassAttributeTestFixture.cs new file mode 100644 index 0000000..a8a68e3 --- /dev/null +++ b/ReqIFSharp.Tests/Decorators/ClassAttributeTestFixture.cs @@ -0,0 +1,64 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2017-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace ReqIFSharp.Tests.Decorators +{ + using NUnit.Framework; + + using ReqIFSharp; + + /// + /// Suite of tests for the class + /// + [TestFixture] + public class ClassAttributeTestFixture + { + [Test] + public void Verify_that_default_constructor_values_are_as_expected() + { + var classAttribute = new ClassAttribute(); + + Assert.That(classAttribute.Name, Is.EqualTo(string.Empty)); + Assert.That(classAttribute.IsAbstract, Is.False); + } + + [Test] + public void Verify_that_constructor_sets_properties_as_expected() + { + var classAttribute = new ClassAttribute("SPEC-OBJECT", true); + + Assert.That(classAttribute.Name, Is.EqualTo("SPEC-OBJECT")); + Assert.That(classAttribute.IsAbstract, Is.True); + } + + [Test] + public void Verify_that_properties_can_be_set() + { + var classAttribute = new ClassAttribute + { + Name = "SPEC-RELATION", + IsAbstract = true + }; + + Assert.That(classAttribute.Name, Is.EqualTo("SPEC-RELATION")); + Assert.That(classAttribute.IsAbstract, Is.True); + } + } +} diff --git a/ReqIFSharp.Tests/Decorators/ModelMetadataTestFixture.cs b/ReqIFSharp.Tests/Decorators/ModelMetadataTestFixture.cs new file mode 100644 index 0000000..a5883b8 --- /dev/null +++ b/ReqIFSharp.Tests/Decorators/ModelMetadataTestFixture.cs @@ -0,0 +1,203 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2017-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace ReqIFSharp.Tests.Decorators +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Reflection; + + using NUnit.Framework; + + using ReqIFSharp; + + // ReqIFSharp.PropertyAttribute collides with NUnit.Framework.PropertyAttribute; alias to the model decorator. + using PropertyAttribute = ReqIFSharp.PropertyAttribute; + + /// + /// Reflection-driven completeness guard that verifies every model class and metamodel property + /// in the assembly is decorated with the + /// and metadata decorators. When a new model class or property + /// is added, this fixture fails until the decorators are applied (or the property is added to the + /// documented exclusion list of infrastructure / back-reference members). + /// + [TestFixture] + public class ModelMetadataTestFixture + { + /// + /// Names of properties that are NOT part of the ReqIF metamodel and therefore intentionally + /// carry no : container back-references, owner links and + /// programming-convenience accessors. + /// + private static readonly HashSet ExcludedPropertyNames = new HashSet + { + "ObjectValue", // convenience accessor that aliases TheValue / Values + "DatatypeDefinition", // AttributeDefinition base accessor that aliases the concrete Type + "AttributeDefinition", // AttributeValue base accessor that aliases the concrete Definition + "ExternalObjects", // derived from the parsed XHTML content + "OwningDefinition", // back-reference to the owning AttributeDefinition + "Definition", // see note below - kept, handled explicitly (NOT excluded) + "SpecElAt", // back-reference to the owning SpecElementWithAttributes + "SpecType", // AttributeDefinition back-reference to its owning SpecType + "ReqIFContent", // back-reference to the owning ReqIFContent + "ReqIfContent", // back-reference (SpecHierarchy casing variant) + "DocumentRoot", // back-reference to the owning ReqIF + "CoreContent", // RelationGroup back-reference to the owning ReqIFContent + "Root", // SpecHierarchy back-reference to the owning Specification + "Container", // SpecHierarchy back-reference to the parent SpecHierarchy + "DataTpeDefEnum", // EnumValue back-reference to the owning DatatypeDefinitionEnumeration + "EnumValue", // EmbeddedValue back-reference to the owning EnumValue + "Owner", // ExternalObject back-reference to the owning AttributeValueXHTML + "Ident" // AlternativeId back-reference to the owning Identifiable + }; + + /// + /// Returns every model class in the assembly. A model class is one + /// that derives from or , or is one of + /// the remaining stand-alone model classes. + /// + private static IEnumerable ModelTypes() + { + var standalone = new[] + { + typeof(ReqIF), typeof(ReqIFContent), typeof(ReqIFHeader), typeof(ReqIFToolExtension), + typeof(AlternativeId), typeof(EmbeddedValue), typeof(ExternalObject) + }; + + return typeof(Identifiable).Assembly.GetTypes() + .Where(t => t.IsClass + && (typeof(Identifiable).IsAssignableFrom(t) + || typeof(AttributeValue).IsAssignableFrom(t) + || standalone.Contains(t))); + } + + /// + /// Returns the public, instance properties declared directly on that + /// are expected to carry a (i.e. metamodel features), filtering + /// out the documented infrastructure / back-reference exclusions. The Definition property + /// IS a metamodel reference and is therefore kept even though it appears in the lookup set above + /// only for documentation - it is removed from the exclusion set here. + /// + private static IEnumerable MetamodelProperties(Type type) + { + return type.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly) + .Where(p => p.GetMethod != null && p.GetMethod.IsPublic) + .Where(p => p.Name == "Definition" || !ExcludedPropertyNames.Contains(p.Name)); + } + + [Test] + public void Verify_that_every_model_class_is_decorated_with_ClassAttribute() + { + var offenders = ModelTypes() + .Where(t => t.GetCustomAttribute() == null) + .Select(t => t.Name) + .ToList(); + + Assert.That(offenders, Is.Empty, + $"The following model classes are missing the [Class] decorator: {string.Join(", ", offenders)}"); + } + + [Test] + public void Verify_that_ClassAttribute_IsAbstract_matches_the_type() + { + foreach (var type in ModelTypes()) + { + var classAttribute = type.GetCustomAttribute(); + + Assert.That(classAttribute, Is.Not.Null, $"{type.Name} is missing the [Class] decorator."); + Assert.That(classAttribute.IsAbstract, Is.EqualTo(type.IsAbstract), + $"[Class].IsAbstract on {type.Name} does not match the type's abstractness."); + Assert.That(classAttribute.Name, Is.Not.Empty, $"[Class].Name on {type.Name} should not be empty."); + } + } + + [Test] + public void Verify_that_every_metamodel_property_is_decorated_with_PropertyAttribute() + { + var offenders = new List(); + + foreach (var type in ModelTypes()) + { + foreach (var property in MetamodelProperties(type)) + { + if (property.GetCustomAttribute() == null) + { + offenders.Add($"{type.Name}.{property.Name}"); + } + } + } + + Assert.That(offenders, Is.Empty, + $"The following metamodel properties are missing the [Property] decorator: {string.Join(", ", offenders)}"); + } + + [Test] + public void Verify_that_every_PropertyAttribute_has_consistent_multiplicity() + { + foreach (var type in ModelTypes()) + { + foreach (var property in MetamodelProperties(type)) + { + var propertyAttribute = property.GetCustomAttribute(); + + if (propertyAttribute == null) + { + continue; + } + + Assert.That(propertyAttribute.LowerValue, Is.GreaterThanOrEqualTo(0), + $"{type.Name}.{property.Name} has a negative lower bound."); + Assert.That(propertyAttribute.UpperValue, Is.GreaterThanOrEqualTo(1), + $"{type.Name}.{property.Name} has an upper bound below 1."); + Assert.That(propertyAttribute.UpperValue, Is.GreaterThanOrEqualTo(propertyAttribute.LowerValue), + $"{type.Name}.{property.Name} has an upper bound below its lower bound."); + } + } + } + + [Test] + public void Verify_known_property_metadata_spot_checks() + { + AssertProperty(typeof(SpecObject), nameof(SpecObject.Type), AggregationKind.None, 1, 1); + AssertProperty(typeof(ReqIFContent), nameof(ReqIFContent.SpecObjects), AggregationKind.Composite, 0, int.MaxValue); + AssertProperty(typeof(Identifiable), nameof(Identifiable.Identifier), AggregationKind.None, 1, 1); + AssertProperty(typeof(Identifiable), nameof(Identifiable.AlternativeId), AggregationKind.Composite, 0, 1); + AssertProperty(typeof(AttributeDefinitionEnumeration), nameof(AttributeDefinitionEnumeration.IsMultiValued), AggregationKind.None, 1, 1); + AssertProperty(typeof(DatatypeDefinitionEnumeration), nameof(DatatypeDefinitionEnumeration.SpecifiedValues), AggregationKind.Composite, 0, int.MaxValue); + } + + private static void AssertProperty(Type type, string propertyName, AggregationKind aggregation, int lower, int upper) + { + var property = type.GetProperty(propertyName); + Assert.That(property, Is.Not.Null, $"{type.Name}.{propertyName} does not exist."); + + var propertyAttribute = property.GetCustomAttribute(); + Assert.That(propertyAttribute, Is.Not.Null, $"{type.Name}.{propertyName} is missing the [Property] decorator."); + + Assert.Multiple(() => + { + Assert.That(propertyAttribute.Aggregation, Is.EqualTo(aggregation), $"{type.Name}.{propertyName} aggregation"); + Assert.That(propertyAttribute.LowerValue, Is.EqualTo(lower), $"{type.Name}.{propertyName} lower bound"); + Assert.That(propertyAttribute.UpperValue, Is.EqualTo(upper), $"{type.Name}.{propertyName} upper bound"); + }); + } + } +} diff --git a/ReqIFSharp.Tests/Decorators/PropertyAttributeTestFixture.cs b/ReqIFSharp.Tests/Decorators/PropertyAttributeTestFixture.cs new file mode 100644 index 0000000..c0ca81c --- /dev/null +++ b/ReqIFSharp.Tests/Decorators/PropertyAttributeTestFixture.cs @@ -0,0 +1,77 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2017-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace ReqIFSharp.Tests.Decorators +{ + using NUnit.Framework; + + using ReqIFSharp; + + // ReqIFSharp.PropertyAttribute collides with NUnit.Framework.PropertyAttribute; alias to the model decorator. + using PropertyAttribute = ReqIFSharp.PropertyAttribute; + + /// + /// Suite of tests for the class + /// + [TestFixture] + public class PropertyAttributeTestFixture + { + [Test] + public void Verify_that_default_constructor_values_are_as_expected() + { + var propertyAttribute = new PropertyAttribute(); + + Assert.That(propertyAttribute.Aggregation, Is.EqualTo(AggregationKind.None)); + Assert.That(propertyAttribute.LowerValue, Is.EqualTo(1)); + Assert.That(propertyAttribute.UpperValue, Is.EqualTo(1)); + Assert.That(propertyAttribute.IsOrdered, Is.False); + Assert.That(propertyAttribute.IsReadOnly, Is.False); + Assert.That(propertyAttribute.IsDerived, Is.False); + Assert.That(propertyAttribute.IsDerivedUnion, Is.False); + Assert.That(propertyAttribute.IsUnique, Is.True); + Assert.That(propertyAttribute.DefaultValue, Is.Null); + } + + [Test] + public void Verify_that_constructor_sets_properties_as_expected() + { + var propertyAttribute = new PropertyAttribute( + aggregation: AggregationKind.Composite, + lowerValue: 0, + upperValue: int.MaxValue, + isOrdered: true, + isReadOnly: true, + isDerived: true, + isDerivedUnion: true, + isUnique: false, + defaultValue: "default"); + + Assert.That(propertyAttribute.Aggregation, Is.EqualTo(AggregationKind.Composite)); + Assert.That(propertyAttribute.LowerValue, Is.EqualTo(0)); + Assert.That(propertyAttribute.UpperValue, Is.EqualTo(int.MaxValue)); + Assert.That(propertyAttribute.IsOrdered, Is.True); + Assert.That(propertyAttribute.IsReadOnly, Is.True); + Assert.That(propertyAttribute.IsDerived, Is.True); + Assert.That(propertyAttribute.IsDerivedUnion, Is.True); + Assert.That(propertyAttribute.IsUnique, Is.False); + Assert.That(propertyAttribute.DefaultValue, Is.EqualTo("default")); + } + } +} diff --git a/ReqIFSharp/AccessControlledElement.cs b/ReqIFSharp/AccessControlledElement.cs index 71d4e65..5dc7f4c 100644 --- a/ReqIFSharp/AccessControlledElement.cs +++ b/ReqIFSharp/AccessControlledElement.cs @@ -32,6 +32,7 @@ namespace ReqIFSharp /// /// The is the base class for classes that may restrict user access to their information. /// + [Class(name: "ACCESS-CONTROLLED-ELEMENT", isAbstract: true)] public abstract class AccessControlledElement : Identifiable { /// @@ -66,6 +67,7 @@ protected AccessControlledElement(ILoggerFactory loggerFactory) /// True means that the element’s contents may be modified by the user of a tool containing the element. /// False or leaving isEditable out means that the element is read-only to the user of a tool containing the element. /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public bool IsEditable { get; set; } /// diff --git a/ReqIFSharp/AlternativeID.cs b/ReqIFSharp/AlternativeID.cs index 1409d0a..f6d1f1a 100644 --- a/ReqIFSharp/AlternativeID.cs +++ b/ReqIFSharp/AlternativeID.cs @@ -28,6 +28,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to provide an alternative, tool-specific identification. /// + [Class(name: "ALTERNATIVE-ID")] public class AlternativeId { /// @@ -52,6 +53,7 @@ internal AlternativeId(Identifiable identifiable) /// /// Gets or sets the optional alternative identifier, which may be a requirements management tool identifier or tool identifier /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string Identifier { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinition.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinition.cs index 50dcc75..d462880 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinition.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinition.cs @@ -36,6 +36,7 @@ namespace ReqIFSharp /// type. In , each attribute value ( element) is related to its data type ( element) via /// an attribute definition ( element). /// + [Class(name: "ATTRIBUTE-DEFINITION", isAbstract: true)] public abstract class AttributeDefinition : AccessControlledElement { /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs index 954f8d1..25d98c6 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs @@ -39,6 +39,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an attribute /// value if no attribute value is supplied by the user of the requirements authoring tool /// + [Class(name: "ATTRIBUTE-DEFINITION-BOOLEAN")] public class AttributeDefinitionBoolean : AttributeDefinitionSimple { /// @@ -84,11 +85,13 @@ internal AttributeDefinitionBoolean(SpecType specType, ILoggerFactory loggerFact /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] public AttributeValueBoolean DefaultValue { get; set; } /// /// Gets or sets the data type. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DatatypeDefinitionBoolean Type { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs index 2349c32..de893fb 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs @@ -40,6 +40,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an attribute /// value if no attribute value is supplied by the user of the requirements authoring tool /// + [Class(name: "ATTRIBUTE-DEFINITION-DATE")] public class AttributeDefinitionDate : AttributeDefinitionSimple { /// @@ -85,11 +86,13 @@ internal AttributeDefinitionDate(SpecType specType, ILoggerFactory loggerFactory /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] public AttributeValueDate DefaultValue { get; set; } /// /// Gets or sets the data type. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DatatypeDefinitionDate Type { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs index 90d667d..5bda7b9 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs @@ -39,6 +39,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an /// attribute value if no attribute value is supplied by the user of the requirements authoring tool. /// + [Class(name: "ATTRIBUTE-DEFINITION-ENUMERATION")] public class AttributeDefinitionEnumeration : AttributeDefinition { /// @@ -84,11 +85,13 @@ internal AttributeDefinitionEnumeration(SpecType specType, ILoggerFactory logger /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] public AttributeValueEnumeration DefaultValue { get; set; } /// /// Gets or sets the data type. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DatatypeDefinitionEnumeration Type { get; set; } /// @@ -134,6 +137,7 @@ protected override void SetDatatypeDefinition(DatatypeDefinition datatypeDefinit /// If set to false, this means that the user of a requirements authoring tool can pick exactly one of the values in the set of /// specified values as an enumeration attribute value. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public bool IsMultiValued { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs index 81df915..9a09857 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs @@ -41,6 +41,7 @@ namespace ReqIFSharp /// value if no attribute value is supplied by the user of the requirements authoring tool. /// ReqIfSharp supports 64 bit singed integers (long) with the following range: -9223372036854775808 to 9223372036854775807 /// + [Class(name: "ATTRIBUTE-DEFINITION-INTEGER")] public class AttributeDefinitionInteger : AttributeDefinitionSimple { /// @@ -86,11 +87,13 @@ internal AttributeDefinitionInteger(SpecType specType, ILoggerFactory loggerFact /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] public AttributeValueInteger DefaultValue { get; set; } /// /// Gets or sets the data type. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DatatypeDefinitionInteger Type { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs index ef867e4..a649190 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs @@ -40,6 +40,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an attribute /// value if no attribute value is supplied by the user of the requirements authoring tool. /// + [Class(name: "ATTRIBUTE-DEFINITION-REAL")] public class AttributeDefinitionReal : AttributeDefinitionSimple { /// @@ -85,11 +86,13 @@ internal AttributeDefinitionReal(SpecType specType, ILoggerFactory loggerFactory /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] public AttributeValueReal DefaultValue { get; set; } /// /// Gets or sets the data type. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DatatypeDefinitionReal Type { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionSimple.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionSimple.cs index b6aa7dc..1d03ccf 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionSimple.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionSimple.cs @@ -25,6 +25,7 @@ namespace ReqIFSharp /// /// The is the base class for simple type attributes. /// + [Class(name: "ATTRIBUTE-DEFINITION-SIMPLE", isAbstract: true)] public abstract class AttributeDefinitionSimple : AttributeDefinition { /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs index aa83263..5cda41b 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs @@ -39,6 +39,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an attribute /// value if no attribute value is supplied by the user of the requirements authoring tool. /// + [Class(name: "ATTRIBUTE-DEFINITION-STRING")] public class AttributeDefinitionString : AttributeDefinitionSimple { /// @@ -84,11 +85,13 @@ internal AttributeDefinitionString(SpecType specType, ILoggerFactory loggerFacto /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] public AttributeValueString DefaultValue { get; set; } /// /// Gets or sets the data type. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DatatypeDefinitionString Type { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs index ca4021e..14994f4 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs @@ -39,6 +39,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an attribute /// value if no attribute value is supplied by the user of the requirements authoring tool. /// + [Class(name: "ATTRIBUTE-DEFINITION-XHTML")] public class AttributeDefinitionXHTML : AttributeDefinition { /// @@ -84,11 +85,13 @@ internal AttributeDefinitionXHTML(SpecType specType, ILoggerFactory loggerFactor /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] public AttributeValueXHTML DefaultValue { get; set; } /// /// Gets or sets the data type. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DatatypeDefinitionXHTML Type { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValue.cs b/ReqIFSharp/AttributeValue/AttributeValue.cs index f2f8d92..ecce5d0 100644 --- a/ReqIFSharp/AttributeValue/AttributeValue.cs +++ b/ReqIFSharp/AttributeValue/AttributeValue.cs @@ -29,6 +29,7 @@ namespace ReqIFSharp /// /// The is the base class for attribute values. /// + [Class(name: "ATTRIBUTE-VALUE", isAbstract: true)] public abstract class AttributeValue { /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs b/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs index d99d326..6da7615 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs @@ -33,6 +33,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define a attribute value. /// + [Class(name: "ATTRIBUTE-VALUE-BOOLEAN")] public class AttributeValueBoolean : AttributeValueSimple { /// @@ -95,6 +96,7 @@ internal AttributeValueBoolean(SpecElementWithAttributes specElAt, ILoggerFactor /// /// Gets or sets the attribute value. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public bool TheValue { get; set; } /// @@ -120,6 +122,7 @@ public override object ObjectValue /// /// Gets or sets a reference to the value definition /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public AttributeDefinitionBoolean Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueDate.cs b/ReqIFSharp/AttributeValue/AttributeValueDate.cs index 57b2549..9253640 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueDate.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueDate.cs @@ -34,6 +34,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define a attribute value. /// + [Class(name: "ATTRIBUTE-VALUE-DATE")] public class AttributeValueDate : AttributeValueSimple { /// @@ -85,6 +86,7 @@ internal AttributeValueDate(SpecElementWithAttributes specElAt, ILoggerFactory l /// /// Gets or sets the attribute value. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DateTime TheValue { get; set; } /// @@ -110,6 +112,7 @@ public override object ObjectValue /// /// Gets or sets the Reference to the value definition. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public AttributeDefinitionDate Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs b/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs index f091876..428e895 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs @@ -34,6 +34,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define an enumeration attribute value. /// + [Class(name: "ATTRIBUTE-VALUE-ENUMERATION")] public class AttributeValueEnumeration : AttributeValue { /// @@ -101,6 +102,7 @@ internal AttributeValueEnumeration(SpecElementWithAttributes specElAt, ILoggerFa /// /// Gets s that are chosen from a set of specified values /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue)] public List Values => this.values; /// @@ -127,6 +129,7 @@ public override object ObjectValue /// /// Gets or sets the Reference to the attribute definition that relates the value to its data type. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public AttributeDefinitionEnumeration Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueInteger.cs b/ReqIFSharp/AttributeValue/AttributeValueInteger.cs index 51fb6fa..f3b005b 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueInteger.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueInteger.cs @@ -37,6 +37,7 @@ namespace ReqIFSharp /// /// ReqIfSharp supports 64 bit signed integers (long) with the following range: -9223372036854775808 to 9223372036854775807 /// + [Class(name: "ATTRIBUTE-VALUE-INTEGER")] public class AttributeValueInteger : AttributeValueSimple { /// @@ -99,6 +100,7 @@ internal AttributeValueInteger(SpecElementWithAttributes specElAt, ILoggerFactor /// /// Gets or sets the attribute value /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public long TheValue { get; set; } /// @@ -124,6 +126,7 @@ public override object ObjectValue /// /// Gets or sets the Reference to the value definition. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public AttributeDefinitionInteger Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueReal.cs b/ReqIFSharp/AttributeValue/AttributeValueReal.cs index ee60e2f..65f14bb 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueReal.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueReal.cs @@ -34,6 +34,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define a real attribute value. /// + [Class(name: "ATTRIBUTE-VALUE-REAL")] public class AttributeValueReal : AttributeValueSimple { /// @@ -96,6 +97,7 @@ internal AttributeValueReal(SpecElementWithAttributes specElAt, ILoggerFactory l /// /// Gets or sets the attribute value /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public double TheValue { get; set; } /// @@ -121,6 +123,7 @@ public override object ObjectValue /// /// Gets or sets the reference to the value definition /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public AttributeDefinitionReal Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueSimple.cs b/ReqIFSharp/AttributeValue/AttributeValueSimple.cs index 9340185..0386c10 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueSimple.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueSimple.cs @@ -25,6 +25,7 @@ namespace ReqIFSharp /// /// The is the base class for simple type attribute values. /// + [Class(name: "ATTRIBUTE-VALUE-SIMPLE", isAbstract: true)] public abstract class AttributeValueSimple : AttributeValue { /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueString.cs b/ReqIFSharp/AttributeValue/AttributeValueString.cs index 8a12987..bfe5a89 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueString.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueString.cs @@ -33,6 +33,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define a attribute value. /// + [Class(name: "ATTRIBUTE-VALUE-STRING")] public class AttributeValueString : AttributeValueSimple { /// @@ -85,6 +86,7 @@ internal AttributeValueString(SpecElementWithAttributes specElAt, ILoggerFactory /// /// Gets or sets the attribute value /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string TheValue { get; set; } /// @@ -102,6 +104,7 @@ public override object ObjectValue /// /// Gets or sets reference to the value definition /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public AttributeDefinitionString Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs b/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs index 777568a..35a2df9 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs @@ -37,6 +37,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define an attribute value with XHTML contents. /// + [Class(name: "ATTRIBUTE-VALUE-XHTML")] public class AttributeValueXHTML : AttributeValue { /// @@ -103,11 +104,13 @@ internal AttributeValueXHTML(AttributeDefinitionXHTML attributeDefinition, ILogg /// /// Gets or sets the XHTML Content /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string TheValue { get; set; } /// /// Gets or sets the Linkage to the original attribute value that has been saved if isSimplified is true. /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string TheOriginalValue { get; set; } /// @@ -138,6 +141,7 @@ public override object ObjectValue /// /// Gets or sets the Reference to the attribute definition that relates the value to its data type. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public AttributeDefinitionXHTML Definition { get; set; } /// @@ -180,6 +184,7 @@ protected override void SetAttributeDefinition(AttributeDefinition attributeDefi /// /// Gets or sets a value indicating whether the attribute value is a simplified representation of the original value. /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public bool IsSimplified { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/ExternalObject.cs b/ReqIFSharp/AttributeValue/ExternalObject.cs index 5ab5438..05aef6b 100644 --- a/ReqIFSharp/AttributeValue/ExternalObject.cs +++ b/ReqIFSharp/AttributeValue/ExternalObject.cs @@ -33,6 +33,7 @@ namespace ReqIFSharp /// /// The specification for the XTHML object element defines several XML attributes. For ReqIF, only a subset of these attributes is relevant and used. /// + [Class(name: "EXTERNAL-OBJECT")] public class ExternalObject { /// @@ -54,21 +55,25 @@ public ExternalObject(AttributeValueXHTML attributeValueXhtml) /// /// Gets or sets the Uri of the , this may be a relative uri or an absolute uri /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string Uri { get; set; } /// /// Gets or sets the MimeType of the external object represented as a string /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string MimeType { get; set; } /// /// Gets or sets the height of the external object in case it is an image /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public int? Height { get; set; } /// /// Gets or sets the width of the external object in case it is an image /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public int? Width { get; set; } /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinition.cs b/ReqIFSharp/Datatype/DatatypeDefinition.cs index a684da8..0b470b7 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinition.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinition.cs @@ -30,6 +30,7 @@ namespace ReqIFSharp /// /// The is the base class for all data types available to the Exchange Document. /// + [Class(name: "DATATYPE-DEFINITION", isAbstract: true)] public abstract class DatatypeDefinition : Identifiable { /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionBoolean.cs b/ReqIFSharp/Datatype/DatatypeDefinitionBoolean.cs index 595029e..08b1c04 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionBoolean.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionBoolean.cs @@ -32,6 +32,7 @@ namespace ReqIFSharp /// /// This element defines a data type for the representation of Boolean data values in the Exchange Document. /// + [Class(name: "DATATYPE-DEFINITION-BOOLEAN")] public class DatatypeDefinitionBoolean : DatatypeDefinitionSimple { /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionDate.cs b/ReqIFSharp/Datatype/DatatypeDefinitionDate.cs index 5833f1a..bc2ce0e 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionDate.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionDate.cs @@ -33,6 +33,7 @@ namespace ReqIFSharp /// /// This element defines a data type for the representation of Date and Time data values in the Exchange Document. /// + [Class(name: "DATATYPE-DEFINITION-DATE")] public class DatatypeDefinitionDate : DatatypeDefinitionSimple { /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs b/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs index d6bf111..dd77c49 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs @@ -37,6 +37,7 @@ namespace ReqIFSharp /// Data type definition for enumeration types. The set of enumeration values referenced by specifiedValues constrains the /// possible choices for enumeration attribute values /// + [Class(name: "DATATYPE-DEFINITION-ENUMERATION")] public class DatatypeDefinitionEnumeration : DatatypeDefinition { /// @@ -87,6 +88,7 @@ internal DatatypeDefinitionEnumeration(ReqIFContent reqIfContent, ILoggerFactory /// /// Gets the owned enumeration literals /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List SpecifiedValues => this.specifiedValues; /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs b/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs index ffe525a..f2cc891 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs @@ -37,6 +37,7 @@ namespace ReqIFSharp /// The representation of data values shall comply with the definitions in http://www.w3.org/TR/xmlschema-2/#integer /// ReqIfSharp supports 64-bit signed integers (long) with the following range: -9223372036854775808 to 9223372036854775807 /// + [Class(name: "DATATYPE-DEFINITION-INTEGER")] public class DatatypeDefinitionInteger : DatatypeDefinitionSimple { /// @@ -82,11 +83,13 @@ internal DatatypeDefinitionInteger(ReqIFContent reqIfContent, ILoggerFactory log /// /// Gets or sets a value that denotes the largest negative data value representable by this data type. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public long Min { get; set; } /// /// Gets or sets a value that denotes the largest positive data value representable by this data type. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public long Max { get; set; } /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs b/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs index b600e8e..182a149 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs @@ -32,6 +32,7 @@ namespace ReqIFSharp /// /// This element defines a data type for the representation of Real data values in the Exchange Document. /// + [Class(name: "DATATYPE-DEFINITION-REAL")] public class DatatypeDefinitionReal : DatatypeDefinitionSimple { /// @@ -77,16 +78,19 @@ internal DatatypeDefinitionReal(ReqIFContent reqIfContent, ILoggerFactory logger /// /// Gets or sets a value that Denotes the supported maximum precision of real numbers represented by this data type. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public long Accuracy { get; set; } /// /// Gets or sets a value that denotes the largest negative data value representable by this data type. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public double Min { get; set; } /// /// Gets or sets a value that denotes the largest positive data value representable by this data type. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public double Max { get; set; } /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionSimple.cs b/ReqIFSharp/Datatype/DatatypeDefinitionSimple.cs index 4830fa4..c4332d6 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionSimple.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionSimple.cs @@ -25,6 +25,7 @@ namespace ReqIFSharp /// /// The is the base class from which all primitive data types, except enumeration, are derived. /// + [Class(name: "DATATYPE-DEFINITION-SIMPLE", isAbstract: true)] public abstract class DatatypeDefinitionSimple : DatatypeDefinition { /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionString.cs b/ReqIFSharp/Datatype/DatatypeDefinitionString.cs index e31813b..c6158f0 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionString.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionString.cs @@ -35,7 +35,8 @@ namespace ReqIFSharp /// /// This element defines a data type for the representation of String data values in the Exchange Document. /// - public class DatatypeDefinitionString : DatatypeDefinitionSimple + [Class(name: "DATATYPE-DEFINITION-STRING")] + public class DatatypeDefinitionString : DatatypeDefinitionSimple { /// /// The used to log @@ -80,6 +81,7 @@ internal DatatypeDefinitionString(ReqIFContent reqIfContent, ILoggerFactory logg /// /// Gets or sets the maximum permissible string length /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public long MaxLength { get; set; } /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionXHTML.cs b/ReqIFSharp/Datatype/DatatypeDefinitionXHTML.cs index 6b99074..faa12f0 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionXHTML.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionXHTML.cs @@ -29,6 +29,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define XHTML formatted data. /// + [Class(name: "DATATYPE-DEFINITION-XHTML")] public class DatatypeDefinitionXHTML : DatatypeDefinition { /// diff --git a/ReqIFSharp/Datatype/EmbeddedValue.cs b/ReqIFSharp/Datatype/EmbeddedValue.cs index fada682..7190ed8 100644 --- a/ReqIFSharp/Datatype/EmbeddedValue.cs +++ b/ReqIFSharp/Datatype/EmbeddedValue.cs @@ -32,6 +32,7 @@ namespace ReqIFSharp /// /// The class represents additional information related to enumeration literals. /// + [Class(name: "EMBEDDED-VALUE")] public class EmbeddedValue { /// @@ -67,6 +68,7 @@ internal EmbeddedValue(EnumValue enumValue, ILoggerFactory loggerFactory) /// /// Gets or sets the numerical value corresponding to the enumeration literal. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public long Key { get; set; } /// @@ -75,6 +77,7 @@ internal EmbeddedValue(EnumValue enumValue, ILoggerFactory loggerFactory) /// /// example: a color /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string OtherContent { get; set; } /// diff --git a/ReqIFSharp/Datatype/EnumValue.cs b/ReqIFSharp/Datatype/EnumValue.cs index 0acd113..ce9cd02 100644 --- a/ReqIFSharp/Datatype/EnumValue.cs +++ b/ReqIFSharp/Datatype/EnumValue.cs @@ -29,6 +29,7 @@ namespace ReqIFSharp /// /// The class represents enumeration literals. /// + [Class(name: "ENUM-VALUE")] public class EnumValue : Identifiable { /// @@ -68,6 +69,7 @@ internal EnumValue(DatatypeDefinitionEnumeration datatypeDefinitionEnumeration, /// /// Gets or sets the owned /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 1, upperValue: 1)] public EmbeddedValue Properties { get; set; } /// diff --git a/ReqIFSharp/Decorators/AggregationKind.cs b/ReqIFSharp/Decorators/AggregationKind.cs new file mode 100644 index 0000000..279ce4a --- /dev/null +++ b/ReqIFSharp/Decorators/AggregationKind.cs @@ -0,0 +1,45 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2017-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------- + +namespace ReqIFSharp +{ + /// + /// Specifies the kind of aggregation that applies to a property, mirroring the UML + /// AggregationKind enumeration. It documents whether a property merely references + /// another model element or owns it (containment). + /// + public enum AggregationKind + { + /// + /// The property is a plain reference (or a scalar value); the referenced element is not owned. + /// + None, + + /// + /// The property is a shared aggregation; the referenced element may be shared by multiple owners. + /// + Shared, + + /// + /// The property is a composite aggregation; the owning element contains and owns the value(s). + /// + Composite + } +} diff --git a/ReqIFSharp/Decorators/ClassAttribute.cs b/ReqIFSharp/Decorators/ClassAttribute.cs new file mode 100644 index 0000000..c1f391c --- /dev/null +++ b/ReqIFSharp/Decorators/ClassAttribute.cs @@ -0,0 +1,58 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2017-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------- + +namespace ReqIFSharp +{ + using System; + + /// + /// Attribute used to decorate the model classes with metadata sourced from the ReqIF metamodel, + /// so that the relationships and characteristics of each class are self-documenting. + /// + [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] + public sealed class ClassAttribute : Attribute + { + /// + /// Initializes a new instance of the class. + /// + /// + /// The name of the ReqIF metaclass that the decorated class represents (e.g. SPEC-OBJECT). + /// + /// + /// A value indicating whether the decorated class is abstract. An abstract class does not provide + /// a complete declaration and cannot be instantiated on its own. + /// + public ClassAttribute(string name = "", bool isAbstract = false) + { + this.Name = name; + this.IsAbstract = isAbstract; + } + + /// + /// Gets or sets the name of the ReqIF metaclass that the decorated class represents. + /// + public string Name { get; set; } + + /// + /// Gets or sets a value indicating whether the decorated class is abstract. + /// + public bool IsAbstract { get; set; } + } +} diff --git a/ReqIFSharp/Decorators/PropertyAttribute.cs b/ReqIFSharp/Decorators/PropertyAttribute.cs new file mode 100644 index 0000000..7e2548f --- /dev/null +++ b/ReqIFSharp/Decorators/PropertyAttribute.cs @@ -0,0 +1,126 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2017-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------- + +namespace ReqIFSharp +{ + using System; + + /// + /// Attribute used to decorate the model properties with metadata sourced from the ReqIF metamodel, + /// so that the multiplicity, ownership and characteristics of each property are self-documenting. + /// + [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)] + public sealed class PropertyAttribute : Attribute + { + /// + /// Initializes a new instance of the class. + /// + /// + /// The that specifies whether the property references or owns its value(s). + /// + /// + /// The lower bound (minimum multiplicity) of the property. + /// + /// + /// The upper bound (maximum multiplicity) of the property. Use for unbounded. + /// + /// + /// A value indicating whether the values of a multivalued property are ordered. + /// + /// + /// A value indicating whether the property is read-only. + /// + /// + /// A value indicating whether the property is derived (its value is computed from other values). + /// + /// + /// A value indicating whether the property is a derived union. + /// + /// + /// A value indicating whether the values of a multivalued property are unique. + /// + /// + /// The default value of the property, if any. + /// + public PropertyAttribute(AggregationKind aggregation = AggregationKind.None, int lowerValue = 1, int upperValue = 1, + bool isOrdered = false, + bool isReadOnly = false, + bool isDerived = false, + bool isDerivedUnion = false, + bool isUnique = true, + string defaultValue = null) + { + this.Aggregation = aggregation; + this.LowerValue = lowerValue; + this.UpperValue = upperValue; + this.IsOrdered = isOrdered; + this.IsReadOnly = isReadOnly; + this.IsDerived = isDerived; + this.IsDerivedUnion = isDerivedUnion; + this.IsUnique = isUnique; + this.DefaultValue = defaultValue; + } + + /// + /// Gets or sets the . + /// + public AggregationKind Aggregation { get; set; } + + /// + /// Gets or sets the lower bound (minimum multiplicity) of the property. + /// + public int LowerValue { get; set; } + + /// + /// Gets or sets the upper bound (maximum multiplicity) of the property. + /// + public int UpperValue { get; set; } + + /// + /// Gets or sets a value indicating whether the values of a multivalued property are ordered. + /// + public bool IsOrdered { get; set; } + + /// + /// Gets or sets a value indicating whether the property is read-only. + /// + public bool IsReadOnly { get; set; } + + /// + /// Gets or sets a value indicating whether the property is derived. + /// + public bool IsDerived { get; set; } + + /// + /// Gets or sets a value indicating whether the property is a derived union. + /// + public bool IsDerivedUnion { get; set; } + + /// + /// Gets or sets a value indicating whether the values of a multivalued property are unique. + /// + public bool IsUnique { get; set; } + + /// + /// Gets or sets the default value of the property, if any. + /// + public string DefaultValue { get; set; } + } +} diff --git a/ReqIFSharp/Identifiable.cs b/ReqIFSharp/Identifiable.cs index 193f2e6..9e06acd 100644 --- a/ReqIFSharp/Identifiable.cs +++ b/ReqIFSharp/Identifiable.cs @@ -32,6 +32,7 @@ namespace ReqIFSharp /// /// The Abstract base class provides an identification concept for elements. /// + [Class(name: "IDENTIFIABLE", isAbstract: true)] public abstract class Identifiable { /// @@ -77,6 +78,7 @@ protected Identifiable(ILoggerFactory loggerFactory) /// /// Gets or sets the optional additional description for the information element. /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string Description { get; set; } /// @@ -85,6 +87,7 @@ protected Identifiable(ILoggerFactory loggerFactory) /// /// The value of the identifier must be a well-formed xsd:ID. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string Identifier { get; set; } /// @@ -95,16 +98,19 @@ protected Identifiable(ILoggerFactory loggerFactory) /// /// date time formatting: 2005-03-04T10:24:18+01:00 (MET time zone). /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DateTime LastChange { get; set; } /// /// Gets or sets the human-readable name for the information element. /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string LongName { get; set; } /// /// Gets or sets optional alternative identification element. /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] public AlternativeId AlternativeId { get; set; } /// diff --git a/ReqIFSharp/ReqIF.cs b/ReqIFSharp/ReqIF.cs index 358bb04..1896c1d 100644 --- a/ReqIFSharp/ReqIF.cs +++ b/ReqIFSharp/ReqIF.cs @@ -31,6 +31,7 @@ namespace ReqIFSharp /// /// The class constitutes the root element of a ReqIF Exchange Document. /// + [Class(name: "REQ-IF")] public class ReqIF { /// @@ -73,16 +74,19 @@ internal ReqIF(ILoggerFactory loggerFactory) /// /// Gets the mandatory Exchange Document header, which contains metadata relevant for this exchange. /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 1, upperValue: 1)] public ReqIFHeader TheHeader { get; set; } /// /// Gets the mandatory Exchange Document content. /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 1, upperValue: 1)] public ReqIFContent CoreContent { get; set; } /// /// Gets the optional Exchange Document content based on tool extensions, if such extensions and content are present. /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List ToolExtension { get; set; } = new List(); /// @@ -91,6 +95,7 @@ internal ReqIF(ILoggerFactory loggerFactory) /// /// The format is defined by the standard for specifying languages in XML documents proposed by the W3C /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string Lang { get; set; } /// diff --git a/ReqIFSharp/ReqIFContent.cs b/ReqIFSharp/ReqIFContent.cs index 00669bc..6309936 100644 --- a/ReqIFSharp/ReqIFContent.cs +++ b/ReqIFSharp/ReqIFContent.cs @@ -32,6 +32,7 @@ namespace ReqIFSharp /// /// The class represents the mandatory content of a ReqIF Exchange Document. /// + [Class(name: "REQ-IF-CONTENT")] public class ReqIFContent { /// @@ -98,31 +99,37 @@ internal ReqIFContent(ILoggerFactory loggerFactory) /// /// Gets the s /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List DataTypes => this.dataTypes; /// /// Gets the s /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List SpecTypes => this.specTypes; /// /// Gets the /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List SpecObjects => this.specObjects; /// /// Gets the /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List SpecRelations => this.specRelations; /// /// Gets the /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List Specifications => this.specifications; /// /// Gets the /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List SpecRelationGroups => this.specRelationGroups; /// diff --git a/ReqIFSharp/ReqIFHeader.cs b/ReqIFSharp/ReqIFHeader.cs index 179d6d2..0563f08 100644 --- a/ReqIFSharp/ReqIFHeader.cs +++ b/ReqIFSharp/ReqIFHeader.cs @@ -34,6 +34,7 @@ namespace ReqIFSharp /// /// Meta-information held in the element is applicable to the Exchange Document as a whole. /// + [Class(name: "REQ-IF-HEADER")] public class ReqIFHeader { /// @@ -63,6 +64,7 @@ internal ReqIFHeader(ILoggerFactory loggerFactory) /// /// Gets or sets an optional comment associated with the Exchange Document as a whole /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string Comment { get; set; } /// @@ -74,6 +76,7 @@ internal ReqIFHeader(ILoggerFactory loggerFactory) /// /// Example: 2005-03-04T10:24:18+01:00 (MET time zone). /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DateTime CreationTime { get; set; } /// @@ -82,26 +85,31 @@ internal ReqIFHeader(ILoggerFactory loggerFactory) /// /// Examples for repositoryID: databaseId, URL. /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string RepositoryId { get; set; } /// /// Gets or sets the identifier of the exporting "ReqIF" tool. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string ReqIFToolId { get; set; } /// /// Gets or sets the ReqIF interchange format and protocol version /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string ReqIFVersion { get; set; } /// /// Gets or sets the identifier of the exporting requirements management tool /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string SourceToolId { get; set; } /// /// Gets or sets the title of the Exchange Document. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string Title { get; set; } /// @@ -110,6 +118,7 @@ internal ReqIFHeader(ILoggerFactory loggerFactory) /// /// The value of the identifier is of the XML Schema data type “xsd::ID” /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string Identifier { get; set; } /// diff --git a/ReqIFSharp/ReqIFToolExtension.cs b/ReqIFSharp/ReqIFToolExtension.cs index 106732d..c8f2834 100644 --- a/ReqIFSharp/ReqIFToolExtension.cs +++ b/ReqIFSharp/ReqIFToolExtension.cs @@ -29,6 +29,7 @@ namespace ReqIFSharp /// /// The class allows the optional inclusion of tool-specific information into a ReqIF Exchange Document. /// + [Class(name: "REQ-IF-TOOL-EXTENSION")] public class ReqIFToolExtension { /// @@ -51,6 +52,7 @@ internal ReqIFToolExtension(ILoggerFactory loggerFactory) /// /// Gets or sets the InnerXml of the /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string InnerXml { get; set; } /// diff --git a/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs b/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs index a52b82b..1dab3bb 100644 --- a/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs +++ b/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs @@ -40,6 +40,7 @@ namespace ReqIFSharp /// /// a instance may represent a set of relations between a customer requirements and a system requirements . /// + [Class(name: "RELATION-GROUP")] public class RelationGroup : SpecElementWithAttributes { /// @@ -93,21 +94,25 @@ internal RelationGroup(ReqIFContent reqIfContent, ILoggerFactory loggerFactory) /// /// Gets or sets the reference /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public RelationGroupType Type { get; set; } /// /// Gets or sets the that contains instances that are source objects of the relations. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public Specification SourceSpecification { get; set; } /// /// Gets or sets the that contains instances that are target objects of the relations. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public Specification TargetSpecification { get; set; } /// /// Gets the grouped s /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue)] public List SpecRelations => this.specRelations; /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs b/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs index 6fb8099..decaf97 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs @@ -37,6 +37,7 @@ namespace ReqIFSharp /// While this class aggregates the values of the attributes, the association to the attributes’ types that define the acceptable /// values for the attributes is realized by concrete sub classes of this class. /// + [Class(name: "SPEC-ELEMENT-WITH-ATTRIBUTES", isAbstract: true)] public abstract class SpecElementWithAttributes : Identifiable { /// @@ -89,6 +90,7 @@ protected SpecElementWithAttributes(ReqIFContent reqIfContent, ILoggerFactory lo /// /// Gets the values of the attributes owned by the element. /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List Values => this.values; /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs b/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs index 24db3d2..d6c3567 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs @@ -39,6 +39,7 @@ namespace ReqIFSharp /// The tree is created by references of instances to other instances. /// Each node has additionally a reference to a resulting in a hierarchical structure of s /// + [Class(name: "SPEC-HIERARCHY")] public class SpecHierarchy : AccessControlledElement { /// @@ -129,16 +130,19 @@ internal SpecHierarchy(SpecHierarchy container, Specification root, ReqIFContent /// /// Gets the Down links to next level of owned SpecHierarchy. /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List Children => this.children; /// /// Gets the attributes whose values are editable for the by a tool user /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue)] public List EditableAtts => this.editableAtts; /// /// Gets or sets the reference to the associated /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public SpecObject Object { get; set; } /// @@ -151,6 +155,7 @@ internal SpecHierarchy(SpecHierarchy container, Specification root, ReqIFContent /// The root node of the table hierarchy is related to the SpecObject element that is the root of the table by the object /// association. /// + [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public bool IsTableInternal { get; set; } /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs b/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs index 3427b79..f2d965d 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs @@ -38,6 +38,7 @@ namespace ReqIFSharp /// The instance itself does not carry the requirements text or any other user defined content. /// This data is stored in instances that are associated to the instance. /// + [Class(name: "SPEC-OBJECT")] public class SpecObject : SpecElementWithAttributes { /// @@ -85,6 +86,7 @@ internal SpecObject(ReqIFContent reqIfContent, ILoggerFactory loggerFactory) /// /// Gets or sets the reference. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public SpecObjectType Type { get; set; } /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs b/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs index 4fed31c..7117539 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs @@ -33,6 +33,7 @@ namespace ReqIFSharp /// /// Defines relations (links) between two instances. /// + [Class(name: "SPEC-RELATION")] public class SpecRelation : SpecElementWithAttributes { /// @@ -80,16 +81,19 @@ internal SpecRelation(ReqIFContent reqIfContent, ILoggerFactory loggerFactory) /// /// Gets or sets the Source object of the relationship. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public SpecObject Source { get; set; } /// /// Gets or sets the Target object of the relationship. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public SpecObject Target { get; set; } /// /// Gets or sets the of the relationship /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public SpecRelationType Type { get; set; } /// diff --git a/ReqIFSharp/SpecElementWithAttributes/Specification.cs b/ReqIFSharp/SpecElementWithAttributes/Specification.cs index f34f575..d165611 100644 --- a/ReqIFSharp/SpecElementWithAttributes/Specification.cs +++ b/ReqIFSharp/SpecElementWithAttributes/Specification.cs @@ -35,6 +35,7 @@ namespace ReqIFSharp /// Represents a hierarchically structured requirements specification. /// It is the root node of the tree that hierarchically structures instances. /// + [Class(name: "SPECIFICATION")] public class Specification : SpecElementWithAttributes { /// @@ -78,11 +79,13 @@ internal Specification(ReqIFContent reqIfContent, ILoggerFactory loggerFactory) /// /// Gets the links to next level of owned SpecHierarchy. /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List Children => this.children; /// /// Gets or sets the reference. /// + [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public SpecificationType Type { get; set; } /// diff --git a/ReqIFSharp/SpecType/RelationGroupType.cs b/ReqIFSharp/SpecType/RelationGroupType.cs index 97877b9..9343803 100644 --- a/ReqIFSharp/SpecType/RelationGroupType.cs +++ b/ReqIFSharp/SpecType/RelationGroupType.cs @@ -29,6 +29,7 @@ namespace ReqIFSharp /// Inherits a set of attribute definitions from . By using elements, elements can /// be associated with attribute names, default values, data types, etc. /// + [Class(name: "RELATION-GROUP-TYPE")] public class RelationGroupType : SpecType { /// diff --git a/ReqIFSharp/SpecType/SpecObjectType.cs b/ReqIFSharp/SpecType/SpecObjectType.cs index b7d54c9..a90300e 100644 --- a/ReqIFSharp/SpecType/SpecObjectType.cs +++ b/ReqIFSharp/SpecType/SpecObjectType.cs @@ -27,6 +27,7 @@ namespace ReqIFSharp /// Inherits a set of attribute definitions from SpecType. By using SpecObjectType elements, multiple requirements can be /// associated with the same set of attribute definitions (attribute names, default values, data types, etc.). /// + [Class(name: "SPEC-OBJECT-TYPE")] public class SpecObjectType : SpecType { /// diff --git a/ReqIFSharp/SpecType/SpecRelationType.cs b/ReqIFSharp/SpecType/SpecRelationType.cs index 538b441..b440d81 100644 --- a/ReqIFSharp/SpecType/SpecRelationType.cs +++ b/ReqIFSharp/SpecType/SpecRelationType.cs @@ -27,6 +27,7 @@ namespace ReqIFSharp /// Inherits a set of attribute definitions from SpecType. By using SpecObjectType elements, multiple requirements can be /// associated with the same set of attribute definitions (attribute names, default values, data types, etc.). /// + [Class(name: "SPEC-RELATION-TYPE")] public class SpecRelationType : SpecType { /// diff --git a/ReqIFSharp/SpecType/SpecType.cs b/ReqIFSharp/SpecType/SpecType.cs index b57e7d5..134fcf2 100644 --- a/ReqIFSharp/SpecType/SpecType.cs +++ b/ReqIFSharp/SpecType/SpecType.cs @@ -33,6 +33,7 @@ namespace ReqIFSharp /// Contains a set of attribute definitions. By using an instance of a subclass of , multiple elements can be /// associated with the same set of attribute definitions (attribute names, default values, data types, etc.). /// + [Class(name: "SPEC-TYPE", isAbstract: true)] public abstract class SpecType : Identifiable { /// @@ -91,6 +92,7 @@ protected SpecType(ReqIFContent reqIfContent, ILoggerFactory loggerFactory) /// /// Gets the set of attribute definitions. /// + [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List SpecAttributes => this.specAttributes; /// diff --git a/ReqIFSharp/SpecType/SpecificationType.cs b/ReqIFSharp/SpecType/SpecificationType.cs index 004ede7..477699b 100644 --- a/ReqIFSharp/SpecType/SpecificationType.cs +++ b/ReqIFSharp/SpecType/SpecificationType.cs @@ -27,6 +27,7 @@ namespace ReqIFSharp /// Inherits a set of attribute definitions from SpecType. By using SpecificationType elements, multiple specifications can be /// associated with the same set of attribute definitions (attribute names, default values, data types, etc.). /// + [Class(name: "SPECIFICATION-TYPE")] public class SpecificationType : SpecType { /// From d97721dca3a5d1c0f90c6af8848ceec18f1331ff Mon Sep 17 00:00:00 2001 From: samatstarion Date: Sat, 6 Jun 2026 15:31:02 +0200 Subject: [PATCH 2/4] [Rename] PropertyAttribute decorator to ReqIfPropertyAttribute to avoid NUnit collision ReqIFSharp.PropertyAttribute collided with NUnit.Framework.PropertyAttribute in the test assembly, requiring a using-alias. Renaming the decorator to ReqIfPropertyAttribute (used as [ReqIfProperty(...)]) removes the collision entirely; the test-side alias is no longer needed. ClassAttribute is unchanged as it has no such collision. --- .../Decorators/ModelMetadataTestFixture.cs | 19 +- ...s => ReqIfPropertyAttributeTestFixture.cs} | 11 +- ReqIFSharp/AccessControlledElement.cs | 2 +- ReqIFSharp/AlternativeID.cs | 2 +- .../AttributeDefinitionBoolean.cs | 4 +- .../AttributeDefinitionDate.cs | 4 +- .../AttributeDefinitionEnumeration.cs | 6 +- .../AttributeDefinitionInteger.cs | 590 +++++++++--------- .../AttributeDefinitionReal.cs | 4 +- .../AttributeDefinitionString.cs | 4 +- .../AttributeDefinitionXHTML.cs | 4 +- .../AttributeValue/AttributeValueBoolean.cs | 4 +- .../AttributeValue/AttributeValueDate.cs | 4 +- .../AttributeValueEnumeration.cs | 4 +- .../AttributeValue/AttributeValueInteger.cs | 4 +- .../AttributeValue/AttributeValueReal.cs | 4 +- .../AttributeValue/AttributeValueString.cs | 4 +- .../AttributeValue/AttributeValueXHTML.cs | 8 +- ReqIFSharp/AttributeValue/ExternalObject.cs | 336 +++++----- .../Datatype/DatatypeDefinitionEnumeration.cs | 2 +- .../Datatype/DatatypeDefinitionInteger.cs | 4 +- ReqIFSharp/Datatype/DatatypeDefinitionReal.cs | 6 +- .../Datatype/DatatypeDefinitionString.cs | 2 +- ReqIFSharp/Datatype/EmbeddedValue.cs | 4 +- ReqIFSharp/Datatype/EnumValue.cs | 2 +- ...Attribute.cs => ReqIfPropertyAttribute.cs} | 8 +- ReqIFSharp/Identifiable.cs | 10 +- ReqIFSharp/ReqIF.cs | 8 +- ReqIFSharp/ReqIFContent.cs | 12 +- ReqIFSharp/ReqIFHeader.cs | 16 +- ReqIFSharp/ReqIFToolExtension.cs | 2 +- .../RelationGroup.cs | 8 +- .../SpecElementWithAttributes.cs | 2 +- .../SpecHierarchy.cs | 8 +- .../SpecElementWithAttributes/SpecObject.cs | 2 +- .../SpecElementWithAttributes/SpecRelation.cs | 6 +- .../Specification.cs | 4 +- ReqIFSharp/SpecType/SpecType.cs | 2 +- 38 files changed, 560 insertions(+), 566 deletions(-) rename ReqIFSharp.Tests/Decorators/{PropertyAttributeTestFixture.cs => ReqIfPropertyAttributeTestFixture.cs} (87%) rename ReqIFSharp/Decorators/{PropertyAttribute.cs => ReqIfPropertyAttribute.cs} (93%) diff --git a/ReqIFSharp.Tests/Decorators/ModelMetadataTestFixture.cs b/ReqIFSharp.Tests/Decorators/ModelMetadataTestFixture.cs index a5883b8..83fb191 100644 --- a/ReqIFSharp.Tests/Decorators/ModelMetadataTestFixture.cs +++ b/ReqIFSharp.Tests/Decorators/ModelMetadataTestFixture.cs @@ -29,13 +29,10 @@ namespace ReqIFSharp.Tests.Decorators using ReqIFSharp; - // ReqIFSharp.PropertyAttribute collides with NUnit.Framework.PropertyAttribute; alias to the model decorator. - using PropertyAttribute = ReqIFSharp.PropertyAttribute; - /// /// Reflection-driven completeness guard that verifies every model class and metamodel property /// in the assembly is decorated with the - /// and metadata decorators. When a new model class or property + /// and metadata decorators. When a new model class or property /// is added, this fixture fails until the decorators are applied (or the property is added to the /// documented exclusion list of infrastructure / back-reference members). /// @@ -44,7 +41,7 @@ public class ModelMetadataTestFixture { /// /// Names of properties that are NOT part of the ReqIF metamodel and therefore intentionally - /// carry no : container back-references, owner links and + /// carry no : container back-references, owner links and /// programming-convenience accessors. /// private static readonly HashSet ExcludedPropertyNames = new HashSet @@ -91,7 +88,7 @@ private static IEnumerable ModelTypes() /// /// Returns the public, instance properties declared directly on that - /// are expected to carry a (i.e. metamodel features), filtering + /// are expected to carry a (i.e. metamodel features), filtering /// out the documented infrastructure / back-reference exclusions. The Definition property /// IS a metamodel reference and is therefore kept even though it appears in the lookup set above /// only for documentation - it is removed from the exclusion set here. @@ -130,7 +127,7 @@ public void Verify_that_ClassAttribute_IsAbstract_matches_the_type() } [Test] - public void Verify_that_every_metamodel_property_is_decorated_with_PropertyAttribute() + public void Verify_that_every_metamodel_property_is_decorated_with_ReqIfPropertyAttribute() { var offenders = new List(); @@ -138,7 +135,7 @@ public void Verify_that_every_metamodel_property_is_decorated_with_PropertyAttri { foreach (var property in MetamodelProperties(type)) { - if (property.GetCustomAttribute() == null) + if (property.GetCustomAttribute() == null) { offenders.Add($"{type.Name}.{property.Name}"); } @@ -150,13 +147,13 @@ public void Verify_that_every_metamodel_property_is_decorated_with_PropertyAttri } [Test] - public void Verify_that_every_PropertyAttribute_has_consistent_multiplicity() + public void Verify_that_every_ReqIfPropertyAttribute_has_consistent_multiplicity() { foreach (var type in ModelTypes()) { foreach (var property in MetamodelProperties(type)) { - var propertyAttribute = property.GetCustomAttribute(); + var propertyAttribute = property.GetCustomAttribute(); if (propertyAttribute == null) { @@ -189,7 +186,7 @@ private static void AssertProperty(Type type, string propertyName, AggregationKi var property = type.GetProperty(propertyName); Assert.That(property, Is.Not.Null, $"{type.Name}.{propertyName} does not exist."); - var propertyAttribute = property.GetCustomAttribute(); + var propertyAttribute = property.GetCustomAttribute(); Assert.That(propertyAttribute, Is.Not.Null, $"{type.Name}.{propertyName} is missing the [Property] decorator."); Assert.Multiple(() => diff --git a/ReqIFSharp.Tests/Decorators/PropertyAttributeTestFixture.cs b/ReqIFSharp.Tests/Decorators/ReqIfPropertyAttributeTestFixture.cs similarity index 87% rename from ReqIFSharp.Tests/Decorators/PropertyAttributeTestFixture.cs rename to ReqIFSharp.Tests/Decorators/ReqIfPropertyAttributeTestFixture.cs index c0ca81c..c8e92a8 100644 --- a/ReqIFSharp.Tests/Decorators/PropertyAttributeTestFixture.cs +++ b/ReqIFSharp.Tests/Decorators/ReqIfPropertyAttributeTestFixture.cs @@ -24,19 +24,16 @@ namespace ReqIFSharp.Tests.Decorators using ReqIFSharp; - // ReqIFSharp.PropertyAttribute collides with NUnit.Framework.PropertyAttribute; alias to the model decorator. - using PropertyAttribute = ReqIFSharp.PropertyAttribute; - /// - /// Suite of tests for the class + /// Suite of tests for the class /// [TestFixture] - public class PropertyAttributeTestFixture + public class ReqIfPropertyAttributeTestFixture { [Test] public void Verify_that_default_constructor_values_are_as_expected() { - var propertyAttribute = new PropertyAttribute(); + var propertyAttribute = new ReqIfPropertyAttribute(); Assert.That(propertyAttribute.Aggregation, Is.EqualTo(AggregationKind.None)); Assert.That(propertyAttribute.LowerValue, Is.EqualTo(1)); @@ -52,7 +49,7 @@ public void Verify_that_default_constructor_values_are_as_expected() [Test] public void Verify_that_constructor_sets_properties_as_expected() { - var propertyAttribute = new PropertyAttribute( + var propertyAttribute = new ReqIfPropertyAttribute( aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, diff --git a/ReqIFSharp/AccessControlledElement.cs b/ReqIFSharp/AccessControlledElement.cs index 5dc7f4c..7b1b34f 100644 --- a/ReqIFSharp/AccessControlledElement.cs +++ b/ReqIFSharp/AccessControlledElement.cs @@ -67,7 +67,7 @@ protected AccessControlledElement(ILoggerFactory loggerFactory) /// True means that the element’s contents may be modified by the user of a tool containing the element. /// False or leaving isEditable out means that the element is read-only to the user of a tool containing the element. /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public bool IsEditable { get; set; } /// diff --git a/ReqIFSharp/AlternativeID.cs b/ReqIFSharp/AlternativeID.cs index f6d1f1a..091b47c 100644 --- a/ReqIFSharp/AlternativeID.cs +++ b/ReqIFSharp/AlternativeID.cs @@ -53,7 +53,7 @@ internal AlternativeId(Identifiable identifiable) /// /// Gets or sets the optional alternative identifier, which may be a requirements management tool identifier or tool identifier /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string Identifier { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs index 25d98c6..73d2a2f 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs @@ -85,13 +85,13 @@ internal AttributeDefinitionBoolean(SpecType specType, ILoggerFactory loggerFact /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] public AttributeValueBoolean DefaultValue { get; set; } /// /// Gets or sets the data type. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DatatypeDefinitionBoolean Type { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs index de893fb..24696bc 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs @@ -86,13 +86,13 @@ internal AttributeDefinitionDate(SpecType specType, ILoggerFactory loggerFactory /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] public AttributeValueDate DefaultValue { get; set; } /// /// Gets or sets the data type. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DatatypeDefinitionDate Type { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs index 5bda7b9..225f903 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs @@ -85,13 +85,13 @@ internal AttributeDefinitionEnumeration(SpecType specType, ILoggerFactory logger /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] public AttributeValueEnumeration DefaultValue { get; set; } /// /// Gets or sets the data type. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DatatypeDefinitionEnumeration Type { get; set; } /// @@ -137,7 +137,7 @@ protected override void SetDatatypeDefinition(DatatypeDefinition datatypeDefinit /// If set to false, this means that the user of a requirements authoring tool can pick exactly one of the values in the set of /// specified values as an enumeration attribute value. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public bool IsMultiValued { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs index 9a09857..f306b80 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs @@ -1,295 +1,295 @@ -// ------------------------------------------------------------------------------------------------- -// -// -// Copyright 2017-2026 Starion Group S.A. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -// ------------------------------------------------------------------------------------------------- - -namespace ReqIFSharp -{ - using System; - using System.Globalization; - using System.Linq; - using System.Runtime.Serialization; - using System.Threading; - using System.Threading.Tasks; - using System.Xml; - - using Microsoft.Extensions.Logging; - using Microsoft.Extensions.Logging.Abstractions; - - /// - /// The purpose of the class is to define an Integer attribute. - /// - /// - /// An element relates an element to a - /// element via its attribute. - /// An element MAY contain a default value that represents the value that is used as an attribute - /// value if no attribute value is supplied by the user of the requirements authoring tool. - /// ReqIfSharp supports 64 bit singed integers (long) with the following range: -9223372036854775808 to 9223372036854775807 - /// - [Class(name: "ATTRIBUTE-DEFINITION-INTEGER")] - public class AttributeDefinitionInteger : AttributeDefinitionSimple - { - /// - /// The used to log - /// - private readonly ILogger logger; - - /// - /// Initializes a new instance of the class. - /// - public AttributeDefinitionInteger() - { - this.logger = NullLogger.Instance; - } - - /// - /// Initializes a new instance of the class. - /// - /// - /// The (injected) used to set up logging - /// - public AttributeDefinitionInteger(ILoggerFactory loggerFactory) : base(loggerFactory) - { - this.logger = this.loggerFactory == null ? NullLogger.Instance : this.loggerFactory.CreateLogger(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - /// The owning . - /// - /// - /// The (injected) used to set up logging - /// - internal AttributeDefinitionInteger(SpecType specType, ILoggerFactory loggerFactory) - : base(specType, loggerFactory) - { - this.logger = this.loggerFactory == null ? NullLogger.Instance : this.loggerFactory.CreateLogger(); - } - - /// - /// Gets or sets the owned default value that is used if no attribute value is supplied - /// by the user of the requirements authoring tool. - /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] - public AttributeValueInteger DefaultValue { get; set; } - - /// - /// Gets or sets the data type. - /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] - public DatatypeDefinitionInteger Type { get; set; } - - /// - /// Gets the - /// - /// - /// An instance of - /// - protected override DatatypeDefinition GetDatatypeDefinition() - { - return this.Type; - } - - /// - /// Sets the - /// - /// - /// The instance of that is to be set. - /// - protected override void SetDatatypeDefinition(DatatypeDefinition datatypeDefinition) - { - if (datatypeDefinition == null) - { - throw new ArgumentNullException(nameof(datatypeDefinition)); - } - - if (datatypeDefinition.GetType() != typeof(DatatypeDefinitionInteger)) - { - throw new ArgumentException($"{nameof(datatypeDefinition)} must of type DatatypeDefinitionInteger"); - } - - this.Type = (DatatypeDefinitionInteger)datatypeDefinition; - } - - /// - /// Generates a object from its XML representation. - /// - /// - /// an instance of - /// - internal override void ReadXml(XmlReader reader) - { - base.ReadXml(reader); - - while (reader.Read()) - { - if (reader.MoveToContent() == XmlNodeType.Element) - { - var xmlLineInfo = reader as IXmlLineInfo; - - switch (reader.LocalName) - { - case "ALTERNATIVE-ID": - this.ReadAlternativeId(reader); - break; - case "DATATYPE-DEFINITION-INTEGER-REF": - var reference = reader.ReadElementContentAsString(); - var datatypeDefinition = (DatatypeDefinitionInteger)this.SpecType.ReqIFContent.DataTypes.SingleOrDefault(x => x.Identifier == reference); - this.Type = datatypeDefinition; - - if (datatypeDefinition == null) - { - this.logger.LogTrace("The DatatypeDefinitionInteger:{Reference} could not be found and has been set to null on AttributeDefinitionInteger:{Identifier}", reference, Identifier); - } - - break; - case "ATTRIBUTE-VALUE-INTEGER": - this.DefaultValue = new AttributeValueInteger(this, this.loggerFactory); - using (var valueSubtree = reader.ReadSubtree()) - { - valueSubtree.MoveToContent(); - this.DefaultValue.ReadXml(valueSubtree); - } - break; - default: - this.logger.LogWarning("The {LocalName} element at line:position {LineNumber}:{LinePosition} is not supported", reader.LocalName, xmlLineInfo?.LineNumber, xmlLineInfo?.LinePosition); - break; - } - } - } - } - - /// - /// Asynchronously generates a object from its XML representation. - /// - /// - /// an instance of - /// - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - internal override async Task ReadXmlAsync(XmlReader reader, CancellationToken token) - { - base.ReadXml(reader); - - while (await reader.ReadAsync()) - { - token.ThrowIfCancellationRequested(); - - if (await reader.MoveToContentAsync() == XmlNodeType.Element) - { - var xmlLineInfo = reader as IXmlLineInfo; - - switch (reader.LocalName) - { - case "ALTERNATIVE-ID": - await this.ReadAlternativeIdAsync(reader, token); - break; - case "DATATYPE-DEFINITION-INTEGER-REF": - var reference = await reader.ReadElementContentAsStringAsync(); - var datatypeDefinition = (DatatypeDefinitionInteger)this.SpecType.ReqIFContent.DataTypes.SingleOrDefault(x => x.Identifier == reference); - this.Type = datatypeDefinition; - - if (datatypeDefinition == null) - { - this.logger.LogTrace("The DatatypeDefinitionInteger:{Reference} could not be found and has been set to null on AttributeDefinitionInteger:{Identifier}", reference, Identifier); - } - - break; - case "ATTRIBUTE-VALUE-INTEGER": - this.DefaultValue = new AttributeValueInteger(this, this.loggerFactory); - using (var valueSubtree = reader.ReadSubtree()) - { - await valueSubtree.MoveToContentAsync(); - await this.DefaultValue.ReadXmlAsync(valueSubtree, token); - } - break; - default: - this.logger.LogWarning("The {LocalName} element at line:position {LineNumber}:{LinePosition} is not supported", reader.LocalName, xmlLineInfo?.LineNumber, xmlLineInfo?.LinePosition); - break; - } - } - } - } - - /// - /// Converts a object into its XML representation. - /// - /// - /// an instance of - /// - /// - /// The may not be null - /// - internal override void WriteXml(XmlWriter writer) - { - base.WriteXml(writer); - - if (this.DefaultValue != null) - { - writer.WriteStartElement("DEFAULT-VALUE"); - writer.WriteStartElement("ATTRIBUTE-VALUE-INTEGER"); - writer.WriteAttributeString("THE-VALUE", this.DefaultValue.TheValue.ToString(NumberFormatInfo.InvariantInfo)); - writer.WriteStartElement("DEFINITION"); - writer.WriteElementString("ATTRIBUTE-DEFINITION-INTEGER-REF", this.DefaultValue.Definition.Identifier); - writer.WriteEndElement(); - writer.WriteEndElement(); - writer.WriteEndElement(); - } - - writer.WriteStartElement("TYPE"); - writer.WriteElementString("DATATYPE-DEFINITION-INTEGER-REF", this.Type.Identifier); - writer.WriteEndElement(); - } - - /// - /// Asynchronously converts a object into its XML representation. - /// - /// - /// an instance of - /// - /// - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// - /// - /// The may not be null - /// - internal override async Task WriteXmlAsync(XmlWriter writer, CancellationToken token) - { - await base.WriteXmlAsync(writer, token); - - if (this.DefaultValue != null) - { - await writer.WriteStartElementAsync(null,"DEFAULT-VALUE", null); - await writer.WriteStartElementAsync(null, "ATTRIBUTE-VALUE-INTEGER", null); - await writer.WriteAttributeStringAsync(null, "THE-VALUE", null, this.DefaultValue.TheValue.ToString(NumberFormatInfo.InvariantInfo)); - await writer.WriteStartElementAsync(null, "DEFINITION", null); - await writer.WriteElementStringAsync(null, "ATTRIBUTE-DEFINITION-INTEGER-REF", null, this.DefaultValue.Definition.Identifier); - await writer.WriteEndElementAsync(); - await writer.WriteEndElementAsync(); - await writer.WriteEndElementAsync(); - } - - await writer.WriteStartElementAsync(null, "TYPE", null); - await writer.WriteElementStringAsync(null, "DATATYPE-DEFINITION-INTEGER-REF", null, this.Type.Identifier); - await writer.WriteEndElementAsync(); - } - } -} +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2017-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------- + +namespace ReqIFSharp +{ + using System; + using System.Globalization; + using System.Linq; + using System.Runtime.Serialization; + using System.Threading; + using System.Threading.Tasks; + using System.Xml; + + using Microsoft.Extensions.Logging; + using Microsoft.Extensions.Logging.Abstractions; + + /// + /// The purpose of the class is to define an Integer attribute. + /// + /// + /// An element relates an element to a + /// element via its attribute. + /// An element MAY contain a default value that represents the value that is used as an attribute + /// value if no attribute value is supplied by the user of the requirements authoring tool. + /// ReqIfSharp supports 64 bit singed integers (long) with the following range: -9223372036854775808 to 9223372036854775807 + /// + [Class(name: "ATTRIBUTE-DEFINITION-INTEGER")] + public class AttributeDefinitionInteger : AttributeDefinitionSimple + { + /// + /// The used to log + /// + private readonly ILogger logger; + + /// + /// Initializes a new instance of the class. + /// + public AttributeDefinitionInteger() + { + this.logger = NullLogger.Instance; + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The (injected) used to set up logging + /// + public AttributeDefinitionInteger(ILoggerFactory loggerFactory) : base(loggerFactory) + { + this.logger = this.loggerFactory == null ? NullLogger.Instance : this.loggerFactory.CreateLogger(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The owning . + /// + /// + /// The (injected) used to set up logging + /// + internal AttributeDefinitionInteger(SpecType specType, ILoggerFactory loggerFactory) + : base(specType, loggerFactory) + { + this.logger = this.loggerFactory == null ? NullLogger.Instance : this.loggerFactory.CreateLogger(); + } + + /// + /// Gets or sets the owned default value that is used if no attribute value is supplied + /// by the user of the requirements authoring tool. + /// + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + public AttributeValueInteger DefaultValue { get; set; } + + /// + /// Gets or sets the data type. + /// + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + public DatatypeDefinitionInteger Type { get; set; } + + /// + /// Gets the + /// + /// + /// An instance of + /// + protected override DatatypeDefinition GetDatatypeDefinition() + { + return this.Type; + } + + /// + /// Sets the + /// + /// + /// The instance of that is to be set. + /// + protected override void SetDatatypeDefinition(DatatypeDefinition datatypeDefinition) + { + if (datatypeDefinition == null) + { + throw new ArgumentNullException(nameof(datatypeDefinition)); + } + + if (datatypeDefinition.GetType() != typeof(DatatypeDefinitionInteger)) + { + throw new ArgumentException($"{nameof(datatypeDefinition)} must of type DatatypeDefinitionInteger"); + } + + this.Type = (DatatypeDefinitionInteger)datatypeDefinition; + } + + /// + /// Generates a object from its XML representation. + /// + /// + /// an instance of + /// + internal override void ReadXml(XmlReader reader) + { + base.ReadXml(reader); + + while (reader.Read()) + { + if (reader.MoveToContent() == XmlNodeType.Element) + { + var xmlLineInfo = reader as IXmlLineInfo; + + switch (reader.LocalName) + { + case "ALTERNATIVE-ID": + this.ReadAlternativeId(reader); + break; + case "DATATYPE-DEFINITION-INTEGER-REF": + var reference = reader.ReadElementContentAsString(); + var datatypeDefinition = (DatatypeDefinitionInteger)this.SpecType.ReqIFContent.DataTypes.SingleOrDefault(x => x.Identifier == reference); + this.Type = datatypeDefinition; + + if (datatypeDefinition == null) + { + this.logger.LogTrace("The DatatypeDefinitionInteger:{Reference} could not be found and has been set to null on AttributeDefinitionInteger:{Identifier}", reference, Identifier); + } + + break; + case "ATTRIBUTE-VALUE-INTEGER": + this.DefaultValue = new AttributeValueInteger(this, this.loggerFactory); + using (var valueSubtree = reader.ReadSubtree()) + { + valueSubtree.MoveToContent(); + this.DefaultValue.ReadXml(valueSubtree); + } + break; + default: + this.logger.LogWarning("The {LocalName} element at line:position {LineNumber}:{LinePosition} is not supported", reader.LocalName, xmlLineInfo?.LineNumber, xmlLineInfo?.LinePosition); + break; + } + } + } + } + + /// + /// Asynchronously generates a object from its XML representation. + /// + /// + /// an instance of + /// + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + internal override async Task ReadXmlAsync(XmlReader reader, CancellationToken token) + { + base.ReadXml(reader); + + while (await reader.ReadAsync()) + { + token.ThrowIfCancellationRequested(); + + if (await reader.MoveToContentAsync() == XmlNodeType.Element) + { + var xmlLineInfo = reader as IXmlLineInfo; + + switch (reader.LocalName) + { + case "ALTERNATIVE-ID": + await this.ReadAlternativeIdAsync(reader, token); + break; + case "DATATYPE-DEFINITION-INTEGER-REF": + var reference = await reader.ReadElementContentAsStringAsync(); + var datatypeDefinition = (DatatypeDefinitionInteger)this.SpecType.ReqIFContent.DataTypes.SingleOrDefault(x => x.Identifier == reference); + this.Type = datatypeDefinition; + + if (datatypeDefinition == null) + { + this.logger.LogTrace("The DatatypeDefinitionInteger:{Reference} could not be found and has been set to null on AttributeDefinitionInteger:{Identifier}", reference, Identifier); + } + + break; + case "ATTRIBUTE-VALUE-INTEGER": + this.DefaultValue = new AttributeValueInteger(this, this.loggerFactory); + using (var valueSubtree = reader.ReadSubtree()) + { + await valueSubtree.MoveToContentAsync(); + await this.DefaultValue.ReadXmlAsync(valueSubtree, token); + } + break; + default: + this.logger.LogWarning("The {LocalName} element at line:position {LineNumber}:{LinePosition} is not supported", reader.LocalName, xmlLineInfo?.LineNumber, xmlLineInfo?.LinePosition); + break; + } + } + } + } + + /// + /// Converts a object into its XML representation. + /// + /// + /// an instance of + /// + /// + /// The may not be null + /// + internal override void WriteXml(XmlWriter writer) + { + base.WriteXml(writer); + + if (this.DefaultValue != null) + { + writer.WriteStartElement("DEFAULT-VALUE"); + writer.WriteStartElement("ATTRIBUTE-VALUE-INTEGER"); + writer.WriteAttributeString("THE-VALUE", this.DefaultValue.TheValue.ToString(NumberFormatInfo.InvariantInfo)); + writer.WriteStartElement("DEFINITION"); + writer.WriteElementString("ATTRIBUTE-DEFINITION-INTEGER-REF", this.DefaultValue.Definition.Identifier); + writer.WriteEndElement(); + writer.WriteEndElement(); + writer.WriteEndElement(); + } + + writer.WriteStartElement("TYPE"); + writer.WriteElementString("DATATYPE-DEFINITION-INTEGER-REF", this.Type.Identifier); + writer.WriteEndElement(); + } + + /// + /// Asynchronously converts a object into its XML representation. + /// + /// + /// an instance of + /// + /// + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// + /// The may not be null + /// + internal override async Task WriteXmlAsync(XmlWriter writer, CancellationToken token) + { + await base.WriteXmlAsync(writer, token); + + if (this.DefaultValue != null) + { + await writer.WriteStartElementAsync(null,"DEFAULT-VALUE", null); + await writer.WriteStartElementAsync(null, "ATTRIBUTE-VALUE-INTEGER", null); + await writer.WriteAttributeStringAsync(null, "THE-VALUE", null, this.DefaultValue.TheValue.ToString(NumberFormatInfo.InvariantInfo)); + await writer.WriteStartElementAsync(null, "DEFINITION", null); + await writer.WriteElementStringAsync(null, "ATTRIBUTE-DEFINITION-INTEGER-REF", null, this.DefaultValue.Definition.Identifier); + await writer.WriteEndElementAsync(); + await writer.WriteEndElementAsync(); + await writer.WriteEndElementAsync(); + } + + await writer.WriteStartElementAsync(null, "TYPE", null); + await writer.WriteElementStringAsync(null, "DATATYPE-DEFINITION-INTEGER-REF", null, this.Type.Identifier); + await writer.WriteEndElementAsync(); + } + } +} diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs index a649190..bc48519 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs @@ -86,13 +86,13 @@ internal AttributeDefinitionReal(SpecType specType, ILoggerFactory loggerFactory /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] public AttributeValueReal DefaultValue { get; set; } /// /// Gets or sets the data type. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DatatypeDefinitionReal Type { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs index 5cda41b..44da5aa 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs @@ -85,13 +85,13 @@ internal AttributeDefinitionString(SpecType specType, ILoggerFactory loggerFacto /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] public AttributeValueString DefaultValue { get; set; } /// /// Gets or sets the data type. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DatatypeDefinitionString Type { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs index 14994f4..e1ac740 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs @@ -85,13 +85,13 @@ internal AttributeDefinitionXHTML(SpecType specType, ILoggerFactory loggerFactor /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] public AttributeValueXHTML DefaultValue { get; set; } /// /// Gets or sets the data type. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DatatypeDefinitionXHTML Type { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs b/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs index 6da7615..5abb9a9 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs @@ -96,7 +96,7 @@ internal AttributeValueBoolean(SpecElementWithAttributes specElAt, ILoggerFactor /// /// Gets or sets the attribute value. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public bool TheValue { get; set; } /// @@ -122,7 +122,7 @@ public override object ObjectValue /// /// Gets or sets a reference to the value definition /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public AttributeDefinitionBoolean Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueDate.cs b/ReqIFSharp/AttributeValue/AttributeValueDate.cs index 9253640..e3500a8 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueDate.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueDate.cs @@ -86,7 +86,7 @@ internal AttributeValueDate(SpecElementWithAttributes specElAt, ILoggerFactory l /// /// Gets or sets the attribute value. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DateTime TheValue { get; set; } /// @@ -112,7 +112,7 @@ public override object ObjectValue /// /// Gets or sets the Reference to the value definition. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public AttributeDefinitionDate Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs b/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs index 428e895..a02f7f1 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs @@ -102,7 +102,7 @@ internal AttributeValueEnumeration(SpecElementWithAttributes specElAt, ILoggerFa /// /// Gets s that are chosen from a set of specified values /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue)] public List Values => this.values; /// @@ -129,7 +129,7 @@ public override object ObjectValue /// /// Gets or sets the Reference to the attribute definition that relates the value to its data type. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public AttributeDefinitionEnumeration Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueInteger.cs b/ReqIFSharp/AttributeValue/AttributeValueInteger.cs index f3b005b..62d9b67 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueInteger.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueInteger.cs @@ -100,7 +100,7 @@ internal AttributeValueInteger(SpecElementWithAttributes specElAt, ILoggerFactor /// /// Gets or sets the attribute value /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public long TheValue { get; set; } /// @@ -126,7 +126,7 @@ public override object ObjectValue /// /// Gets or sets the Reference to the value definition. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public AttributeDefinitionInteger Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueReal.cs b/ReqIFSharp/AttributeValue/AttributeValueReal.cs index 65f14bb..74bff5d 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueReal.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueReal.cs @@ -97,7 +97,7 @@ internal AttributeValueReal(SpecElementWithAttributes specElAt, ILoggerFactory l /// /// Gets or sets the attribute value /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public double TheValue { get; set; } /// @@ -123,7 +123,7 @@ public override object ObjectValue /// /// Gets or sets the reference to the value definition /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public AttributeDefinitionReal Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueString.cs b/ReqIFSharp/AttributeValue/AttributeValueString.cs index bfe5a89..eb959bf 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueString.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueString.cs @@ -86,7 +86,7 @@ internal AttributeValueString(SpecElementWithAttributes specElAt, ILoggerFactory /// /// Gets or sets the attribute value /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string TheValue { get; set; } /// @@ -104,7 +104,7 @@ public override object ObjectValue /// /// Gets or sets reference to the value definition /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public AttributeDefinitionString Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs b/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs index 35a2df9..50077d4 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs @@ -104,13 +104,13 @@ internal AttributeValueXHTML(AttributeDefinitionXHTML attributeDefinition, ILogg /// /// Gets or sets the XHTML Content /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string TheValue { get; set; } /// /// Gets or sets the Linkage to the original attribute value that has been saved if isSimplified is true. /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string TheOriginalValue { get; set; } /// @@ -141,7 +141,7 @@ public override object ObjectValue /// /// Gets or sets the Reference to the attribute definition that relates the value to its data type. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public AttributeDefinitionXHTML Definition { get; set; } /// @@ -184,7 +184,7 @@ protected override void SetAttributeDefinition(AttributeDefinition attributeDefi /// /// Gets or sets a value indicating whether the attribute value is a simplified representation of the original value. /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public bool IsSimplified { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/ExternalObject.cs b/ReqIFSharp/AttributeValue/ExternalObject.cs index 05aef6b..5c3e603 100644 --- a/ReqIFSharp/AttributeValue/ExternalObject.cs +++ b/ReqIFSharp/AttributeValue/ExternalObject.cs @@ -1,168 +1,168 @@ -// ------------------------------------------------------------------------------------------------- -// -// -// Copyright 2017-2026 Starion Group S.A. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -// ------------------------------------------------------------------------------------------------ - -namespace ReqIFSharp -{ - using System; - using System.IO; - using System.IO.Compression; - - /// - /// External objects are referenced binary objects that are referenced using the XHTML object element from the XHTML Object Module. - /// The location of an external object MUST be specified via the data attribute which contains either - /// a) a URL relative to the location of the exchange XML document, or - /// b) an absolute URL. - /// - /// - /// The specification for the XTHML object element defines several XML attributes. For ReqIF, only a subset of these attributes is relevant and used. - /// - [Class(name: "EXTERNAL-OBJECT")] - public class ExternalObject - { - /// - /// Initializes a new instance of the class. - /// - /// - /// The owning - /// - public ExternalObject(AttributeValueXHTML attributeValueXhtml) - { - this.Owner = attributeValueXhtml; - } - - /// - /// Gets the owning - /// - public AttributeValueXHTML Owner { get; private set; } - - /// - /// Gets or sets the Uri of the , this may be a relative uri or an absolute uri - /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] - public string Uri { get; set; } - - /// - /// Gets or sets the MimeType of the external object represented as a string - /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] - public string MimeType { get; set; } - - /// - /// Gets or sets the height of the external object in case it is an image - /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] - public int? Height { get; set; } - - /// - /// Gets or sets the width of the external object in case it is an image - /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] - public int? Width { get; set; } - - /// - /// Asserts whether the external object should be queried from the reqifz file or from - /// another (absolute) location such as a resource available via HTTP or HTTPS - /// - /// - public bool IsDataLocal() - { - return !this.Uri.StartsWith("http", StringComparison.OrdinalIgnoreCase); - } - - /// - /// Queries the local data from the reqifz file and writes the data to the provided target - /// - /// - /// The path of the reqifz file that contains the data local data - /// - /// - /// The target to which the data is written - /// - /// - /// Thrown when the is null - /// - /// - /// thrown when the is an absolute uri and not a relative Uri or - /// when the reqifz file is unknown - /// - public void QueryLocalData(string reqifPath, Stream target) - { - if (string.IsNullOrEmpty(reqifPath)) - { - throw new ArgumentException($"The {nameof(reqifPath)} file path may not be null or empty", nameof(reqifPath)); - } - - using (var reader = new FileStream(reqifPath, FileMode.Open)) - { - this.QueryLocalData(reader, target); - } - } - - /// - /// Queries the local data from the reqifz file and writes the data to the provided target - /// - /// - /// The that contains the reqifz file to deserialize - /// - /// - /// The target to which the data is written - /// - /// - /// Thrown when the is null - /// - /// - /// thrown when the is an absolute uri and not a relative Uri or - /// when the reqifz file is unknown - /// - public void QueryLocalData(Stream reqifz, Stream target) - { - if (reqifz == null) - { - throw new ArgumentNullException(nameof(reqifz), $"The {nameof(reqifz)} may not be null"); - } - - if (reqifz.Length == 0) - { - throw new ArgumentException($"The {nameof(reqifz)} may not be empty", nameof(reqifz)); - } - - if (target == null) - { - throw new ArgumentNullException(nameof(target), "The target stream may not be null"); - } - - if (!this.IsDataLocal()) - { - throw new InvalidOperationException($"The Uri of the External Object is not a relative Uri that can be found in the {nameof(reqifz)} file"); - } - - using (var archive = new ZipArchive(reqifz, ZipArchiveMode.Read)) - { - var zipArchiveEntry = archive.GetEntry(this.Uri); - if (zipArchiveEntry != null) - { - var sourceStream = zipArchiveEntry.Open(); - sourceStream.CopyTo(target); - sourceStream.Dispose(); - } - } - } - } -} +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2017-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace ReqIFSharp +{ + using System; + using System.IO; + using System.IO.Compression; + + /// + /// External objects are referenced binary objects that are referenced using the XHTML object element from the XHTML Object Module. + /// The location of an external object MUST be specified via the data attribute which contains either + /// a) a URL relative to the location of the exchange XML document, or + /// b) an absolute URL. + /// + /// + /// The specification for the XTHML object element defines several XML attributes. For ReqIF, only a subset of these attributes is relevant and used. + /// + [Class(name: "EXTERNAL-OBJECT")] + public class ExternalObject + { + /// + /// Initializes a new instance of the class. + /// + /// + /// The owning + /// + public ExternalObject(AttributeValueXHTML attributeValueXhtml) + { + this.Owner = attributeValueXhtml; + } + + /// + /// Gets the owning + /// + public AttributeValueXHTML Owner { get; private set; } + + /// + /// Gets or sets the Uri of the , this may be a relative uri or an absolute uri + /// + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + public string Uri { get; set; } + + /// + /// Gets or sets the MimeType of the external object represented as a string + /// + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + public string MimeType { get; set; } + + /// + /// Gets or sets the height of the external object in case it is an image + /// + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + public int? Height { get; set; } + + /// + /// Gets or sets the width of the external object in case it is an image + /// + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + public int? Width { get; set; } + + /// + /// Asserts whether the external object should be queried from the reqifz file or from + /// another (absolute) location such as a resource available via HTTP or HTTPS + /// + /// + public bool IsDataLocal() + { + return !this.Uri.StartsWith("http", StringComparison.OrdinalIgnoreCase); + } + + /// + /// Queries the local data from the reqifz file and writes the data to the provided target + /// + /// + /// The path of the reqifz file that contains the data local data + /// + /// + /// The target to which the data is written + /// + /// + /// Thrown when the is null + /// + /// + /// thrown when the is an absolute uri and not a relative Uri or + /// when the reqifz file is unknown + /// + public void QueryLocalData(string reqifPath, Stream target) + { + if (string.IsNullOrEmpty(reqifPath)) + { + throw new ArgumentException($"The {nameof(reqifPath)} file path may not be null or empty", nameof(reqifPath)); + } + + using (var reader = new FileStream(reqifPath, FileMode.Open)) + { + this.QueryLocalData(reader, target); + } + } + + /// + /// Queries the local data from the reqifz file and writes the data to the provided target + /// + /// + /// The that contains the reqifz file to deserialize + /// + /// + /// The target to which the data is written + /// + /// + /// Thrown when the is null + /// + /// + /// thrown when the is an absolute uri and not a relative Uri or + /// when the reqifz file is unknown + /// + public void QueryLocalData(Stream reqifz, Stream target) + { + if (reqifz == null) + { + throw new ArgumentNullException(nameof(reqifz), $"The {nameof(reqifz)} may not be null"); + } + + if (reqifz.Length == 0) + { + throw new ArgumentException($"The {nameof(reqifz)} may not be empty", nameof(reqifz)); + } + + if (target == null) + { + throw new ArgumentNullException(nameof(target), "The target stream may not be null"); + } + + if (!this.IsDataLocal()) + { + throw new InvalidOperationException($"The Uri of the External Object is not a relative Uri that can be found in the {nameof(reqifz)} file"); + } + + using (var archive = new ZipArchive(reqifz, ZipArchiveMode.Read)) + { + var zipArchiveEntry = archive.GetEntry(this.Uri); + if (zipArchiveEntry != null) + { + var sourceStream = zipArchiveEntry.Open(); + sourceStream.CopyTo(target); + sourceStream.Dispose(); + } + } + } + } +} diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs b/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs index dd77c49..d43b017 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs @@ -88,7 +88,7 @@ internal DatatypeDefinitionEnumeration(ReqIFContent reqIfContent, ILoggerFactory /// /// Gets the owned enumeration literals /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List SpecifiedValues => this.specifiedValues; /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs b/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs index f2cc891..60e63fd 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs @@ -83,13 +83,13 @@ internal DatatypeDefinitionInteger(ReqIFContent reqIfContent, ILoggerFactory log /// /// Gets or sets a value that denotes the largest negative data value representable by this data type. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public long Min { get; set; } /// /// Gets or sets a value that denotes the largest positive data value representable by this data type. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public long Max { get; set; } /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs b/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs index 182a149..a7d90b8 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs @@ -78,19 +78,19 @@ internal DatatypeDefinitionReal(ReqIFContent reqIfContent, ILoggerFactory logger /// /// Gets or sets a value that Denotes the supported maximum precision of real numbers represented by this data type. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public long Accuracy { get; set; } /// /// Gets or sets a value that denotes the largest negative data value representable by this data type. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public double Min { get; set; } /// /// Gets or sets a value that denotes the largest positive data value representable by this data type. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public double Max { get; set; } /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionString.cs b/ReqIFSharp/Datatype/DatatypeDefinitionString.cs index c6158f0..652201d 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionString.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionString.cs @@ -81,7 +81,7 @@ internal DatatypeDefinitionString(ReqIFContent reqIfContent, ILoggerFactory logg /// /// Gets or sets the maximum permissible string length /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public long MaxLength { get; set; } /// diff --git a/ReqIFSharp/Datatype/EmbeddedValue.cs b/ReqIFSharp/Datatype/EmbeddedValue.cs index 7190ed8..09cdba3 100644 --- a/ReqIFSharp/Datatype/EmbeddedValue.cs +++ b/ReqIFSharp/Datatype/EmbeddedValue.cs @@ -68,7 +68,7 @@ internal EmbeddedValue(EnumValue enumValue, ILoggerFactory loggerFactory) /// /// Gets or sets the numerical value corresponding to the enumeration literal. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public long Key { get; set; } /// @@ -77,7 +77,7 @@ internal EmbeddedValue(EnumValue enumValue, ILoggerFactory loggerFactory) /// /// example: a color /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string OtherContent { get; set; } /// diff --git a/ReqIFSharp/Datatype/EnumValue.cs b/ReqIFSharp/Datatype/EnumValue.cs index ce9cd02..318a7b9 100644 --- a/ReqIFSharp/Datatype/EnumValue.cs +++ b/ReqIFSharp/Datatype/EnumValue.cs @@ -69,7 +69,7 @@ internal EnumValue(DatatypeDefinitionEnumeration datatypeDefinitionEnumeration, /// /// Gets or sets the owned /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 1, upperValue: 1)] public EmbeddedValue Properties { get; set; } /// diff --git a/ReqIFSharp/Decorators/PropertyAttribute.cs b/ReqIFSharp/Decorators/ReqIfPropertyAttribute.cs similarity index 93% rename from ReqIFSharp/Decorators/PropertyAttribute.cs rename to ReqIFSharp/Decorators/ReqIfPropertyAttribute.cs index 7e2548f..2a60a8f 100644 --- a/ReqIFSharp/Decorators/PropertyAttribute.cs +++ b/ReqIFSharp/Decorators/ReqIfPropertyAttribute.cs @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------------------------- -// +// // // Copyright 2017-2026 Starion Group S.A. // @@ -27,10 +27,10 @@ namespace ReqIFSharp /// so that the multiplicity, ownership and characteristics of each property are self-documenting. /// [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)] - public sealed class PropertyAttribute : Attribute + public sealed class ReqIfPropertyAttribute : Attribute { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The that specifies whether the property references or owns its value(s). @@ -59,7 +59,7 @@ public sealed class PropertyAttribute : Attribute /// /// The default value of the property, if any. /// - public PropertyAttribute(AggregationKind aggregation = AggregationKind.None, int lowerValue = 1, int upperValue = 1, + public ReqIfPropertyAttribute(AggregationKind aggregation = AggregationKind.None, int lowerValue = 1, int upperValue = 1, bool isOrdered = false, bool isReadOnly = false, bool isDerived = false, diff --git a/ReqIFSharp/Identifiable.cs b/ReqIFSharp/Identifiable.cs index 9e06acd..4b251b8 100644 --- a/ReqIFSharp/Identifiable.cs +++ b/ReqIFSharp/Identifiable.cs @@ -78,7 +78,7 @@ protected Identifiable(ILoggerFactory loggerFactory) /// /// Gets or sets the optional additional description for the information element. /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string Description { get; set; } /// @@ -87,7 +87,7 @@ protected Identifiable(ILoggerFactory loggerFactory) /// /// The value of the identifier must be a well-formed xsd:ID. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string Identifier { get; set; } /// @@ -98,19 +98,19 @@ protected Identifiable(ILoggerFactory loggerFactory) /// /// date time formatting: 2005-03-04T10:24:18+01:00 (MET time zone). /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DateTime LastChange { get; set; } /// /// Gets or sets the human-readable name for the information element. /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string LongName { get; set; } /// /// Gets or sets optional alternative identification element. /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] public AlternativeId AlternativeId { get; set; } /// diff --git a/ReqIFSharp/ReqIF.cs b/ReqIFSharp/ReqIF.cs index 1896c1d..668352d 100644 --- a/ReqIFSharp/ReqIF.cs +++ b/ReqIFSharp/ReqIF.cs @@ -74,19 +74,19 @@ internal ReqIF(ILoggerFactory loggerFactory) /// /// Gets the mandatory Exchange Document header, which contains metadata relevant for this exchange. /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 1, upperValue: 1)] public ReqIFHeader TheHeader { get; set; } /// /// Gets the mandatory Exchange Document content. /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 1, upperValue: 1)] public ReqIFContent CoreContent { get; set; } /// /// Gets the optional Exchange Document content based on tool extensions, if such extensions and content are present. /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List ToolExtension { get; set; } = new List(); /// @@ -95,7 +95,7 @@ internal ReqIF(ILoggerFactory loggerFactory) /// /// The format is defined by the standard for specifying languages in XML documents proposed by the W3C /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string Lang { get; set; } /// diff --git a/ReqIFSharp/ReqIFContent.cs b/ReqIFSharp/ReqIFContent.cs index 6309936..9816daf 100644 --- a/ReqIFSharp/ReqIFContent.cs +++ b/ReqIFSharp/ReqIFContent.cs @@ -99,37 +99,37 @@ internal ReqIFContent(ILoggerFactory loggerFactory) /// /// Gets the s /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List DataTypes => this.dataTypes; /// /// Gets the s /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List SpecTypes => this.specTypes; /// /// Gets the /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List SpecObjects => this.specObjects; /// /// Gets the /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List SpecRelations => this.specRelations; /// /// Gets the /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List Specifications => this.specifications; /// /// Gets the /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List SpecRelationGroups => this.specRelationGroups; /// diff --git a/ReqIFSharp/ReqIFHeader.cs b/ReqIFSharp/ReqIFHeader.cs index 0563f08..5dcfe35 100644 --- a/ReqIFSharp/ReqIFHeader.cs +++ b/ReqIFSharp/ReqIFHeader.cs @@ -64,7 +64,7 @@ internal ReqIFHeader(ILoggerFactory loggerFactory) /// /// Gets or sets an optional comment associated with the Exchange Document as a whole /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string Comment { get; set; } /// @@ -76,7 +76,7 @@ internal ReqIFHeader(ILoggerFactory loggerFactory) /// /// Example: 2005-03-04T10:24:18+01:00 (MET time zone). /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public DateTime CreationTime { get; set; } /// @@ -85,31 +85,31 @@ internal ReqIFHeader(ILoggerFactory loggerFactory) /// /// Examples for repositoryID: databaseId, URL. /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string RepositoryId { get; set; } /// /// Gets or sets the identifier of the exporting "ReqIF" tool. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string ReqIFToolId { get; set; } /// /// Gets or sets the ReqIF interchange format and protocol version /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string ReqIFVersion { get; set; } /// /// Gets or sets the identifier of the exporting requirements management tool /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string SourceToolId { get; set; } /// /// Gets or sets the title of the Exchange Document. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string Title { get; set; } /// @@ -118,7 +118,7 @@ internal ReqIFHeader(ILoggerFactory loggerFactory) /// /// The value of the identifier is of the XML Schema data type “xsd::ID” /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public string Identifier { get; set; } /// diff --git a/ReqIFSharp/ReqIFToolExtension.cs b/ReqIFSharp/ReqIFToolExtension.cs index c8f2834..2e06f8f 100644 --- a/ReqIFSharp/ReqIFToolExtension.cs +++ b/ReqIFSharp/ReqIFToolExtension.cs @@ -52,7 +52,7 @@ internal ReqIFToolExtension(ILoggerFactory loggerFactory) /// /// Gets or sets the InnerXml of the /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public string InnerXml { get; set; } /// diff --git a/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs b/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs index 1dab3bb..31dacf1 100644 --- a/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs +++ b/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs @@ -94,25 +94,25 @@ internal RelationGroup(ReqIFContent reqIfContent, ILoggerFactory loggerFactory) /// /// Gets or sets the reference /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public RelationGroupType Type { get; set; } /// /// Gets or sets the that contains instances that are source objects of the relations. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public Specification SourceSpecification { get; set; } /// /// Gets or sets the that contains instances that are target objects of the relations. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public Specification TargetSpecification { get; set; } /// /// Gets the grouped s /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue)] public List SpecRelations => this.specRelations; /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs b/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs index decaf97..0cef820 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs @@ -90,7 +90,7 @@ protected SpecElementWithAttributes(ReqIFContent reqIfContent, ILoggerFactory lo /// /// Gets the values of the attributes owned by the element. /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List Values => this.values; /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs b/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs index d6c3567..e8000e5 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs @@ -130,19 +130,19 @@ internal SpecHierarchy(SpecHierarchy container, Specification root, ReqIFContent /// /// Gets the Down links to next level of owned SpecHierarchy. /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List Children => this.children; /// /// Gets the attributes whose values are editable for the by a tool user /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue)] public List EditableAtts => this.editableAtts; /// /// Gets or sets the reference to the associated /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public SpecObject Object { get; set; } /// @@ -155,7 +155,7 @@ internal SpecHierarchy(SpecHierarchy container, Specification root, ReqIFContent /// The root node of the table hierarchy is related to the SpecObject element that is the root of the table by the object /// association. /// - [Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] public bool IsTableInternal { get; set; } /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs b/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs index f2d965d..7cee2e9 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs @@ -86,7 +86,7 @@ internal SpecObject(ReqIFContent reqIfContent, ILoggerFactory loggerFactory) /// /// Gets or sets the reference. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public SpecObjectType Type { get; set; } /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs b/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs index 7117539..95d1b0a 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs @@ -81,19 +81,19 @@ internal SpecRelation(ReqIFContent reqIfContent, ILoggerFactory loggerFactory) /// /// Gets or sets the Source object of the relationship. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public SpecObject Source { get; set; } /// /// Gets or sets the Target object of the relationship. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public SpecObject Target { get; set; } /// /// Gets or sets the of the relationship /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public SpecRelationType Type { get; set; } /// diff --git a/ReqIFSharp/SpecElementWithAttributes/Specification.cs b/ReqIFSharp/SpecElementWithAttributes/Specification.cs index d165611..e2ecdbd 100644 --- a/ReqIFSharp/SpecElementWithAttributes/Specification.cs +++ b/ReqIFSharp/SpecElementWithAttributes/Specification.cs @@ -79,13 +79,13 @@ internal Specification(ReqIFContent reqIfContent, ILoggerFactory loggerFactory) /// /// Gets the links to next level of owned SpecHierarchy. /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List Children => this.children; /// /// Gets or sets the reference. /// - [Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] public SpecificationType Type { get; set; } /// diff --git a/ReqIFSharp/SpecType/SpecType.cs b/ReqIFSharp/SpecType/SpecType.cs index 134fcf2..f028f2f 100644 --- a/ReqIFSharp/SpecType/SpecType.cs +++ b/ReqIFSharp/SpecType/SpecType.cs @@ -92,7 +92,7 @@ protected SpecType(ReqIFContent reqIfContent, ILoggerFactory loggerFactory) /// /// Gets the set of attribute definitions. /// - [Property(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] public List SpecAttributes => this.specAttributes; /// From db7913f3e0adefecb70eac9648e97c54593a6e8e Mon Sep 17 00:00:00 2001 From: samatstarion Date: Sat, 6 Jun 2026 15:37:48 +0200 Subject: [PATCH 3/4] [Rename] ClassAttribute decorator to ReqIfClassAttribute for symmetry Mirrors the ReqIfPropertyAttribute rename so both model decorators share the ReqIf prefix. Applied to all 48 model classes as [ReqIfClass(...)] and the test fixtures updated accordingly. --- .../Decorators/ModelMetadataTestFixture.cs | 10 +++++----- ...tFixture.cs => ReqIfClassAttributeTestFixture.cs} | 12 ++++++------ ReqIFSharp/AccessControlledElement.cs | 2 +- ReqIFSharp/AlternativeID.cs | 2 +- .../AttributeDefinition/AttributeDefinition.cs | 2 +- .../AttributeDefinitionBoolean.cs | 2 +- .../AttributeDefinition/AttributeDefinitionDate.cs | 2 +- .../AttributeDefinitionEnumeration.cs | 2 +- .../AttributeDefinitionInteger.cs | 2 +- .../AttributeDefinition/AttributeDefinitionReal.cs | 2 +- .../AttributeDefinition/AttributeDefinitionSimple.cs | 2 +- .../AttributeDefinition/AttributeDefinitionString.cs | 2 +- .../AttributeDefinition/AttributeDefinitionXHTML.cs | 2 +- ReqIFSharp/AttributeValue/AttributeValue.cs | 2 +- ReqIFSharp/AttributeValue/AttributeValueBoolean.cs | 2 +- ReqIFSharp/AttributeValue/AttributeValueDate.cs | 2 +- .../AttributeValue/AttributeValueEnumeration.cs | 2 +- ReqIFSharp/AttributeValue/AttributeValueInteger.cs | 2 +- ReqIFSharp/AttributeValue/AttributeValueReal.cs | 2 +- ReqIFSharp/AttributeValue/AttributeValueSimple.cs | 2 +- ReqIFSharp/AttributeValue/AttributeValueString.cs | 2 +- ReqIFSharp/AttributeValue/AttributeValueXHTML.cs | 2 +- ReqIFSharp/AttributeValue/ExternalObject.cs | 2 +- ReqIFSharp/Datatype/DatatypeDefinition.cs | 2 +- ReqIFSharp/Datatype/DatatypeDefinitionBoolean.cs | 2 +- ReqIFSharp/Datatype/DatatypeDefinitionDate.cs | 2 +- ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs | 2 +- ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs | 2 +- ReqIFSharp/Datatype/DatatypeDefinitionReal.cs | 2 +- ReqIFSharp/Datatype/DatatypeDefinitionSimple.cs | 2 +- ReqIFSharp/Datatype/DatatypeDefinitionString.cs | 2 +- ReqIFSharp/Datatype/DatatypeDefinitionXHTML.cs | 2 +- ReqIFSharp/Datatype/EmbeddedValue.cs | 2 +- ReqIFSharp/Datatype/EnumValue.cs | 2 +- .../{ClassAttribute.cs => ReqIfClassAttribute.cs} | 8 ++++---- ReqIFSharp/Identifiable.cs | 2 +- ReqIFSharp/ReqIF.cs | 2 +- ReqIFSharp/ReqIFContent.cs | 2 +- ReqIFSharp/ReqIFHeader.cs | 2 +- ReqIFSharp/ReqIFToolExtension.cs | 2 +- .../SpecElementWithAttributes/RelationGroup.cs | 2 +- .../SpecElementWithAttributes.cs | 2 +- .../SpecElementWithAttributes/SpecHierarchy.cs | 2 +- ReqIFSharp/SpecElementWithAttributes/SpecObject.cs | 2 +- ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs | 2 +- .../SpecElementWithAttributes/Specification.cs | 2 +- ReqIFSharp/SpecType/RelationGroupType.cs | 2 +- ReqIFSharp/SpecType/SpecObjectType.cs | 2 +- ReqIFSharp/SpecType/SpecRelationType.cs | 2 +- ReqIFSharp/SpecType/SpecType.cs | 2 +- ReqIFSharp/SpecType/SpecificationType.cs | 2 +- 51 files changed, 63 insertions(+), 63 deletions(-) rename ReqIFSharp.Tests/Decorators/{ClassAttributeTestFixture.cs => ReqIfClassAttributeTestFixture.cs} (82%) rename ReqIFSharp/Decorators/{ClassAttribute.cs => ReqIfClassAttribute.cs} (87%) diff --git a/ReqIFSharp.Tests/Decorators/ModelMetadataTestFixture.cs b/ReqIFSharp.Tests/Decorators/ModelMetadataTestFixture.cs index 83fb191..337a401 100644 --- a/ReqIFSharp.Tests/Decorators/ModelMetadataTestFixture.cs +++ b/ReqIFSharp.Tests/Decorators/ModelMetadataTestFixture.cs @@ -31,7 +31,7 @@ namespace ReqIFSharp.Tests.Decorators /// /// Reflection-driven completeness guard that verifies every model class and metamodel property - /// in the assembly is decorated with the + /// in the assembly is decorated with the /// and metadata decorators. When a new model class or property /// is added, this fixture fails until the decorators are applied (or the property is added to the /// documented exclusion list of infrastructure / back-reference members). @@ -101,10 +101,10 @@ private static IEnumerable MetamodelProperties(Type type) } [Test] - public void Verify_that_every_model_class_is_decorated_with_ClassAttribute() + public void Verify_that_every_model_class_is_decorated_with_ReqIfClassAttribute() { var offenders = ModelTypes() - .Where(t => t.GetCustomAttribute() == null) + .Where(t => t.GetCustomAttribute() == null) .Select(t => t.Name) .ToList(); @@ -113,11 +113,11 @@ public void Verify_that_every_model_class_is_decorated_with_ClassAttribute() } [Test] - public void Verify_that_ClassAttribute_IsAbstract_matches_the_type() + public void Verify_that_ReqIfClassAttribute_IsAbstract_matches_the_type() { foreach (var type in ModelTypes()) { - var classAttribute = type.GetCustomAttribute(); + var classAttribute = type.GetCustomAttribute(); Assert.That(classAttribute, Is.Not.Null, $"{type.Name} is missing the [Class] decorator."); Assert.That(classAttribute.IsAbstract, Is.EqualTo(type.IsAbstract), diff --git a/ReqIFSharp.Tests/Decorators/ClassAttributeTestFixture.cs b/ReqIFSharp.Tests/Decorators/ReqIfClassAttributeTestFixture.cs similarity index 82% rename from ReqIFSharp.Tests/Decorators/ClassAttributeTestFixture.cs rename to ReqIFSharp.Tests/Decorators/ReqIfClassAttributeTestFixture.cs index a8a68e3..eef429f 100644 --- a/ReqIFSharp.Tests/Decorators/ClassAttributeTestFixture.cs +++ b/ReqIFSharp.Tests/Decorators/ReqIfClassAttributeTestFixture.cs @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------------------------- -// +// // // Copyright 2017-2026 Starion Group S.A. // @@ -25,15 +25,15 @@ namespace ReqIFSharp.Tests.Decorators using ReqIFSharp; /// - /// Suite of tests for the class + /// Suite of tests for the class /// [TestFixture] - public class ClassAttributeTestFixture + public class ReqIfClassAttributeTestFixture { [Test] public void Verify_that_default_constructor_values_are_as_expected() { - var classAttribute = new ClassAttribute(); + var classAttribute = new ReqIfClassAttribute(); Assert.That(classAttribute.Name, Is.EqualTo(string.Empty)); Assert.That(classAttribute.IsAbstract, Is.False); @@ -42,7 +42,7 @@ public void Verify_that_default_constructor_values_are_as_expected() [Test] public void Verify_that_constructor_sets_properties_as_expected() { - var classAttribute = new ClassAttribute("SPEC-OBJECT", true); + var classAttribute = new ReqIfClassAttribute("SPEC-OBJECT", true); Assert.That(classAttribute.Name, Is.EqualTo("SPEC-OBJECT")); Assert.That(classAttribute.IsAbstract, Is.True); @@ -51,7 +51,7 @@ public void Verify_that_constructor_sets_properties_as_expected() [Test] public void Verify_that_properties_can_be_set() { - var classAttribute = new ClassAttribute + var classAttribute = new ReqIfClassAttribute { Name = "SPEC-RELATION", IsAbstract = true diff --git a/ReqIFSharp/AccessControlledElement.cs b/ReqIFSharp/AccessControlledElement.cs index 7b1b34f..7fc86d0 100644 --- a/ReqIFSharp/AccessControlledElement.cs +++ b/ReqIFSharp/AccessControlledElement.cs @@ -32,7 +32,7 @@ namespace ReqIFSharp /// /// The is the base class for classes that may restrict user access to their information. /// - [Class(name: "ACCESS-CONTROLLED-ELEMENT", isAbstract: true)] + [ReqIfClass(name: "ACCESS-CONTROLLED-ELEMENT", isAbstract: true)] public abstract class AccessControlledElement : Identifiable { /// diff --git a/ReqIFSharp/AlternativeID.cs b/ReqIFSharp/AlternativeID.cs index 091b47c..23abc23 100644 --- a/ReqIFSharp/AlternativeID.cs +++ b/ReqIFSharp/AlternativeID.cs @@ -28,7 +28,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to provide an alternative, tool-specific identification. /// - [Class(name: "ALTERNATIVE-ID")] + [ReqIfClass(name: "ALTERNATIVE-ID")] public class AlternativeId { /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinition.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinition.cs index d462880..b19d2f2 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinition.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinition.cs @@ -36,7 +36,7 @@ namespace ReqIFSharp /// type. In , each attribute value ( element) is related to its data type ( element) via /// an attribute definition ( element). /// - [Class(name: "ATTRIBUTE-DEFINITION", isAbstract: true)] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION", isAbstract: true)] public abstract class AttributeDefinition : AccessControlledElement { /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs index 73d2a2f..8ed0ec0 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs @@ -39,7 +39,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an attribute /// value if no attribute value is supplied by the user of the requirements authoring tool /// - [Class(name: "ATTRIBUTE-DEFINITION-BOOLEAN")] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION-BOOLEAN")] public class AttributeDefinitionBoolean : AttributeDefinitionSimple { /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs index 24696bc..3f90249 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs @@ -40,7 +40,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an attribute /// value if no attribute value is supplied by the user of the requirements authoring tool /// - [Class(name: "ATTRIBUTE-DEFINITION-DATE")] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION-DATE")] public class AttributeDefinitionDate : AttributeDefinitionSimple { /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs index 225f903..2c842b1 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs @@ -39,7 +39,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an /// attribute value if no attribute value is supplied by the user of the requirements authoring tool. /// - [Class(name: "ATTRIBUTE-DEFINITION-ENUMERATION")] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION-ENUMERATION")] public class AttributeDefinitionEnumeration : AttributeDefinition { /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs index f306b80..74c5b5f 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs @@ -41,7 +41,7 @@ namespace ReqIFSharp /// value if no attribute value is supplied by the user of the requirements authoring tool. /// ReqIfSharp supports 64 bit singed integers (long) with the following range: -9223372036854775808 to 9223372036854775807 /// - [Class(name: "ATTRIBUTE-DEFINITION-INTEGER")] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION-INTEGER")] public class AttributeDefinitionInteger : AttributeDefinitionSimple { /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs index bc48519..4462f07 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs @@ -40,7 +40,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an attribute /// value if no attribute value is supplied by the user of the requirements authoring tool. /// - [Class(name: "ATTRIBUTE-DEFINITION-REAL")] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION-REAL")] public class AttributeDefinitionReal : AttributeDefinitionSimple { /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionSimple.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionSimple.cs index 1d03ccf..55a8e55 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionSimple.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionSimple.cs @@ -25,7 +25,7 @@ namespace ReqIFSharp /// /// The is the base class for simple type attributes. /// - [Class(name: "ATTRIBUTE-DEFINITION-SIMPLE", isAbstract: true)] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION-SIMPLE", isAbstract: true)] public abstract class AttributeDefinitionSimple : AttributeDefinition { /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs index 44da5aa..7fd993c 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs @@ -39,7 +39,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an attribute /// value if no attribute value is supplied by the user of the requirements authoring tool. /// - [Class(name: "ATTRIBUTE-DEFINITION-STRING")] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION-STRING")] public class AttributeDefinitionString : AttributeDefinitionSimple { /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs index e1ac740..7d9fa38 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs @@ -39,7 +39,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an attribute /// value if no attribute value is supplied by the user of the requirements authoring tool. /// - [Class(name: "ATTRIBUTE-DEFINITION-XHTML")] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION-XHTML")] public class AttributeDefinitionXHTML : AttributeDefinition { /// diff --git a/ReqIFSharp/AttributeValue/AttributeValue.cs b/ReqIFSharp/AttributeValue/AttributeValue.cs index ecce5d0..33835f9 100644 --- a/ReqIFSharp/AttributeValue/AttributeValue.cs +++ b/ReqIFSharp/AttributeValue/AttributeValue.cs @@ -29,7 +29,7 @@ namespace ReqIFSharp /// /// The is the base class for attribute values. /// - [Class(name: "ATTRIBUTE-VALUE", isAbstract: true)] + [ReqIfClass(name: "ATTRIBUTE-VALUE", isAbstract: true)] public abstract class AttributeValue { /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs b/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs index 5abb9a9..8aa4346 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs @@ -33,7 +33,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define a attribute value. /// - [Class(name: "ATTRIBUTE-VALUE-BOOLEAN")] + [ReqIfClass(name: "ATTRIBUTE-VALUE-BOOLEAN")] public class AttributeValueBoolean : AttributeValueSimple { /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueDate.cs b/ReqIFSharp/AttributeValue/AttributeValueDate.cs index e3500a8..8b1b3f0 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueDate.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueDate.cs @@ -34,7 +34,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define a attribute value. /// - [Class(name: "ATTRIBUTE-VALUE-DATE")] + [ReqIfClass(name: "ATTRIBUTE-VALUE-DATE")] public class AttributeValueDate : AttributeValueSimple { /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs b/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs index a02f7f1..95aa156 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs @@ -34,7 +34,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define an enumeration attribute value. /// - [Class(name: "ATTRIBUTE-VALUE-ENUMERATION")] + [ReqIfClass(name: "ATTRIBUTE-VALUE-ENUMERATION")] public class AttributeValueEnumeration : AttributeValue { /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueInteger.cs b/ReqIFSharp/AttributeValue/AttributeValueInteger.cs index 62d9b67..28759be 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueInteger.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueInteger.cs @@ -37,7 +37,7 @@ namespace ReqIFSharp /// /// ReqIfSharp supports 64 bit signed integers (long) with the following range: -9223372036854775808 to 9223372036854775807 /// - [Class(name: "ATTRIBUTE-VALUE-INTEGER")] + [ReqIfClass(name: "ATTRIBUTE-VALUE-INTEGER")] public class AttributeValueInteger : AttributeValueSimple { /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueReal.cs b/ReqIFSharp/AttributeValue/AttributeValueReal.cs index 74bff5d..27e46a8 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueReal.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueReal.cs @@ -34,7 +34,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define a real attribute value. /// - [Class(name: "ATTRIBUTE-VALUE-REAL")] + [ReqIfClass(name: "ATTRIBUTE-VALUE-REAL")] public class AttributeValueReal : AttributeValueSimple { /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueSimple.cs b/ReqIFSharp/AttributeValue/AttributeValueSimple.cs index 0386c10..ad6cf55 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueSimple.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueSimple.cs @@ -25,7 +25,7 @@ namespace ReqIFSharp /// /// The is the base class for simple type attribute values. /// - [Class(name: "ATTRIBUTE-VALUE-SIMPLE", isAbstract: true)] + [ReqIfClass(name: "ATTRIBUTE-VALUE-SIMPLE", isAbstract: true)] public abstract class AttributeValueSimple : AttributeValue { /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueString.cs b/ReqIFSharp/AttributeValue/AttributeValueString.cs index eb959bf..07a4abb 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueString.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueString.cs @@ -33,7 +33,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define a attribute value. /// - [Class(name: "ATTRIBUTE-VALUE-STRING")] + [ReqIfClass(name: "ATTRIBUTE-VALUE-STRING")] public class AttributeValueString : AttributeValueSimple { /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs b/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs index 50077d4..caf973c 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs @@ -37,7 +37,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define an attribute value with XHTML contents. /// - [Class(name: "ATTRIBUTE-VALUE-XHTML")] + [ReqIfClass(name: "ATTRIBUTE-VALUE-XHTML")] public class AttributeValueXHTML : AttributeValue { /// diff --git a/ReqIFSharp/AttributeValue/ExternalObject.cs b/ReqIFSharp/AttributeValue/ExternalObject.cs index 5c3e603..74c2078 100644 --- a/ReqIFSharp/AttributeValue/ExternalObject.cs +++ b/ReqIFSharp/AttributeValue/ExternalObject.cs @@ -33,7 +33,7 @@ namespace ReqIFSharp /// /// The specification for the XTHML object element defines several XML attributes. For ReqIF, only a subset of these attributes is relevant and used. /// - [Class(name: "EXTERNAL-OBJECT")] + [ReqIfClass(name: "EXTERNAL-OBJECT")] public class ExternalObject { /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinition.cs b/ReqIFSharp/Datatype/DatatypeDefinition.cs index 0b470b7..ff03834 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinition.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinition.cs @@ -30,7 +30,7 @@ namespace ReqIFSharp /// /// The is the base class for all data types available to the Exchange Document. /// - [Class(name: "DATATYPE-DEFINITION", isAbstract: true)] + [ReqIfClass(name: "DATATYPE-DEFINITION", isAbstract: true)] public abstract class DatatypeDefinition : Identifiable { /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionBoolean.cs b/ReqIFSharp/Datatype/DatatypeDefinitionBoolean.cs index 08b1c04..a868c58 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionBoolean.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionBoolean.cs @@ -32,7 +32,7 @@ namespace ReqIFSharp /// /// This element defines a data type for the representation of Boolean data values in the Exchange Document. /// - [Class(name: "DATATYPE-DEFINITION-BOOLEAN")] + [ReqIfClass(name: "DATATYPE-DEFINITION-BOOLEAN")] public class DatatypeDefinitionBoolean : DatatypeDefinitionSimple { /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionDate.cs b/ReqIFSharp/Datatype/DatatypeDefinitionDate.cs index bc2ce0e..fe72d56 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionDate.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionDate.cs @@ -33,7 +33,7 @@ namespace ReqIFSharp /// /// This element defines a data type for the representation of Date and Time data values in the Exchange Document. /// - [Class(name: "DATATYPE-DEFINITION-DATE")] + [ReqIfClass(name: "DATATYPE-DEFINITION-DATE")] public class DatatypeDefinitionDate : DatatypeDefinitionSimple { /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs b/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs index d43b017..fd751d8 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs @@ -37,7 +37,7 @@ namespace ReqIFSharp /// Data type definition for enumeration types. The set of enumeration values referenced by specifiedValues constrains the /// possible choices for enumeration attribute values /// - [Class(name: "DATATYPE-DEFINITION-ENUMERATION")] + [ReqIfClass(name: "DATATYPE-DEFINITION-ENUMERATION")] public class DatatypeDefinitionEnumeration : DatatypeDefinition { /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs b/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs index 60e63fd..681facf 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs @@ -37,7 +37,7 @@ namespace ReqIFSharp /// The representation of data values shall comply with the definitions in http://www.w3.org/TR/xmlschema-2/#integer /// ReqIfSharp supports 64-bit signed integers (long) with the following range: -9223372036854775808 to 9223372036854775807 /// - [Class(name: "DATATYPE-DEFINITION-INTEGER")] + [ReqIfClass(name: "DATATYPE-DEFINITION-INTEGER")] public class DatatypeDefinitionInteger : DatatypeDefinitionSimple { /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs b/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs index a7d90b8..930d8a4 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs @@ -32,7 +32,7 @@ namespace ReqIFSharp /// /// This element defines a data type for the representation of Real data values in the Exchange Document. /// - [Class(name: "DATATYPE-DEFINITION-REAL")] + [ReqIfClass(name: "DATATYPE-DEFINITION-REAL")] public class DatatypeDefinitionReal : DatatypeDefinitionSimple { /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionSimple.cs b/ReqIFSharp/Datatype/DatatypeDefinitionSimple.cs index c4332d6..5426b6b 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionSimple.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionSimple.cs @@ -25,7 +25,7 @@ namespace ReqIFSharp /// /// The is the base class from which all primitive data types, except enumeration, are derived. /// - [Class(name: "DATATYPE-DEFINITION-SIMPLE", isAbstract: true)] + [ReqIfClass(name: "DATATYPE-DEFINITION-SIMPLE", isAbstract: true)] public abstract class DatatypeDefinitionSimple : DatatypeDefinition { /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionString.cs b/ReqIFSharp/Datatype/DatatypeDefinitionString.cs index 652201d..3bbce94 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionString.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionString.cs @@ -35,7 +35,7 @@ namespace ReqIFSharp /// /// This element defines a data type for the representation of String data values in the Exchange Document. /// - [Class(name: "DATATYPE-DEFINITION-STRING")] + [ReqIfClass(name: "DATATYPE-DEFINITION-STRING")] public class DatatypeDefinitionString : DatatypeDefinitionSimple { /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionXHTML.cs b/ReqIFSharp/Datatype/DatatypeDefinitionXHTML.cs index faa12f0..5fedb6c 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionXHTML.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionXHTML.cs @@ -29,7 +29,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define XHTML formatted data. /// - [Class(name: "DATATYPE-DEFINITION-XHTML")] + [ReqIfClass(name: "DATATYPE-DEFINITION-XHTML")] public class DatatypeDefinitionXHTML : DatatypeDefinition { /// diff --git a/ReqIFSharp/Datatype/EmbeddedValue.cs b/ReqIFSharp/Datatype/EmbeddedValue.cs index 09cdba3..e1d3489 100644 --- a/ReqIFSharp/Datatype/EmbeddedValue.cs +++ b/ReqIFSharp/Datatype/EmbeddedValue.cs @@ -32,7 +32,7 @@ namespace ReqIFSharp /// /// The class represents additional information related to enumeration literals. /// - [Class(name: "EMBEDDED-VALUE")] + [ReqIfClass(name: "EMBEDDED-VALUE")] public class EmbeddedValue { /// diff --git a/ReqIFSharp/Datatype/EnumValue.cs b/ReqIFSharp/Datatype/EnumValue.cs index 318a7b9..7acfdb7 100644 --- a/ReqIFSharp/Datatype/EnumValue.cs +++ b/ReqIFSharp/Datatype/EnumValue.cs @@ -29,7 +29,7 @@ namespace ReqIFSharp /// /// The class represents enumeration literals. /// - [Class(name: "ENUM-VALUE")] + [ReqIfClass(name: "ENUM-VALUE")] public class EnumValue : Identifiable { /// diff --git a/ReqIFSharp/Decorators/ClassAttribute.cs b/ReqIFSharp/Decorators/ReqIfClassAttribute.cs similarity index 87% rename from ReqIFSharp/Decorators/ClassAttribute.cs rename to ReqIFSharp/Decorators/ReqIfClassAttribute.cs index c1f391c..2f4402e 100644 --- a/ReqIFSharp/Decorators/ClassAttribute.cs +++ b/ReqIFSharp/Decorators/ReqIfClassAttribute.cs @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------------------------- -// +// // // Copyright 2017-2026 Starion Group S.A. // @@ -27,10 +27,10 @@ namespace ReqIFSharp /// so that the relationships and characteristics of each class are self-documenting. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] - public sealed class ClassAttribute : Attribute + public sealed class ReqIfClassAttribute : Attribute { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// /// The name of the ReqIF metaclass that the decorated class represents (e.g. SPEC-OBJECT). @@ -39,7 +39,7 @@ public sealed class ClassAttribute : Attribute /// A value indicating whether the decorated class is abstract. An abstract class does not provide /// a complete declaration and cannot be instantiated on its own. /// - public ClassAttribute(string name = "", bool isAbstract = false) + public ReqIfClassAttribute(string name = "", bool isAbstract = false) { this.Name = name; this.IsAbstract = isAbstract; diff --git a/ReqIFSharp/Identifiable.cs b/ReqIFSharp/Identifiable.cs index 4b251b8..61e95c8 100644 --- a/ReqIFSharp/Identifiable.cs +++ b/ReqIFSharp/Identifiable.cs @@ -32,7 +32,7 @@ namespace ReqIFSharp /// /// The Abstract base class provides an identification concept for elements. /// - [Class(name: "IDENTIFIABLE", isAbstract: true)] + [ReqIfClass(name: "IDENTIFIABLE", isAbstract: true)] public abstract class Identifiable { /// diff --git a/ReqIFSharp/ReqIF.cs b/ReqIFSharp/ReqIF.cs index 668352d..867e921 100644 --- a/ReqIFSharp/ReqIF.cs +++ b/ReqIFSharp/ReqIF.cs @@ -31,7 +31,7 @@ namespace ReqIFSharp /// /// The class constitutes the root element of a ReqIF Exchange Document. /// - [Class(name: "REQ-IF")] + [ReqIfClass(name: "REQ-IF")] public class ReqIF { /// diff --git a/ReqIFSharp/ReqIFContent.cs b/ReqIFSharp/ReqIFContent.cs index 9816daf..456d679 100644 --- a/ReqIFSharp/ReqIFContent.cs +++ b/ReqIFSharp/ReqIFContent.cs @@ -32,7 +32,7 @@ namespace ReqIFSharp /// /// The class represents the mandatory content of a ReqIF Exchange Document. /// - [Class(name: "REQ-IF-CONTENT")] + [ReqIfClass(name: "REQ-IF-CONTENT")] public class ReqIFContent { /// diff --git a/ReqIFSharp/ReqIFHeader.cs b/ReqIFSharp/ReqIFHeader.cs index 5dcfe35..59b249d 100644 --- a/ReqIFSharp/ReqIFHeader.cs +++ b/ReqIFSharp/ReqIFHeader.cs @@ -34,7 +34,7 @@ namespace ReqIFSharp /// /// Meta-information held in the element is applicable to the Exchange Document as a whole. /// - [Class(name: "REQ-IF-HEADER")] + [ReqIfClass(name: "REQ-IF-HEADER")] public class ReqIFHeader { /// diff --git a/ReqIFSharp/ReqIFToolExtension.cs b/ReqIFSharp/ReqIFToolExtension.cs index 2e06f8f..607d654 100644 --- a/ReqIFSharp/ReqIFToolExtension.cs +++ b/ReqIFSharp/ReqIFToolExtension.cs @@ -29,7 +29,7 @@ namespace ReqIFSharp /// /// The class allows the optional inclusion of tool-specific information into a ReqIF Exchange Document. /// - [Class(name: "REQ-IF-TOOL-EXTENSION")] + [ReqIfClass(name: "REQ-IF-TOOL-EXTENSION")] public class ReqIFToolExtension { /// diff --git a/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs b/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs index 31dacf1..6fc81da 100644 --- a/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs +++ b/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs @@ -40,7 +40,7 @@ namespace ReqIFSharp /// /// a instance may represent a set of relations between a customer requirements and a system requirements . /// - [Class(name: "RELATION-GROUP")] + [ReqIfClass(name: "RELATION-GROUP")] public class RelationGroup : SpecElementWithAttributes { /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs b/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs index 0cef820..29dffcb 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs @@ -37,7 +37,7 @@ namespace ReqIFSharp /// While this class aggregates the values of the attributes, the association to the attributes’ types that define the acceptable /// values for the attributes is realized by concrete sub classes of this class. /// - [Class(name: "SPEC-ELEMENT-WITH-ATTRIBUTES", isAbstract: true)] + [ReqIfClass(name: "SPEC-ELEMENT-WITH-ATTRIBUTES", isAbstract: true)] public abstract class SpecElementWithAttributes : Identifiable { /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs b/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs index e8000e5..c0fb48c 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs @@ -39,7 +39,7 @@ namespace ReqIFSharp /// The tree is created by references of instances to other instances. /// Each node has additionally a reference to a resulting in a hierarchical structure of s /// - [Class(name: "SPEC-HIERARCHY")] + [ReqIfClass(name: "SPEC-HIERARCHY")] public class SpecHierarchy : AccessControlledElement { /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs b/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs index 7cee2e9..f5be381 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs @@ -38,7 +38,7 @@ namespace ReqIFSharp /// The instance itself does not carry the requirements text or any other user defined content. /// This data is stored in instances that are associated to the instance. /// - [Class(name: "SPEC-OBJECT")] + [ReqIfClass(name: "SPEC-OBJECT")] public class SpecObject : SpecElementWithAttributes { /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs b/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs index 95d1b0a..3ef467c 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs @@ -33,7 +33,7 @@ namespace ReqIFSharp /// /// Defines relations (links) between two instances. /// - [Class(name: "SPEC-RELATION")] + [ReqIfClass(name: "SPEC-RELATION")] public class SpecRelation : SpecElementWithAttributes { /// diff --git a/ReqIFSharp/SpecElementWithAttributes/Specification.cs b/ReqIFSharp/SpecElementWithAttributes/Specification.cs index e2ecdbd..1a00486 100644 --- a/ReqIFSharp/SpecElementWithAttributes/Specification.cs +++ b/ReqIFSharp/SpecElementWithAttributes/Specification.cs @@ -35,7 +35,7 @@ namespace ReqIFSharp /// Represents a hierarchically structured requirements specification. /// It is the root node of the tree that hierarchically structures instances. /// - [Class(name: "SPECIFICATION")] + [ReqIfClass(name: "SPECIFICATION")] public class Specification : SpecElementWithAttributes { /// diff --git a/ReqIFSharp/SpecType/RelationGroupType.cs b/ReqIFSharp/SpecType/RelationGroupType.cs index 9343803..88888eb 100644 --- a/ReqIFSharp/SpecType/RelationGroupType.cs +++ b/ReqIFSharp/SpecType/RelationGroupType.cs @@ -29,7 +29,7 @@ namespace ReqIFSharp /// Inherits a set of attribute definitions from . By using elements, elements can /// be associated with attribute names, default values, data types, etc. /// - [Class(name: "RELATION-GROUP-TYPE")] + [ReqIfClass(name: "RELATION-GROUP-TYPE")] public class RelationGroupType : SpecType { /// diff --git a/ReqIFSharp/SpecType/SpecObjectType.cs b/ReqIFSharp/SpecType/SpecObjectType.cs index a90300e..487638e 100644 --- a/ReqIFSharp/SpecType/SpecObjectType.cs +++ b/ReqIFSharp/SpecType/SpecObjectType.cs @@ -27,7 +27,7 @@ namespace ReqIFSharp /// Inherits a set of attribute definitions from SpecType. By using SpecObjectType elements, multiple requirements can be /// associated with the same set of attribute definitions (attribute names, default values, data types, etc.). /// - [Class(name: "SPEC-OBJECT-TYPE")] + [ReqIfClass(name: "SPEC-OBJECT-TYPE")] public class SpecObjectType : SpecType { /// diff --git a/ReqIFSharp/SpecType/SpecRelationType.cs b/ReqIFSharp/SpecType/SpecRelationType.cs index b440d81..d670650 100644 --- a/ReqIFSharp/SpecType/SpecRelationType.cs +++ b/ReqIFSharp/SpecType/SpecRelationType.cs @@ -27,7 +27,7 @@ namespace ReqIFSharp /// Inherits a set of attribute definitions from SpecType. By using SpecObjectType elements, multiple requirements can be /// associated with the same set of attribute definitions (attribute names, default values, data types, etc.). /// - [Class(name: "SPEC-RELATION-TYPE")] + [ReqIfClass(name: "SPEC-RELATION-TYPE")] public class SpecRelationType : SpecType { /// diff --git a/ReqIFSharp/SpecType/SpecType.cs b/ReqIFSharp/SpecType/SpecType.cs index f028f2f..e2c2611 100644 --- a/ReqIFSharp/SpecType/SpecType.cs +++ b/ReqIFSharp/SpecType/SpecType.cs @@ -33,7 +33,7 @@ namespace ReqIFSharp /// Contains a set of attribute definitions. By using an instance of a subclass of , multiple elements can be /// associated with the same set of attribute definitions (attribute names, default values, data types, etc.). /// - [Class(name: "SPEC-TYPE", isAbstract: true)] + [ReqIfClass(name: "SPEC-TYPE", isAbstract: true)] public abstract class SpecType : Identifiable { /// diff --git a/ReqIFSharp/SpecType/SpecificationType.cs b/ReqIFSharp/SpecType/SpecificationType.cs index 477699b..7a66814 100644 --- a/ReqIFSharp/SpecType/SpecificationType.cs +++ b/ReqIFSharp/SpecType/SpecificationType.cs @@ -27,7 +27,7 @@ namespace ReqIFSharp /// Inherits a set of attribute definitions from SpecType. By using SpecificationType elements, multiple specifications can be /// associated with the same set of attribute definitions (attribute names, default values, data types, etc.). /// - [Class(name: "SPECIFICATION-TYPE")] + [ReqIfClass(name: "SPECIFICATION-TYPE")] public class SpecificationType : SpecType { /// From 6c42b3447152960d2938f9093cfb74bced7990ce Mon Sep 17 00:00:00 2001 From: samatstarion Date: Sat, 6 Jun 2026 16:03:26 +0200 Subject: [PATCH 4/4] [Update] spell out all decorator arguments explicitly at every use-site Every [ReqIfClass] and [ReqIfProperty] usage now passes all constructor arguments explicitly, including the optional ones that previously fell back to defaults (isOrdered/isReadOnly/isDerived/isDerivedUnion/isUnique/defaultValue on properties; isAbstract on concrete classes). Values are unchanged - this is a readability change so the metadata is self-documenting at the use-site. --- ReqIFSharp/AccessControlledElement.cs | 2 +- ReqIFSharp/AlternativeID.cs | 4 ++-- .../AttributeDefinitionBoolean.cs | 6 +++--- .../AttributeDefinitionDate.cs | 6 +++--- .../AttributeDefinitionEnumeration.cs | 8 ++++---- .../AttributeDefinitionInteger.cs | 6 +++--- .../AttributeDefinitionReal.cs | 6 +++--- .../AttributeDefinitionString.cs | 6 +++--- .../AttributeDefinitionXHTML.cs | 6 +++--- .../AttributeValue/AttributeValueBoolean.cs | 6 +++--- .../AttributeValue/AttributeValueDate.cs | 6 +++--- .../AttributeValueEnumeration.cs | 6 +++--- .../AttributeValue/AttributeValueInteger.cs | 6 +++--- .../AttributeValue/AttributeValueReal.cs | 6 +++--- .../AttributeValue/AttributeValueString.cs | 6 +++--- .../AttributeValue/AttributeValueXHTML.cs | 10 +++++----- ReqIFSharp/AttributeValue/ExternalObject.cs | 10 +++++----- .../Datatype/DatatypeDefinitionBoolean.cs | 2 +- ReqIFSharp/Datatype/DatatypeDefinitionDate.cs | 2 +- .../Datatype/DatatypeDefinitionEnumeration.cs | 4 ++-- .../Datatype/DatatypeDefinitionInteger.cs | 6 +++--- ReqIFSharp/Datatype/DatatypeDefinitionReal.cs | 8 ++++---- .../Datatype/DatatypeDefinitionString.cs | 4 ++-- ReqIFSharp/Datatype/DatatypeDefinitionXHTML.cs | 2 +- ReqIFSharp/Datatype/EmbeddedValue.cs | 6 +++--- ReqIFSharp/Datatype/EnumValue.cs | 4 ++-- ReqIFSharp/Identifiable.cs | 10 +++++----- ReqIFSharp/ReqIF.cs | 10 +++++----- ReqIFSharp/ReqIFContent.cs | 14 +++++++------- ReqIFSharp/ReqIFHeader.cs | 18 +++++++++--------- ReqIFSharp/ReqIFToolExtension.cs | 4 ++-- .../SpecElementWithAttributes/RelationGroup.cs | 10 +++++----- .../SpecElementWithAttributes.cs | 2 +- .../SpecElementWithAttributes/SpecHierarchy.cs | 10 +++++----- .../SpecElementWithAttributes/SpecObject.cs | 4 ++-- .../SpecElementWithAttributes/SpecRelation.cs | 8 ++++---- .../SpecElementWithAttributes/Specification.cs | 6 +++--- ReqIFSharp/SpecType/RelationGroupType.cs | 2 +- ReqIFSharp/SpecType/SpecObjectType.cs | 2 +- ReqIFSharp/SpecType/SpecRelationType.cs | 2 +- ReqIFSharp/SpecType/SpecType.cs | 2 +- ReqIFSharp/SpecType/SpecificationType.cs | 2 +- 42 files changed, 125 insertions(+), 125 deletions(-) diff --git a/ReqIFSharp/AccessControlledElement.cs b/ReqIFSharp/AccessControlledElement.cs index 7fc86d0..ac3e273 100644 --- a/ReqIFSharp/AccessControlledElement.cs +++ b/ReqIFSharp/AccessControlledElement.cs @@ -67,7 +67,7 @@ protected AccessControlledElement(ILoggerFactory loggerFactory) /// True means that the element’s contents may be modified by the user of a tool containing the element. /// False or leaving isEditable out means that the element is read-only to the user of a tool containing the element. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public bool IsEditable { get; set; } /// diff --git a/ReqIFSharp/AlternativeID.cs b/ReqIFSharp/AlternativeID.cs index 23abc23..c428522 100644 --- a/ReqIFSharp/AlternativeID.cs +++ b/ReqIFSharp/AlternativeID.cs @@ -28,7 +28,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to provide an alternative, tool-specific identification. /// - [ReqIfClass(name: "ALTERNATIVE-ID")] + [ReqIfClass(name: "ALTERNATIVE-ID", isAbstract: false)] public class AlternativeId { /// @@ -53,7 +53,7 @@ internal AlternativeId(Identifiable identifiable) /// /// Gets or sets the optional alternative identifier, which may be a requirements management tool identifier or tool identifier /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string Identifier { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs index 8ed0ec0..7b80687 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionBoolean.cs @@ -39,7 +39,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an attribute /// value if no attribute value is supplied by the user of the requirements authoring tool /// - [ReqIfClass(name: "ATTRIBUTE-DEFINITION-BOOLEAN")] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION-BOOLEAN", isAbstract: false)] public class AttributeDefinitionBoolean : AttributeDefinitionSimple { /// @@ -85,13 +85,13 @@ internal AttributeDefinitionBoolean(SpecType specType, ILoggerFactory loggerFact /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public AttributeValueBoolean DefaultValue { get; set; } /// /// Gets or sets the data type. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DatatypeDefinitionBoolean Type { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs index 3f90249..aa48001 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionDate.cs @@ -40,7 +40,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an attribute /// value if no attribute value is supplied by the user of the requirements authoring tool /// - [ReqIfClass(name: "ATTRIBUTE-DEFINITION-DATE")] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION-DATE", isAbstract: false)] public class AttributeDefinitionDate : AttributeDefinitionSimple { /// @@ -86,13 +86,13 @@ internal AttributeDefinitionDate(SpecType specType, ILoggerFactory loggerFactory /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public AttributeValueDate DefaultValue { get; set; } /// /// Gets or sets the data type. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DatatypeDefinitionDate Type { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs index 2c842b1..76af9c8 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionEnumeration.cs @@ -39,7 +39,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an /// attribute value if no attribute value is supplied by the user of the requirements authoring tool. /// - [ReqIfClass(name: "ATTRIBUTE-DEFINITION-ENUMERATION")] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION-ENUMERATION", isAbstract: false)] public class AttributeDefinitionEnumeration : AttributeDefinition { /// @@ -85,13 +85,13 @@ internal AttributeDefinitionEnumeration(SpecType specType, ILoggerFactory logger /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public AttributeValueEnumeration DefaultValue { get; set; } /// /// Gets or sets the data type. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DatatypeDefinitionEnumeration Type { get; set; } /// @@ -137,7 +137,7 @@ protected override void SetDatatypeDefinition(DatatypeDefinition datatypeDefinit /// If set to false, this means that the user of a requirements authoring tool can pick exactly one of the values in the set of /// specified values as an enumeration attribute value. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public bool IsMultiValued { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs index 74c5b5f..5d555d9 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionInteger.cs @@ -41,7 +41,7 @@ namespace ReqIFSharp /// value if no attribute value is supplied by the user of the requirements authoring tool. /// ReqIfSharp supports 64 bit singed integers (long) with the following range: -9223372036854775808 to 9223372036854775807 /// - [ReqIfClass(name: "ATTRIBUTE-DEFINITION-INTEGER")] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION-INTEGER", isAbstract: false)] public class AttributeDefinitionInteger : AttributeDefinitionSimple { /// @@ -87,13 +87,13 @@ internal AttributeDefinitionInteger(SpecType specType, ILoggerFactory loggerFact /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public AttributeValueInteger DefaultValue { get; set; } /// /// Gets or sets the data type. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DatatypeDefinitionInteger Type { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs index 4462f07..c9f4cbd 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionReal.cs @@ -40,7 +40,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an attribute /// value if no attribute value is supplied by the user of the requirements authoring tool. /// - [ReqIfClass(name: "ATTRIBUTE-DEFINITION-REAL")] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION-REAL", isAbstract: false)] public class AttributeDefinitionReal : AttributeDefinitionSimple { /// @@ -86,13 +86,13 @@ internal AttributeDefinitionReal(SpecType specType, ILoggerFactory loggerFactory /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public AttributeValueReal DefaultValue { get; set; } /// /// Gets or sets the data type. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DatatypeDefinitionReal Type { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs index 7fd993c..2465bd0 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionString.cs @@ -39,7 +39,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an attribute /// value if no attribute value is supplied by the user of the requirements authoring tool. /// - [ReqIfClass(name: "ATTRIBUTE-DEFINITION-STRING")] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION-STRING", isAbstract: false)] public class AttributeDefinitionString : AttributeDefinitionSimple { /// @@ -85,13 +85,13 @@ internal AttributeDefinitionString(SpecType specType, ILoggerFactory loggerFacto /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public AttributeValueString DefaultValue { get; set; } /// /// Gets or sets the data type. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DatatypeDefinitionString Type { get; set; } /// diff --git a/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs b/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs index 7d9fa38..889ec51 100644 --- a/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs +++ b/ReqIFSharp/AttributeDefinition/AttributeDefinitionXHTML.cs @@ -39,7 +39,7 @@ namespace ReqIFSharp /// An element MAY contain a default value that represents the value that is used as an attribute /// value if no attribute value is supplied by the user of the requirements authoring tool. /// - [ReqIfClass(name: "ATTRIBUTE-DEFINITION-XHTML")] + [ReqIfClass(name: "ATTRIBUTE-DEFINITION-XHTML", isAbstract: false)] public class AttributeDefinitionXHTML : AttributeDefinition { /// @@ -85,13 +85,13 @@ internal AttributeDefinitionXHTML(SpecType specType, ILoggerFactory loggerFactor /// Gets or sets the owned default value that is used if no attribute value is supplied /// by the user of the requirements authoring tool. /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public AttributeValueXHTML DefaultValue { get; set; } /// /// Gets or sets the data type. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DatatypeDefinitionXHTML Type { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs b/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs index 8aa4346..f0a051d 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueBoolean.cs @@ -33,7 +33,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define a attribute value. /// - [ReqIfClass(name: "ATTRIBUTE-VALUE-BOOLEAN")] + [ReqIfClass(name: "ATTRIBUTE-VALUE-BOOLEAN", isAbstract: false)] public class AttributeValueBoolean : AttributeValueSimple { /// @@ -96,7 +96,7 @@ internal AttributeValueBoolean(SpecElementWithAttributes specElAt, ILoggerFactor /// /// Gets or sets the attribute value. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public bool TheValue { get; set; } /// @@ -122,7 +122,7 @@ public override object ObjectValue /// /// Gets or sets a reference to the value definition /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public AttributeDefinitionBoolean Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueDate.cs b/ReqIFSharp/AttributeValue/AttributeValueDate.cs index 8b1b3f0..ea559ea 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueDate.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueDate.cs @@ -34,7 +34,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define a attribute value. /// - [ReqIfClass(name: "ATTRIBUTE-VALUE-DATE")] + [ReqIfClass(name: "ATTRIBUTE-VALUE-DATE", isAbstract: false)] public class AttributeValueDate : AttributeValueSimple { /// @@ -86,7 +86,7 @@ internal AttributeValueDate(SpecElementWithAttributes specElAt, ILoggerFactory l /// /// Gets or sets the attribute value. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DateTime TheValue { get; set; } /// @@ -112,7 +112,7 @@ public override object ObjectValue /// /// Gets or sets the Reference to the value definition. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public AttributeDefinitionDate Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs b/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs index 95aa156..48154cf 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueEnumeration.cs @@ -34,7 +34,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define an enumeration attribute value. /// - [ReqIfClass(name: "ATTRIBUTE-VALUE-ENUMERATION")] + [ReqIfClass(name: "ATTRIBUTE-VALUE-ENUMERATION", isAbstract: false)] public class AttributeValueEnumeration : AttributeValue { /// @@ -102,7 +102,7 @@ internal AttributeValueEnumeration(SpecElementWithAttributes specElAt, ILoggerFa /// /// Gets s that are chosen from a set of specified values /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Values => this.values; /// @@ -129,7 +129,7 @@ public override object ObjectValue /// /// Gets or sets the Reference to the attribute definition that relates the value to its data type. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public AttributeDefinitionEnumeration Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueInteger.cs b/ReqIFSharp/AttributeValue/AttributeValueInteger.cs index 28759be..344fe03 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueInteger.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueInteger.cs @@ -37,7 +37,7 @@ namespace ReqIFSharp /// /// ReqIfSharp supports 64 bit signed integers (long) with the following range: -9223372036854775808 to 9223372036854775807 /// - [ReqIfClass(name: "ATTRIBUTE-VALUE-INTEGER")] + [ReqIfClass(name: "ATTRIBUTE-VALUE-INTEGER", isAbstract: false)] public class AttributeValueInteger : AttributeValueSimple { /// @@ -100,7 +100,7 @@ internal AttributeValueInteger(SpecElementWithAttributes specElAt, ILoggerFactor /// /// Gets or sets the attribute value /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public long TheValue { get; set; } /// @@ -126,7 +126,7 @@ public override object ObjectValue /// /// Gets or sets the Reference to the value definition. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public AttributeDefinitionInteger Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueReal.cs b/ReqIFSharp/AttributeValue/AttributeValueReal.cs index 27e46a8..4715b0c 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueReal.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueReal.cs @@ -34,7 +34,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define a real attribute value. /// - [ReqIfClass(name: "ATTRIBUTE-VALUE-REAL")] + [ReqIfClass(name: "ATTRIBUTE-VALUE-REAL", isAbstract: false)] public class AttributeValueReal : AttributeValueSimple { /// @@ -97,7 +97,7 @@ internal AttributeValueReal(SpecElementWithAttributes specElAt, ILoggerFactory l /// /// Gets or sets the attribute value /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public double TheValue { get; set; } /// @@ -123,7 +123,7 @@ public override object ObjectValue /// /// Gets or sets the reference to the value definition /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public AttributeDefinitionReal Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueString.cs b/ReqIFSharp/AttributeValue/AttributeValueString.cs index 07a4abb..eb29206 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueString.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueString.cs @@ -33,7 +33,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define a attribute value. /// - [ReqIfClass(name: "ATTRIBUTE-VALUE-STRING")] + [ReqIfClass(name: "ATTRIBUTE-VALUE-STRING", isAbstract: false)] public class AttributeValueString : AttributeValueSimple { /// @@ -86,7 +86,7 @@ internal AttributeValueString(SpecElementWithAttributes specElAt, ILoggerFactory /// /// Gets or sets the attribute value /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string TheValue { get; set; } /// @@ -104,7 +104,7 @@ public override object ObjectValue /// /// Gets or sets reference to the value definition /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public AttributeDefinitionString Definition { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs b/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs index caf973c..3837cad 100644 --- a/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs +++ b/ReqIFSharp/AttributeValue/AttributeValueXHTML.cs @@ -37,7 +37,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define an attribute value with XHTML contents. /// - [ReqIfClass(name: "ATTRIBUTE-VALUE-XHTML")] + [ReqIfClass(name: "ATTRIBUTE-VALUE-XHTML", isAbstract: false)] public class AttributeValueXHTML : AttributeValue { /// @@ -104,13 +104,13 @@ internal AttributeValueXHTML(AttributeDefinitionXHTML attributeDefinition, ILogg /// /// Gets or sets the XHTML Content /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string TheValue { get; set; } /// /// Gets or sets the Linkage to the original attribute value that has been saved if isSimplified is true. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string TheOriginalValue { get; set; } /// @@ -141,7 +141,7 @@ public override object ObjectValue /// /// Gets or sets the Reference to the attribute definition that relates the value to its data type. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public AttributeDefinitionXHTML Definition { get; set; } /// @@ -184,7 +184,7 @@ protected override void SetAttributeDefinition(AttributeDefinition attributeDefi /// /// Gets or sets a value indicating whether the attribute value is a simplified representation of the original value. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public bool IsSimplified { get; set; } /// diff --git a/ReqIFSharp/AttributeValue/ExternalObject.cs b/ReqIFSharp/AttributeValue/ExternalObject.cs index 74c2078..5367a23 100644 --- a/ReqIFSharp/AttributeValue/ExternalObject.cs +++ b/ReqIFSharp/AttributeValue/ExternalObject.cs @@ -33,7 +33,7 @@ namespace ReqIFSharp /// /// The specification for the XTHML object element defines several XML attributes. For ReqIF, only a subset of these attributes is relevant and used. /// - [ReqIfClass(name: "EXTERNAL-OBJECT")] + [ReqIfClass(name: "EXTERNAL-OBJECT", isAbstract: false)] public class ExternalObject { /// @@ -55,25 +55,25 @@ public ExternalObject(AttributeValueXHTML attributeValueXhtml) /// /// Gets or sets the Uri of the , this may be a relative uri or an absolute uri /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string Uri { get; set; } /// /// Gets or sets the MimeType of the external object represented as a string /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string MimeType { get; set; } /// /// Gets or sets the height of the external object in case it is an image /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public int? Height { get; set; } /// /// Gets or sets the width of the external object in case it is an image /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public int? Width { get; set; } /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionBoolean.cs b/ReqIFSharp/Datatype/DatatypeDefinitionBoolean.cs index a868c58..22ba6a0 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionBoolean.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionBoolean.cs @@ -32,7 +32,7 @@ namespace ReqIFSharp /// /// This element defines a data type for the representation of Boolean data values in the Exchange Document. /// - [ReqIfClass(name: "DATATYPE-DEFINITION-BOOLEAN")] + [ReqIfClass(name: "DATATYPE-DEFINITION-BOOLEAN", isAbstract: false)] public class DatatypeDefinitionBoolean : DatatypeDefinitionSimple { /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionDate.cs b/ReqIFSharp/Datatype/DatatypeDefinitionDate.cs index fe72d56..0a25ed7 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionDate.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionDate.cs @@ -33,7 +33,7 @@ namespace ReqIFSharp /// /// This element defines a data type for the representation of Date and Time data values in the Exchange Document. /// - [ReqIfClass(name: "DATATYPE-DEFINITION-DATE")] + [ReqIfClass(name: "DATATYPE-DEFINITION-DATE", isAbstract: false)] public class DatatypeDefinitionDate : DatatypeDefinitionSimple { /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs b/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs index fd751d8..4082441 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionEnumeration.cs @@ -37,7 +37,7 @@ namespace ReqIFSharp /// Data type definition for enumeration types. The set of enumeration values referenced by specifiedValues constrains the /// possible choices for enumeration attribute values /// - [ReqIfClass(name: "DATATYPE-DEFINITION-ENUMERATION")] + [ReqIfClass(name: "DATATYPE-DEFINITION-ENUMERATION", isAbstract: false)] public class DatatypeDefinitionEnumeration : DatatypeDefinition { /// @@ -88,7 +88,7 @@ internal DatatypeDefinitionEnumeration(ReqIFContent reqIfContent, ILoggerFactory /// /// Gets the owned enumeration literals /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List SpecifiedValues => this.specifiedValues; /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs b/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs index 681facf..01fe767 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionInteger.cs @@ -37,7 +37,7 @@ namespace ReqIFSharp /// The representation of data values shall comply with the definitions in http://www.w3.org/TR/xmlschema-2/#integer /// ReqIfSharp supports 64-bit signed integers (long) with the following range: -9223372036854775808 to 9223372036854775807 /// - [ReqIfClass(name: "DATATYPE-DEFINITION-INTEGER")] + [ReqIfClass(name: "DATATYPE-DEFINITION-INTEGER", isAbstract: false)] public class DatatypeDefinitionInteger : DatatypeDefinitionSimple { /// @@ -83,13 +83,13 @@ internal DatatypeDefinitionInteger(ReqIFContent reqIfContent, ILoggerFactory log /// /// Gets or sets a value that denotes the largest negative data value representable by this data type. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public long Min { get; set; } /// /// Gets or sets a value that denotes the largest positive data value representable by this data type. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public long Max { get; set; } /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs b/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs index 930d8a4..2822462 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionReal.cs @@ -32,7 +32,7 @@ namespace ReqIFSharp /// /// This element defines a data type for the representation of Real data values in the Exchange Document. /// - [ReqIfClass(name: "DATATYPE-DEFINITION-REAL")] + [ReqIfClass(name: "DATATYPE-DEFINITION-REAL", isAbstract: false)] public class DatatypeDefinitionReal : DatatypeDefinitionSimple { /// @@ -78,19 +78,19 @@ internal DatatypeDefinitionReal(ReqIFContent reqIfContent, ILoggerFactory logger /// /// Gets or sets a value that Denotes the supported maximum precision of real numbers represented by this data type. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public long Accuracy { get; set; } /// /// Gets or sets a value that denotes the largest negative data value representable by this data type. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public double Min { get; set; } /// /// Gets or sets a value that denotes the largest positive data value representable by this data type. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public double Max { get; set; } /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionString.cs b/ReqIFSharp/Datatype/DatatypeDefinitionString.cs index 3bbce94..9212660 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionString.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionString.cs @@ -35,7 +35,7 @@ namespace ReqIFSharp /// /// This element defines a data type for the representation of String data values in the Exchange Document. /// - [ReqIfClass(name: "DATATYPE-DEFINITION-STRING")] + [ReqIfClass(name: "DATATYPE-DEFINITION-STRING", isAbstract: false)] public class DatatypeDefinitionString : DatatypeDefinitionSimple { /// @@ -81,7 +81,7 @@ internal DatatypeDefinitionString(ReqIFContent reqIfContent, ILoggerFactory logg /// /// Gets or sets the maximum permissible string length /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public long MaxLength { get; set; } /// diff --git a/ReqIFSharp/Datatype/DatatypeDefinitionXHTML.cs b/ReqIFSharp/Datatype/DatatypeDefinitionXHTML.cs index 5fedb6c..0056e74 100644 --- a/ReqIFSharp/Datatype/DatatypeDefinitionXHTML.cs +++ b/ReqIFSharp/Datatype/DatatypeDefinitionXHTML.cs @@ -29,7 +29,7 @@ namespace ReqIFSharp /// /// The purpose of the class is to define XHTML formatted data. /// - [ReqIfClass(name: "DATATYPE-DEFINITION-XHTML")] + [ReqIfClass(name: "DATATYPE-DEFINITION-XHTML", isAbstract: false)] public class DatatypeDefinitionXHTML : DatatypeDefinition { /// diff --git a/ReqIFSharp/Datatype/EmbeddedValue.cs b/ReqIFSharp/Datatype/EmbeddedValue.cs index e1d3489..7f80ffe 100644 --- a/ReqIFSharp/Datatype/EmbeddedValue.cs +++ b/ReqIFSharp/Datatype/EmbeddedValue.cs @@ -32,7 +32,7 @@ namespace ReqIFSharp /// /// The class represents additional information related to enumeration literals. /// - [ReqIfClass(name: "EMBEDDED-VALUE")] + [ReqIfClass(name: "EMBEDDED-VALUE", isAbstract: false)] public class EmbeddedValue { /// @@ -68,7 +68,7 @@ internal EmbeddedValue(EnumValue enumValue, ILoggerFactory loggerFactory) /// /// Gets or sets the numerical value corresponding to the enumeration literal. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public long Key { get; set; } /// @@ -77,7 +77,7 @@ internal EmbeddedValue(EnumValue enumValue, ILoggerFactory loggerFactory) /// /// example: a color /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string OtherContent { get; set; } /// diff --git a/ReqIFSharp/Datatype/EnumValue.cs b/ReqIFSharp/Datatype/EnumValue.cs index 7acfdb7..903f83c 100644 --- a/ReqIFSharp/Datatype/EnumValue.cs +++ b/ReqIFSharp/Datatype/EnumValue.cs @@ -29,7 +29,7 @@ namespace ReqIFSharp /// /// The class represents enumeration literals. /// - [ReqIfClass(name: "ENUM-VALUE")] + [ReqIfClass(name: "ENUM-VALUE", isAbstract: false)] public class EnumValue : Identifiable { /// @@ -69,7 +69,7 @@ internal EnumValue(DatatypeDefinitionEnumeration datatypeDefinitionEnumeration, /// /// Gets or sets the owned /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public EmbeddedValue Properties { get; set; } /// diff --git a/ReqIFSharp/Identifiable.cs b/ReqIFSharp/Identifiable.cs index 61e95c8..ac22ba2 100644 --- a/ReqIFSharp/Identifiable.cs +++ b/ReqIFSharp/Identifiable.cs @@ -78,7 +78,7 @@ protected Identifiable(ILoggerFactory loggerFactory) /// /// Gets or sets the optional additional description for the information element. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string Description { get; set; } /// @@ -87,7 +87,7 @@ protected Identifiable(ILoggerFactory loggerFactory) /// /// The value of the identifier must be a well-formed xsd:ID. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string Identifier { get; set; } /// @@ -98,19 +98,19 @@ protected Identifiable(ILoggerFactory loggerFactory) /// /// date time formatting: 2005-03-04T10:24:18+01:00 (MET time zone). /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DateTime LastChange { get; set; } /// /// Gets or sets the human-readable name for the information element. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string LongName { get; set; } /// /// Gets or sets optional alternative identification element. /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public AlternativeId AlternativeId { get; set; } /// diff --git a/ReqIFSharp/ReqIF.cs b/ReqIFSharp/ReqIF.cs index 867e921..1685ce0 100644 --- a/ReqIFSharp/ReqIF.cs +++ b/ReqIFSharp/ReqIF.cs @@ -31,7 +31,7 @@ namespace ReqIFSharp /// /// The class constitutes the root element of a ReqIF Exchange Document. /// - [ReqIfClass(name: "REQ-IF")] + [ReqIfClass(name: "REQ-IF", isAbstract: false)] public class ReqIF { /// @@ -74,19 +74,19 @@ internal ReqIF(ILoggerFactory loggerFactory) /// /// Gets the mandatory Exchange Document header, which contains metadata relevant for this exchange. /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public ReqIFHeader TheHeader { get; set; } /// /// Gets the mandatory Exchange Document content. /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public ReqIFContent CoreContent { get; set; } /// /// Gets the optional Exchange Document content based on tool extensions, if such extensions and content are present. /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List ToolExtension { get; set; } = new List(); /// @@ -95,7 +95,7 @@ internal ReqIF(ILoggerFactory loggerFactory) /// /// The format is defined by the standard for specifying languages in XML documents proposed by the W3C /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string Lang { get; set; } /// diff --git a/ReqIFSharp/ReqIFContent.cs b/ReqIFSharp/ReqIFContent.cs index 456d679..b06aebf 100644 --- a/ReqIFSharp/ReqIFContent.cs +++ b/ReqIFSharp/ReqIFContent.cs @@ -32,7 +32,7 @@ namespace ReqIFSharp /// /// The class represents the mandatory content of a ReqIF Exchange Document. /// - [ReqIfClass(name: "REQ-IF-CONTENT")] + [ReqIfClass(name: "REQ-IF-CONTENT", isAbstract: false)] public class ReqIFContent { /// @@ -99,37 +99,37 @@ internal ReqIFContent(ILoggerFactory loggerFactory) /// /// Gets the s /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List DataTypes => this.dataTypes; /// /// Gets the s /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List SpecTypes => this.specTypes; /// /// Gets the /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List SpecObjects => this.specObjects; /// /// Gets the /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List SpecRelations => this.specRelations; /// /// Gets the /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Specifications => this.specifications; /// /// Gets the /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List SpecRelationGroups => this.specRelationGroups; /// diff --git a/ReqIFSharp/ReqIFHeader.cs b/ReqIFSharp/ReqIFHeader.cs index 59b249d..a533dfa 100644 --- a/ReqIFSharp/ReqIFHeader.cs +++ b/ReqIFSharp/ReqIFHeader.cs @@ -34,7 +34,7 @@ namespace ReqIFSharp /// /// Meta-information held in the element is applicable to the Exchange Document as a whole. /// - [ReqIfClass(name: "REQ-IF-HEADER")] + [ReqIfClass(name: "REQ-IF-HEADER", isAbstract: false)] public class ReqIFHeader { /// @@ -64,7 +64,7 @@ internal ReqIFHeader(ILoggerFactory loggerFactory) /// /// Gets or sets an optional comment associated with the Exchange Document as a whole /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string Comment { get; set; } /// @@ -76,7 +76,7 @@ internal ReqIFHeader(ILoggerFactory loggerFactory) /// /// Example: 2005-03-04T10:24:18+01:00 (MET time zone). /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public DateTime CreationTime { get; set; } /// @@ -85,31 +85,31 @@ internal ReqIFHeader(ILoggerFactory loggerFactory) /// /// Examples for repositoryID: databaseId, URL. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string RepositoryId { get; set; } /// /// Gets or sets the identifier of the exporting "ReqIF" tool. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string ReqIFToolId { get; set; } /// /// Gets or sets the ReqIF interchange format and protocol version /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string ReqIFVersion { get; set; } /// /// Gets or sets the identifier of the exporting requirements management tool /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string SourceToolId { get; set; } /// /// Gets or sets the title of the Exchange Document. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string Title { get; set; } /// @@ -118,7 +118,7 @@ internal ReqIFHeader(ILoggerFactory loggerFactory) /// /// The value of the identifier is of the XML Schema data type “xsd::ID” /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string Identifier { get; set; } /// diff --git a/ReqIFSharp/ReqIFToolExtension.cs b/ReqIFSharp/ReqIFToolExtension.cs index 607d654..03c309a 100644 --- a/ReqIFSharp/ReqIFToolExtension.cs +++ b/ReqIFSharp/ReqIFToolExtension.cs @@ -29,7 +29,7 @@ namespace ReqIFSharp /// /// The class allows the optional inclusion of tool-specific information into a ReqIF Exchange Document. /// - [ReqIfClass(name: "REQ-IF-TOOL-EXTENSION")] + [ReqIfClass(name: "REQ-IF-TOOL-EXTENSION", isAbstract: false)] public class ReqIFToolExtension { /// @@ -52,7 +52,7 @@ internal ReqIFToolExtension(ILoggerFactory loggerFactory) /// /// Gets or sets the InnerXml of the /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public string InnerXml { get; set; } /// diff --git a/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs b/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs index 6fc81da..6194d46 100644 --- a/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs +++ b/ReqIFSharp/SpecElementWithAttributes/RelationGroup.cs @@ -40,7 +40,7 @@ namespace ReqIFSharp /// /// a instance may represent a set of relations between a customer requirements and a system requirements . /// - [ReqIfClass(name: "RELATION-GROUP")] + [ReqIfClass(name: "RELATION-GROUP", isAbstract: false)] public class RelationGroup : SpecElementWithAttributes { /// @@ -94,25 +94,25 @@ internal RelationGroup(ReqIFContent reqIfContent, ILoggerFactory loggerFactory) /// /// Gets or sets the reference /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public RelationGroupType Type { get; set; } /// /// Gets or sets the that contains instances that are source objects of the relations. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Specification SourceSpecification { get; set; } /// /// Gets or sets the that contains instances that are target objects of the relations. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public Specification TargetSpecification { get; set; } /// /// Gets the grouped s /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List SpecRelations => this.specRelations; /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs b/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs index 29dffcb..0c72b84 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecElementWithAttributes.cs @@ -90,7 +90,7 @@ protected SpecElementWithAttributes(ReqIFContent reqIfContent, ILoggerFactory lo /// /// Gets the values of the attributes owned by the element. /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Values => this.values; /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs b/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs index c0fb48c..bcdcad8 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecHierarchy.cs @@ -39,7 +39,7 @@ namespace ReqIFSharp /// The tree is created by references of instances to other instances. /// Each node has additionally a reference to a resulting in a hierarchical structure of s /// - [ReqIfClass(name: "SPEC-HIERARCHY")] + [ReqIfClass(name: "SPEC-HIERARCHY", isAbstract: false)] public class SpecHierarchy : AccessControlledElement { /// @@ -130,19 +130,19 @@ internal SpecHierarchy(SpecHierarchy container, Specification root, ReqIFContent /// /// Gets the Down links to next level of owned SpecHierarchy. /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Children => this.children; /// /// Gets the attributes whose values are editable for the by a tool user /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List EditableAtts => this.editableAtts; /// /// Gets or sets the reference to the associated /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public SpecObject Object { get; set; } /// @@ -155,7 +155,7 @@ internal SpecHierarchy(SpecHierarchy container, Specification root, ReqIFContent /// The root node of the table hierarchy is related to the SpecObject element that is the root of the table by the object /// association. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public bool IsTableInternal { get; set; } /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs b/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs index f5be381..287fc38 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecObject.cs @@ -38,7 +38,7 @@ namespace ReqIFSharp /// The instance itself does not carry the requirements text or any other user defined content. /// This data is stored in instances that are associated to the instance. /// - [ReqIfClass(name: "SPEC-OBJECT")] + [ReqIfClass(name: "SPEC-OBJECT", isAbstract: false)] public class SpecObject : SpecElementWithAttributes { /// @@ -86,7 +86,7 @@ internal SpecObject(ReqIFContent reqIfContent, ILoggerFactory loggerFactory) /// /// Gets or sets the reference. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public SpecObjectType Type { get; set; } /// diff --git a/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs b/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs index 3ef467c..dd99d62 100644 --- a/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs +++ b/ReqIFSharp/SpecElementWithAttributes/SpecRelation.cs @@ -33,7 +33,7 @@ namespace ReqIFSharp /// /// Defines relations (links) between two instances. /// - [ReqIfClass(name: "SPEC-RELATION")] + [ReqIfClass(name: "SPEC-RELATION", isAbstract: false)] public class SpecRelation : SpecElementWithAttributes { /// @@ -81,19 +81,19 @@ internal SpecRelation(ReqIFContent reqIfContent, ILoggerFactory loggerFactory) /// /// Gets or sets the Source object of the relationship. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public SpecObject Source { get; set; } /// /// Gets or sets the Target object of the relationship. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public SpecObject Target { get; set; } /// /// Gets or sets the of the relationship /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public SpecRelationType Type { get; set; } /// diff --git a/ReqIFSharp/SpecElementWithAttributes/Specification.cs b/ReqIFSharp/SpecElementWithAttributes/Specification.cs index 1a00486..d6c7a05 100644 --- a/ReqIFSharp/SpecElementWithAttributes/Specification.cs +++ b/ReqIFSharp/SpecElementWithAttributes/Specification.cs @@ -35,7 +35,7 @@ namespace ReqIFSharp /// Represents a hierarchically structured requirements specification. /// It is the root node of the tree that hierarchically structures instances. /// - [ReqIfClass(name: "SPECIFICATION")] + [ReqIfClass(name: "SPECIFICATION", isAbstract: false)] public class Specification : SpecElementWithAttributes { /// @@ -79,13 +79,13 @@ internal Specification(ReqIFContent reqIfContent, ILoggerFactory loggerFactory) /// /// Gets the links to next level of owned SpecHierarchy. /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List Children => this.children; /// /// Gets or sets the reference. /// - [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1)] + [ReqIfProperty(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public SpecificationType Type { get; set; } /// diff --git a/ReqIFSharp/SpecType/RelationGroupType.cs b/ReqIFSharp/SpecType/RelationGroupType.cs index 88888eb..08e2f87 100644 --- a/ReqIFSharp/SpecType/RelationGroupType.cs +++ b/ReqIFSharp/SpecType/RelationGroupType.cs @@ -29,7 +29,7 @@ namespace ReqIFSharp /// Inherits a set of attribute definitions from . By using elements, elements can /// be associated with attribute names, default values, data types, etc. /// - [ReqIfClass(name: "RELATION-GROUP-TYPE")] + [ReqIfClass(name: "RELATION-GROUP-TYPE", isAbstract: false)] public class RelationGroupType : SpecType { /// diff --git a/ReqIFSharp/SpecType/SpecObjectType.cs b/ReqIFSharp/SpecType/SpecObjectType.cs index 487638e..aeca3f1 100644 --- a/ReqIFSharp/SpecType/SpecObjectType.cs +++ b/ReqIFSharp/SpecType/SpecObjectType.cs @@ -27,7 +27,7 @@ namespace ReqIFSharp /// Inherits a set of attribute definitions from SpecType. By using SpecObjectType elements, multiple requirements can be /// associated with the same set of attribute definitions (attribute names, default values, data types, etc.). /// - [ReqIfClass(name: "SPEC-OBJECT-TYPE")] + [ReqIfClass(name: "SPEC-OBJECT-TYPE", isAbstract: false)] public class SpecObjectType : SpecType { /// diff --git a/ReqIFSharp/SpecType/SpecRelationType.cs b/ReqIFSharp/SpecType/SpecRelationType.cs index d670650..8ce7a91 100644 --- a/ReqIFSharp/SpecType/SpecRelationType.cs +++ b/ReqIFSharp/SpecType/SpecRelationType.cs @@ -27,7 +27,7 @@ namespace ReqIFSharp /// Inherits a set of attribute definitions from SpecType. By using SpecObjectType elements, multiple requirements can be /// associated with the same set of attribute definitions (attribute names, default values, data types, etc.). /// - [ReqIfClass(name: "SPEC-RELATION-TYPE")] + [ReqIfClass(name: "SPEC-RELATION-TYPE", isAbstract: false)] public class SpecRelationType : SpecType { /// diff --git a/ReqIFSharp/SpecType/SpecType.cs b/ReqIFSharp/SpecType/SpecType.cs index e2c2611..765c0f4 100644 --- a/ReqIFSharp/SpecType/SpecType.cs +++ b/ReqIFSharp/SpecType/SpecType.cs @@ -92,7 +92,7 @@ protected SpecType(ReqIFContent reqIfContent, ILoggerFactory loggerFactory) /// /// Gets the set of attribute definitions. /// - [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue)] + [ReqIfProperty(aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: false, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] public List SpecAttributes => this.specAttributes; /// diff --git a/ReqIFSharp/SpecType/SpecificationType.cs b/ReqIFSharp/SpecType/SpecificationType.cs index 7a66814..bd7c00f 100644 --- a/ReqIFSharp/SpecType/SpecificationType.cs +++ b/ReqIFSharp/SpecType/SpecificationType.cs @@ -27,7 +27,7 @@ namespace ReqIFSharp /// Inherits a set of attribute definitions from SpecType. By using SpecificationType elements, multiple specifications can be /// associated with the same set of attribute definitions (attribute names, default values, data types, etc.). /// - [ReqIfClass(name: "SPECIFICATION-TYPE")] + [ReqIfClass(name: "SPECIFICATION-TYPE", isAbstract: false)] public class SpecificationType : SpecType { ///