diff --git a/HtmlDocs/Dockerfile b/HtmlDocs/Dockerfile index 5968f818..752ff257 100644 --- a/HtmlDocs/Dockerfile +++ b/HtmlDocs/Dockerfile @@ -4,6 +4,6 @@ WORKDIR /usr/share/nginx/html COPY HtmlDocs/nginx.conf /etc/nginx/nginx.conf -COPY ../SysML2.NET.CodeGenerator.Tests/bin/Debug/net7.0/_SysML2.NET.Core.AutoGenHtmlDocs/index.html . -COPY ../SysML2.NET.CodeGenerator.Tests/bin/Debug/net7.0/_SysML2.NET.Core.AutoGenHtmlDocs/sysml2-class-inheritance.svg . +COPY ../SysML2.NET.CodeGenerator.Tests/bin/Debug/net8.0/_SysML2.NET.Core.AutoGenHtmlDocs/index.html . +COPY ../SysML2.NET.CodeGenerator.Tests/bin/Debug/net8.0/_SysML2.NET.Core.AutoGenHtmlDocs/sysml2-class-inheritance.svg . COPY ../SysML2.NET.CodeGenerator/Resources/HtmlDocs . \ No newline at end of file diff --git a/SySML2.NET.REST/SySML2.NET.REST.csproj b/SySML2.NET.REST/SySML2.NET.REST.csproj index fbc629f9..4553441f 100644 --- a/SySML2.NET.REST/SySML2.NET.REST.csproj +++ b/SySML2.NET.REST/SySML2.NET.REST.csproj @@ -3,8 +3,7 @@ netstandard2.0 11.0 - 8 - 0.11.0 + 0.12.0 A .NET implementation of the OMG SysML v2 REST/HTTP PSM Client SysML2.NET.REST RHEA System S.A. diff --git a/SysML2.NET.API/SysML2.NET.API.csproj b/SysML2.NET.API/SysML2.NET.API.csproj index a30c91ad..2d0b25ee 100644 --- a/SysML2.NET.API/SysML2.NET.API.csproj +++ b/SysML2.NET.API/SysML2.NET.API.csproj @@ -3,7 +3,7 @@ net8.0 11.0 - 0.11.0 + 0.12.0 A .NET implementation of the REST/HTTP Platform-specific model (PSM) of the SysML v2 API and Services. RHEA System S.A. Copyright © RHEA System S.A. diff --git a/SysML2.NET.CodeGenerator.Tests/DataModelLoaderTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/DataModelLoaderTestFixture.cs index af1dfcec..913cb10d 100644 --- a/SysML2.NET.CodeGenerator.Tests/DataModelLoaderTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/DataModelLoaderTestFixture.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/AnnotatingElement.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/AnnotatingElement.cs index 6c66ef03..f18dcdb0 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/AnnotatingElement.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/AnnotatingElement.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,7 +34,9 @@ namespace SysML2.NET.Core.POCO /// An AnnotatingElement is an Element that provides additional description of or metadata on some other /// Element. An AnnotatingElement is either attached to its annotatedElements by Annotation /// Relationships, or it implicitly annotates its owningNamespace.annotatedElement = if - /// annotation->notEmpty() then annotation.annotatedElement else Sequence{owningNamespace} endif + /// annotation->notEmpty() then annotation.annotatedElement else Sequence{owningNamespace} + /// endifownedAnnotatingRelationship = ownedRelationship-> selectByKind(Annotation)-> select(a | + /// a.annotatingElement = self) /// public partial class AnnotatingElement : IAnnotatingElement { @@ -135,6 +137,15 @@ public string QueryName() throw new NotImplementedException("Derived property Name not yet supported"); } + /// + /// Queries the derived property OwnedAnnotatingRelationship + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedAnnotatingRelationship() + { + throw new NotImplementedException("Derived property OwnedAnnotatingRelationship not yet supported"); + } + /// /// Queries the derived property OwnedAnnotation /// diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Annotation.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Annotation.cs index c81de569..002f3eb9 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Annotation.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Annotation.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -188,6 +188,15 @@ public IElement QueryOwningAnnotatedElement() throw new NotImplementedException("Derived property OwningAnnotatedElement not yet supported"); } + /// + /// Queries the derived property OwningAnnotatingElement + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public AnnotatingElement QueryOwningAnnotatingElement() + { + throw new NotImplementedException("Derived property OwningAnnotatingElement not yet supported"); + } + /// /// Queries the derived property OwningMembership /// diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Comment.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Comment.cs index d27593dd..316904b1 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Comment.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Comment.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -146,6 +146,15 @@ public string QueryName() throw new NotImplementedException("Derived property Name not yet supported"); } + /// + /// Queries the derived property OwnedAnnotatingRelationship + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedAnnotatingRelationship() + { + throw new NotImplementedException("Derived property OwnedAnnotatingRelationship not yet supported"); + } + /// /// Queries the derived property OwnedAnnotation /// diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Connector.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Connector.cs index 18e96b12..5a7c0e2b 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Connector.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Connector.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -36,17 +36,17 @@ namespace SysML2.NET.Core.POCO /// of things might be linked. The Connector further restricts these links to be between values of /// Features on instances of its domain.relatedFeature = connectorEnd.ownedReferenceSubsetting-> /// select(s | s <> null).subsettedFeaturerelatedFeature->forAll(f | if featuringType->isEmpty() - /// then f.isFeaturedWithin(null) else featuringType->exists(t | f.isFeaturedWithin(t)) + /// then f.isFeaturedWithin(null) else featuringType->forAll(t | f.isFeaturedWithin(t)) /// endif)sourceFeature = if relatedFeature->isEmpty() then null else relatedFeature->first() /// endiftargetFeature = if relatedFeature->size() < 2 then OrderedSet{} else /// relatedFeature-> subSequence(2, relatedFeature->size())-> asOrderedSet() /// endifnot isAbstract implies relatedFeature->size() >= - /// 2specializesFromLibrary("Links::links")association->exists(oclIsKindOf(AssociationStructure)) - /// implies specializesFromLibrary("Objects::linkObjects")connectorEnds->size() = 2 + /// 2specializesFromLibrary('Links::links')association->exists(oclIsKindOf(AssociationStructure)) + /// implies specializesFromLibrary('Objects::linkObjects')connectorEnds->size() = 2 /// andassociation->exists(oclIsKindOf(AssocationStructure)) implies - /// specializesFromLibrary("Objects::binaryLinkObjects")connectorEnd->size() = 2 implies - /// specializesFromLibrary("Links::binaryLinks")connectorEnds->size() > 2 implies not - /// specializesFromLibrary("Links::BinaryLink") + /// specializesFromLibrary('Objects::binaryLinkObjects')connectorEnd->size() = 2 implies + /// specializesFromLibrary('Links::binaryLinks')connectorEnds->size() > 2 implies not + /// specializesFromLibrary('Links::BinaryLink') /// public partial class Connector : IConnector { @@ -59,7 +59,6 @@ public Connector() this.IsAbstract = false; this.IsComposite = false; this.IsDerived = false; - this.IsDirected = false; this.IsEnd = false; this.IsImplied = false; this.IsImpliedIncluded = false; @@ -283,18 +282,11 @@ public bool QueryIsConjugated() } /// - /// Whether the values of this Feature can always be computed from the values of other Feature. + /// Whether the values of this Feature can always be computed from the values of other Features. /// [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] public bool IsDerived { get; set; } - /// - /// For a binary Connector, whether or not the Connector should be considered to have a direction from - /// sourceFeature to targetFeature. - /// - [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] - public bool IsDirected { get; set; } - /// /// Whether or not the this Feature is an end Feature, requiring a different interpretation of the /// multiplicity of the Feature.An end Feature is always considered to map each domain instance to a diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Definition.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Definition.cs new file mode 100644 index 00000000..97060076 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Definition.cs @@ -0,0 +1,812 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2024 RHEA System 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Core.POCO +{ + using System; + using System.Collections.Generic; + + using SysML2.NET.Core; + using SysML2.NET.Decorators; + + /// + /// A Definition is a Classifier of Usages. The actual kinds of Definition that may appear in a model + /// are given by the subclasses of Definition (possibly as extended with user-defined + /// SemanticMetadata).Normally, a Definition has owned Usages that model features of the thing being + /// defined. A Definition may also have other Definitions nested in it, but this has no semantic + /// significance, other than the nested scoping resulting from the Definition being considered as a + /// Namespace for any nested Definitions.However, if a Definition has isVariation = true, then it + /// represents a variation point Definition. In this case, all of its members must be variant Usages, + /// related to the Definition by VariantMembership Relationships. Rather than being features of the + /// Definition, variant Usages model different concrete alternatives that can be chosen to fill in for + /// an abstract Usage of the variation point Definition.isVariation implies + /// ownedFeatureMembership->isEmpty()variant = variantMembership.ownedVariantUsagevariantMembership = + /// ownedMembership->selectByKind(VariantMembership)isVariation implies not + /// ownedSpecialization.specific->exists( oclIsKindOf(Definition) and + /// oclAsType(Definition).isVariation)usage = feature->selectByKind(Usage)directedUsage = + /// directedFeature->selectByKind(Usage)ownedUsage = ownedFeature->selectByKind(Usage)ownedAttribute = + /// ownedUsage->selectByKind(AttributeUsage)ownedReference = + /// ownedUsage->selectByKind(ReferenceUsage)ownedEnumeration = + /// ownedUsage->selectByKind(EnumerationUsage)ownedOccurrence = + /// ownedUsage->selectByKind(OccurrenceUsage)ownedItem = ownedUsage->selectByKind(ItemUsage)ownedPart = + /// ownedUsage->selectByKind(PartUsage)ownedPort = ownedUsage->selectByKind(PortUsage)ownedConnection = + /// ownedUsage->selectByKind(ConnectorAsUsage)ownedFlow = + /// ownedUsage->selectByKind(FlowConnectionUsage)ownedInterface = + /// ownedUsage->selectByKind(ReferenceUsage)ownedAllocation = + /// ownedUsage->selectByKind(AllocationUsage)ownedAction = + /// ownedUsage->selectByKind(ActionUsage)ownedState = + /// ownedUsage->selectByKind(StateUsage)ownedTransition = + /// ownedUsage->selectByKind(TransitionUsage)ownedCalculation = + /// ownedUsage->selectByKind(CalculationUsage)ownedConstraint = + /// ownedUsage->selectByKind(ConstraintUsage)ownedRequirement = + /// ownedUsage->selectByKind(RequirementUsage)ownedConcern = + /// ownedUsage->selectByKind(ConcernUsage)ownedCase = + /// ownedUsage->selectByKind(CaseUsage)ownedAnalysisCase = + /// ownedUsage->selectByKind(AnalysisCaseUsage)ownedVerificationCase = + /// ownedUsage->selectByKind(VerificationCaseUsage)ownedUseCase = + /// ownedUsage->selectByKind(UseCaseUsage)ownedView = ownedUsage->selectByKind(ViewUsage)ownedViewpoint + /// = ownedUsage->selectByKind(ViewpointUsage)ownedRendering = + /// ownedUsage->selectByKind(RenderingUsage)ownedMetadata = + /// ownedUsage->selectByKind(MetadataUsage)isVariation implies isAbstract + /// + public partial class Definition : IDefinition + { + /// + /// Initializes a new instance of the class. + /// + public Definition() + { + this.AliasIds = new List(); + this.IsAbstract = false; + this.IsImpliedIncluded = false; + this.IsSufficient = false; + this.OwnedRelationship = new List(); + } + + /// + /// Gets or sets the unique identifier + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: true, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public Guid Id { get; set; } + + /// + /// Various alternative identifiers for this Element. Generally, these will be set by tools. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List AliasIds { get; set; } + + /// + /// The declared name of this Element. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public string DeclaredName { get; set; } + + /// + /// An optional alternative name for the Element that is intended to be shorter or in some way more + /// succinct than its primary name. It may act as a modeler-specified identifier for the Element, though + /// it is then the responsibility of the modeler to maintain the uniqueness of this identifier within a + /// model or relative to some other context. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public string DeclaredShortName { get; set; } + + /// + /// Queries the derived property DifferencingType + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryDifferencingType() + { + throw new NotImplementedException("Derived property DifferencingType not yet supported"); + } + + /// + /// Queries the derived property DirectedFeature + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryDirectedFeature() + { + throw new NotImplementedException("Derived property DirectedFeature not yet supported"); + } + + /// + /// Queries the derived property DirectedUsage + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryDirectedUsage() + { + throw new NotImplementedException("Derived property DirectedUsage not yet supported"); + } + + /// + /// Queries the derived property Documentation + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryDocumentation() + { + throw new NotImplementedException("Derived property Documentation not yet supported"); + } + + /// + /// The globally unique identifier for this Element. This is intended to be set by tooling, and it must + /// not change during the lifetime of the Element. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public string ElementId { get; set; } + + /// + /// Queries the derived property EndFeature + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryEndFeature() + { + throw new NotImplementedException("Derived property EndFeature not yet supported"); + } + + /// + /// Queries the derived property Feature + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryFeature() + { + throw new NotImplementedException("Derived property Feature not yet supported"); + } + + /// + /// Queries the derived property FeatureMembership + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryFeatureMembership() + { + throw new NotImplementedException("Derived property FeatureMembership not yet supported"); + } + + /// + /// Queries the derived property ImportedMembership + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryImportedMembership() + { + throw new NotImplementedException("Derived property ImportedMembership not yet supported"); + } + + /// + /// Queries the derived property InheritedFeature + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryInheritedFeature() + { + throw new NotImplementedException("Derived property InheritedFeature not yet supported"); + } + + /// + /// Queries the derived property InheritedMembership + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryInheritedMembership() + { + throw new NotImplementedException("Derived property InheritedMembership not yet supported"); + } + + /// + /// Queries the derived property Input + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryInput() + { + throw new NotImplementedException("Derived property Input not yet supported"); + } + + /// + /// Queries the derived property IntersectingType + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryIntersectingType() + { + throw new NotImplementedException("Derived property IntersectingType not yet supported"); + } + + /// + /// Indicates whether instances of this Type must also be instances of at least one of its specialized + /// Types. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public bool IsAbstract { get; set; } + + /// + /// Queries the derived property IsConjugated + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public bool QueryIsConjugated() + { + throw new NotImplementedException("Derived property IsConjugated not yet supported"); + } + + /// + /// Whether all necessary implied Relationships have been included in the ownedRelationships of this + /// Element. This property may be true, even if there are not actually any ownedRelationships with + /// isImplied = true, meaning that no such Relationships are actually implied for this Element. However, + /// if it is false, then ownedRelationships may not contain any implied Relationships. That is, either + /// all required implied Relationships must be included, or none of them. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public bool IsImpliedIncluded { get; set; } + + /// + /// Queries the derived property IsLibraryElement + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public bool QueryIsLibraryElement() + { + throw new NotImplementedException("Derived property IsLibraryElement not yet supported"); + } + + /// + /// Whether all things that meet the classification conditions of this Type must be classified by the + /// Type.(A Type gives conditions that must be met by whatever it classifies, but when isSufficient + /// is false, things may meet those conditions but still not be classified by the Type. For example, a + /// Type Car that is not sufficient could require everything it classifies to have four wheels, but not + /// all four wheeled things would classify as cars. However, if the Type Car were sufficient, it would + /// classify all four-wheeled things.) + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public bool IsSufficient { get; set; } + + /// + /// Whether this Definition is for a variation point or not. If true, then all the memberships of the + /// Definition must be VariantMemberships. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public bool IsVariation { get; set; } + + /// + /// Queries the derived property Member + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryMember() + { + throw new NotImplementedException("Derived property Member not yet supported"); + } + + /// + /// Queries the derived property Membership + /// + [EFeature(isChangeable: false, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryMembership() + { + throw new NotImplementedException("Derived property Membership not yet supported"); + } + + /// + /// Queries the derived property Multiplicity + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public Multiplicity QueryMultiplicity() + { + throw new NotImplementedException("Derived property Multiplicity not yet supported"); + } + + /// + /// Queries the derived property Name + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public string QueryName() + { + throw new NotImplementedException("Derived property Name not yet supported"); + } + + /// + /// Queries the derived property Output + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOutput() + { + throw new NotImplementedException("Derived property Output not yet supported"); + } + + /// + /// Queries the derived property OwnedAction + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedAction() + { + throw new NotImplementedException("Derived property OwnedAction not yet supported"); + } + + /// + /// Queries the derived property OwnedAllocation + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedAllocation() + { + throw new NotImplementedException("Derived property OwnedAllocation not yet supported"); + } + + /// + /// Queries the derived property OwnedAnalysisCase + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedAnalysisCase() + { + throw new NotImplementedException("Derived property OwnedAnalysisCase not yet supported"); + } + + /// + /// Queries the derived property OwnedAnnotation + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedAnnotation() + { + throw new NotImplementedException("Derived property OwnedAnnotation not yet supported"); + } + + /// + /// Queries the derived property OwnedAttribute + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedAttribute() + { + throw new NotImplementedException("Derived property OwnedAttribute not yet supported"); + } + + /// + /// Queries the derived property OwnedCalculation + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedCalculation() + { + throw new NotImplementedException("Derived property OwnedCalculation not yet supported"); + } + + /// + /// Queries the derived property OwnedCase + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedCase() + { + throw new NotImplementedException("Derived property OwnedCase not yet supported"); + } + + /// + /// Queries the derived property OwnedConcern + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedConcern() + { + throw new NotImplementedException("Derived property OwnedConcern not yet supported"); + } + + /// + /// Queries the derived property OwnedConjugator + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public Conjugation QueryOwnedConjugator() + { + throw new NotImplementedException("Derived property OwnedConjugator not yet supported"); + } + + /// + /// Queries the derived property OwnedConnection + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedConnection() + { + throw new NotImplementedException("Derived property OwnedConnection not yet supported"); + } + + /// + /// Queries the derived property OwnedConstraint + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedConstraint() + { + throw new NotImplementedException("Derived property OwnedConstraint not yet supported"); + } + + /// + /// Queries the derived property OwnedDifferencing + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedDifferencing() + { + throw new NotImplementedException("Derived property OwnedDifferencing not yet supported"); + } + + /// + /// Queries the derived property OwnedDisjoining + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedDisjoining() + { + throw new NotImplementedException("Derived property OwnedDisjoining not yet supported"); + } + + /// + /// Queries the derived property OwnedElement + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedElement() + { + throw new NotImplementedException("Derived property OwnedElement not yet supported"); + } + + /// + /// Queries the derived property OwnedEndFeature + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedEndFeature() + { + throw new NotImplementedException("Derived property OwnedEndFeature not yet supported"); + } + + /// + /// Queries the derived property OwnedEnumeration + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedEnumeration() + { + throw new NotImplementedException("Derived property OwnedEnumeration not yet supported"); + } + + /// + /// Queries the derived property OwnedFeature + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedFeature() + { + throw new NotImplementedException("Derived property OwnedFeature not yet supported"); + } + + /// + /// Queries the derived property OwnedFeatureMembership + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedFeatureMembership() + { + throw new NotImplementedException("Derived property OwnedFeatureMembership not yet supported"); + } + + /// + /// Queries the derived property OwnedFlow + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedFlow() + { + throw new NotImplementedException("Derived property OwnedFlow not yet supported"); + } + + /// + /// Queries the derived property OwnedImport + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedImport() + { + throw new NotImplementedException("Derived property OwnedImport not yet supported"); + } + + /// + /// Queries the derived property OwnedInterface + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedInterface() + { + throw new NotImplementedException("Derived property OwnedInterface not yet supported"); + } + + /// + /// Queries the derived property OwnedIntersecting + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedIntersecting() + { + throw new NotImplementedException("Derived property OwnedIntersecting not yet supported"); + } + + /// + /// Queries the derived property OwnedItem + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedItem() + { + throw new NotImplementedException("Derived property OwnedItem not yet supported"); + } + + /// + /// Queries the derived property OwnedMember + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedMember() + { + throw new NotImplementedException("Derived property OwnedMember not yet supported"); + } + + /// + /// Queries the derived property OwnedMembership + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedMembership() + { + throw new NotImplementedException("Derived property OwnedMembership not yet supported"); + } + + /// + /// Queries the derived property OwnedMetadata + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedMetadata() + { + throw new NotImplementedException("Derived property OwnedMetadata not yet supported"); + } + + /// + /// Queries the derived property OwnedOccurrence + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedOccurrence() + { + throw new NotImplementedException("Derived property OwnedOccurrence not yet supported"); + } + + /// + /// Queries the derived property OwnedPart + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedPart() + { + throw new NotImplementedException("Derived property OwnedPart not yet supported"); + } + + /// + /// Queries the derived property OwnedPort + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedPort() + { + throw new NotImplementedException("Derived property OwnedPort not yet supported"); + } + + /// + /// Queries the derived property OwnedReference + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedReference() + { + throw new NotImplementedException("Derived property OwnedReference not yet supported"); + } + + /// + /// The Relationships for which this Element is the owningRelatedElement. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: true)] + public List OwnedRelationship { get; set; } + + /// + /// Queries the derived property OwnedRendering + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedRendering() + { + throw new NotImplementedException("Derived property OwnedRendering not yet supported"); + } + + /// + /// Queries the derived property OwnedRequirement + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedRequirement() + { + throw new NotImplementedException("Derived property OwnedRequirement not yet supported"); + } + + /// + /// Queries the derived property OwnedSpecialization + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedSpecialization() + { + throw new NotImplementedException("Derived property OwnedSpecialization not yet supported"); + } + + /// + /// Queries the derived property OwnedState + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedState() + { + throw new NotImplementedException("Derived property OwnedState not yet supported"); + } + + /// + /// Queries the derived property OwnedSubclassification + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedSubclassification() + { + throw new NotImplementedException("Derived property OwnedSubclassification not yet supported"); + } + + /// + /// Queries the derived property OwnedTransition + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedTransition() + { + throw new NotImplementedException("Derived property OwnedTransition not yet supported"); + } + + /// + /// Queries the derived property OwnedUnioning + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedUnioning() + { + throw new NotImplementedException("Derived property OwnedUnioning not yet supported"); + } + + /// + /// Queries the derived property OwnedUsage + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedUsage() + { + throw new NotImplementedException("Derived property OwnedUsage not yet supported"); + } + + /// + /// Queries the derived property OwnedUseCase + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedUseCase() + { + throw new NotImplementedException("Derived property OwnedUseCase not yet supported"); + } + + /// + /// Queries the derived property OwnedVerificationCase + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedVerificationCase() + { + throw new NotImplementedException("Derived property OwnedVerificationCase not yet supported"); + } + + /// + /// Queries the derived property OwnedView + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedView() + { + throw new NotImplementedException("Derived property OwnedView not yet supported"); + } + + /// + /// Queries the derived property OwnedViewpoint + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryOwnedViewpoint() + { + throw new NotImplementedException("Derived property OwnedViewpoint not yet supported"); + } + + /// + /// Queries the derived property Owner + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public IElement QueryOwner() + { + throw new NotImplementedException("Derived property Owner not yet supported"); + } + + /// + /// Queries the derived property OwningMembership + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public OwningMembership QueryOwningMembership() + { + throw new NotImplementedException("Derived property OwningMembership not yet supported"); + } + + /// + /// Queries the derived property OwningNamespace + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public Namespace QueryOwningNamespace() + { + throw new NotImplementedException("Derived property OwningNamespace not yet supported"); + } + + /// + /// The Relationship for which this Element is an ownedRelatedElement, if any. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public IRelationship OwningRelationship { get; set; } + + /// + /// Queries the derived property QualifiedName + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public string QueryQualifiedName() + { + throw new NotImplementedException("Derived property QualifiedName not yet supported"); + } + + /// + /// Queries the derived property ShortName + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public string QueryShortName() + { + throw new NotImplementedException("Derived property ShortName not yet supported"); + } + + /// + /// Queries the derived property TextualRepresentation + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryTextualRepresentation() + { + throw new NotImplementedException("Derived property TextualRepresentation not yet supported"); + } + + /// + /// Queries the derived property UnioningType + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryUnioningType() + { + throw new NotImplementedException("Derived property UnioningType not yet supported"); + } + + /// + /// Queries the derived property Usage + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryUsage() + { + throw new NotImplementedException("Derived property Usage not yet supported"); + } + + /// + /// Queries the derived property Variant + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryVariant() + { + throw new NotImplementedException("Derived property Variant not yet supported"); + } + + /// + /// Queries the derived property VariantMembership + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List QueryVariantMembership() + { + throw new NotImplementedException("Derived property VariantMembership not yet supported"); + } + + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Dependency.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Dependency.cs index 3421c219..068ff5ca 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Dependency.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Dependency.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Feature.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Feature.cs index 5f4175db..58b7a0e7 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Feature.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/Feature.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -49,51 +49,46 @@ namespace SysML2.NET.Core.POCO /// ownedSubsetting->selectByKind(Redefinition)ownedTypeFeaturing = /// ownedRelationship->selectByKind(TypeFeaturing)-> select(tf | tf.featureOfType = /// self)ownedSubsetting = ownedSpecialization->selectByKind(Subsetting)ownedTyping = - /// ownedGeneralization->selectByKind(FeatureTyping)type = let types : OrderedSet(Type) = - /// typing.type-> union(subsetting.subsettedFeature.type)-> asOrderedSet() in if - /// chainingFeature->isEmpty() then types else types->union(chainingFeature->last().type)-> - /// asOrderedSet() endifmultiplicity <> null implies multiplicity.featuringType = featuringType - /// specializesFromLibrary("Base::things")chainingFeatures->excludes(self)ownedFeatureChaining = + /// ownedGeneralization->selectByKind(FeatureTyping)type = let types : OrderedSet(Types) = + /// OrderedSet{self}-> -- Note: The closure operation automatically handles circular + /// relationships. closure(typingFeatures()).typing.type->asOrderedSet() in types->reject(t1 | + /// types->exist(t2 | t2 <> t1 and t2.specializes(t1)))multiplicity <> null implies + /// multiplicity.featuringType = featuringType + /// specializesFromLibrary('Base::things')chainingFeature->excludes(self)ownedFeatureChaining = /// ownedRelationship->selectByKind(FeatureChaining)chainingFeature = - /// ownedFeatureChaining.chainingFeaturechainingFeatures->size() <> 1isEnd and owningType <> null - /// implies let i : Integer = owningType.ownedFeature->select(isEnd) in - /// owningType.ownedSpecialization.general-> forAll(supertype | let ownedEndFeatures : - /// Sequence(Feature) = supertype.ownedFeature->select(isEnd) in - /// ownedEndFeatures->size() >= i implies - /// redefines(ownedEndFeatures->at(i))ownedMembership-> selectByKind(FeatureValue)-> forAll(fv | - /// specializes(fv.value.result))isEnd and owningType <> null andowningType.oclIsKindOf(Association) - /// implies specializesFromLibrary("Links::Link::participants")isComposite + /// ownedFeatureChaining.chainingFeaturechainingFeature->size() <> 1isEnd and owningType <> null implies + /// let i : Integer = owningType.ownedEndFeature->indexOf(self) in + /// owningType.ownedSpecialization.general-> forAll(supertype | + /// supertype.endFeature->size() >= i implies + /// redefines(supertype.endFeature->at(i))direction = null andownedSpecializations->forAll(isImplied) + /// implies ownedMembership-> selectByKind(FeatureValue)-> forAll(fv | + /// specializes(fv.value.result))isEnd and owningType <> null and(owningType.oclIsKindOf(Association) or + /// owningType.oclIsKindOf(Connector)) implies + /// specializesFromLibrary('Links::Link::participant')isComposite /// andownedTyping.type->includes(oclIsKindOf(Structure)) andowningType <> null /// and(owningType.oclIsKindOf(Structure) or owningType.type->includes(oclIsKindOf(Structure))) implies - /// specializesFromLibrary("Occurrence::Occurrence::suboccurrences")owningType <> null - /// and(owningType.oclIsKindOf(LiteralExpression) or owningType.oclIsKindOf(FeatureReferenceExpression)) - /// implies if owningType.oclIsKindOf(LiteralString) then - /// specializesFromLibrary("ScalarValues::String") else if owningType.oclIsKindOf(LiteralBoolean) - /// then specializesFromLibrary("ScalarValues::Boolean") else if - /// owningType.oclIsKindOf(LiteralInteger) then specializesFromLibrary("ScalarValues::Rational") - /// else if owningType.oclIsKindOf(LiteralBoolean) then - /// specializesFromLibrary("ScalarValues::Rational") else if owningType.oclIsKindOf(LiteralBoolean) - /// then specializesFromLibrary("ScalarValues::Real") else specializes( - /// owningType.oclAsType(FeatureReferenceExpression).referent) endif endif endif endif - /// endifownedTyping.type->exists(selectByKind(Class)) implies - /// specializesFromLibrary("Occurrences::occurrences")isComposite + /// specializesFromLibrary('Occurrence::Occurrence::suboccurrences')owningType <> null + /// andowningType.oclIsKindOf(FeatureReferenceExpression) andself = + /// owningType.oclAsType(FeatureReferenceExpression).result implies + /// specializes(owningType.oclAsType(FeatureReferenceExpression).referent)ownedTyping.type->exists(selectByKind(Class)) + /// implies specializesFromLibrary('Occurrences::occurrences')isComposite /// andownedTyping.type->includes(oclIsKindOf(Class)) andowningType <> null /// and(owningType.oclIsKindOf(Class) or owningType.oclIsKindOf(Feature) and /// owningType.oclAsType(Feature).type-> exists(oclIsKindOf(Class))) implies - /// specializesFromLibrary("Occurrence::Occurrence::suboccurrences")ownedTyping.type->exists(selectByKind(DataType)) - /// implies specializesFromLibary("Base::dataValues")owningType <> null + /// specializesFromLibrary('Occurrence::Occurrence::suboccurrences')ownedTyping.type->exists(selectByKind(DataType)) + /// implies specializesFromLibrary('Base::dataValues')owningType <> null /// andowningType.oclIsKindOf(ItemFlowEnd) andowningType.ownedFeature->at(1) = self implies let /// flowType : Type = owningType.owningType in flowType <> null implies let i : Integer = /// flowType.ownedFeature.indexOf(owningType) in (i = 1 implies - /// redefinesFromLibrary("Transfers::Transfer::source::sourceOutput")) and (i = 2 implies - /// redefinesFromLibrary("Transfers::Transfer::source::targetInput")) owningType <> + /// redefinesFromLibrary('Transfers::Transfer::source::sourceOutput')) and (i = 2 implies + /// redefinesFromLibrary('Transfers::Transfer::source::targetInput')) owningType <> /// null and(owningType.oclIsKindOf(Behavior) or owningType.oclIsKindOf(Step)) implies let i : /// Integer = owningType.ownedFeature->select(direction <> null) in /// owningType.ownedSpecialization.general-> forAll(supertype | let ownedParameters : /// Sequence(Feature) = supertype.ownedFeature->select(direction <> null) in /// ownedParameters->size() >= i implies /// redefines(ownedParameters->at(i))ownedTyping.type->exists(selectByKind(Structure)) implies - /// specializesFromLibary("Objects::objects")owningType <> null and(owningType.oclIsKindOf(Function) and + /// specializesFromLibary('Objects::objects')owningType <> null and(owningType.oclIsKindOf(Function) and /// self = owningType.oclAsType(Function).result or owningType.oclIsKindOf(Expression) and self = /// owningType.oclAsType(Expression).result) implies owningType.ownedSpecialization.general-> /// select(oclIsKindOf(Function) or oclIsKindOf(Expression))-> forAll(supertype | @@ -102,12 +97,18 @@ namespace SysML2.NET.Core.POCO /// superType.oclAsType(Expression).result endif)ownedFeatureInverting = /// ownedRelationship->selectByKind(FeatureInverting)-> select(fi | fi.featureInverted = /// self)featuringType = let featuringTypes : OrderedSet(Type) = - /// typeFeaturing.featuringType->asOrderedSet() in if chainingFeature->isEmpty() then featuringTypes - /// else featuringTypes-> union(chainingFeature->first().featuringType)-> + /// featuring.type->asOrderedSet() in if chainingFeature->isEmpty() then featuringTypes else + /// featuringTypes-> union(chainingFeature->first().featuringType)-> /// asOrderedSet() endifownedReferenceSubsetting = let referenceSubsettings : /// OrderedSet(ReferenceSubsetting) = ownedSubsetting->selectByKind(ReferenceSubsetting) in if /// referenceSubsettings->isEmpty() then null else referenceSubsettings->first() - /// endifownedSubsetting->selectByKind(ReferenceSubsetting)->size() <= 1 + /// endifownedSubsetting->selectByKind(ReferenceSubsetting)->size() <= + /// 1Sequence{1..chainingFeature->size() - 1}->forAll(i | chainingFeature->at(i + + /// 1).featuringType->forAll(t | chainingFeature->at(i).specializes(t)))isPortion + /// andownedTyping.type->includes(oclIsKindOf(Class)) andowningType <> null + /// and(owningType.oclIsKindOf(Class) or owningType.oclIsKindOf(Feature) and + /// owningType.oclAsType(Feature).type-> exists(oclIsKindOf(Class))) implies + /// specializesFromLibrary('Occurrence::Occurrence::portions') /// public partial class Feature : IFeature { @@ -321,7 +322,7 @@ public bool QueryIsConjugated() } /// - /// Whether the values of this Feature can always be computed from the values of other Feature. + /// Whether the values of this Feature can always be computed from the values of other Features. /// [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] public bool IsDerived { get; set; } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IAnnotatingElement.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IAnnotatingElement.cs index 78cf8807..f98e2322 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IAnnotatingElement.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IAnnotatingElement.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,7 +34,9 @@ namespace SysML2.NET.Core.POCO /// An AnnotatingElement is an Element that provides additional description of or metadata on some other /// Element. An AnnotatingElement is either attached to its annotatedElements by Annotation /// Relationships, or it implicitly annotates its owningNamespace.annotatedElement = if - /// annotation->notEmpty() then annotation.annotatedElement else Sequence{owningNamespace} endif + /// annotation->notEmpty() then annotation.annotatedElement else Sequence{owningNamespace} + /// endifownedAnnotatingRelationship = ownedRelationship-> selectByKind(Annotation)-> select(a | + /// a.annotatingElement = self) /// public partial interface IAnnotatingElement : IElement { @@ -50,6 +52,12 @@ public partial interface IAnnotatingElement : IElement [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] List Annotation { get; set; } + /// + /// Queries the derived property OwnedAnnotatingRelationship + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedAnnotatingRelationship(); + } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IAnnotation.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IAnnotation.cs index 0258ddb0..e6671744 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IAnnotation.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IAnnotation.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -54,6 +54,12 @@ public partial interface IAnnotation : IRelationship [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] IElement QueryOwningAnnotatedElement(); + /// + /// Queries the derived property OwningAnnotatingElement + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + AnnotatingElement QueryOwningAnnotatingElement(); + } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IComment.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IComment.cs index 6d7c381d..23bf05bf 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IComment.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IComment.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IConnector.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IConnector.cs index d5e48012..69faaf1b 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IConnector.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IConnector.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -36,17 +36,17 @@ namespace SysML2.NET.Core.POCO /// of things might be linked. The Connector further restricts these links to be between values of /// Features on instances of its domain.relatedFeature = connectorEnd.ownedReferenceSubsetting-> /// select(s | s <> null).subsettedFeaturerelatedFeature->forAll(f | if featuringType->isEmpty() - /// then f.isFeaturedWithin(null) else featuringType->exists(t | f.isFeaturedWithin(t)) + /// then f.isFeaturedWithin(null) else featuringType->forAll(t | f.isFeaturedWithin(t)) /// endif)sourceFeature = if relatedFeature->isEmpty() then null else relatedFeature->first() /// endiftargetFeature = if relatedFeature->size() < 2 then OrderedSet{} else /// relatedFeature-> subSequence(2, relatedFeature->size())-> asOrderedSet() /// endifnot isAbstract implies relatedFeature->size() >= - /// 2specializesFromLibrary("Links::links")association->exists(oclIsKindOf(AssociationStructure)) - /// implies specializesFromLibrary("Objects::linkObjects")connectorEnds->size() = 2 + /// 2specializesFromLibrary('Links::links')association->exists(oclIsKindOf(AssociationStructure)) + /// implies specializesFromLibrary('Objects::linkObjects')connectorEnds->size() = 2 /// andassociation->exists(oclIsKindOf(AssocationStructure)) implies - /// specializesFromLibrary("Objects::binaryLinkObjects")connectorEnd->size() = 2 implies - /// specializesFromLibrary("Links::binaryLinks")connectorEnds->size() > 2 implies not - /// specializesFromLibrary("Links::BinaryLink") + /// specializesFromLibrary('Objects::binaryLinkObjects')connectorEnd->size() = 2 implies + /// specializesFromLibrary('Links::binaryLinks')connectorEnds->size() > 2 implies not + /// specializesFromLibrary('Links::BinaryLink') /// public partial interface IConnector : IFeature, IRelationship { @@ -62,13 +62,6 @@ public partial interface IConnector : IFeature, IRelationship [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] List QueryConnectorEnd(); - /// - /// For a binary Connector, whether or not the Connector should be considered to have a direction from - /// sourceFeature to targetFeature. - /// - [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] - bool IsDirected { get; set; } - /// /// Queries the derived property RelatedFeature /// diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IDefinition.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IDefinition.cs new file mode 100644 index 00000000..571b1b05 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IDefinition.cs @@ -0,0 +1,273 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2024 RHEA System 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Core.POCO +{ + using System; + using System.Collections.Generic; + + using SysML2.NET.Core; + using SysML2.NET.Decorators; + + /// + /// A Definition is a Classifier of Usages. The actual kinds of Definition that may appear in a model + /// are given by the subclasses of Definition (possibly as extended with user-defined + /// SemanticMetadata).Normally, a Definition has owned Usages that model features of the thing being + /// defined. A Definition may also have other Definitions nested in it, but this has no semantic + /// significance, other than the nested scoping resulting from the Definition being considered as a + /// Namespace for any nested Definitions.However, if a Definition has isVariation = true, then it + /// represents a variation point Definition. In this case, all of its members must be variant Usages, + /// related to the Definition by VariantMembership Relationships. Rather than being features of the + /// Definition, variant Usages model different concrete alternatives that can be chosen to fill in for + /// an abstract Usage of the variation point Definition.isVariation implies + /// ownedFeatureMembership->isEmpty()variant = variantMembership.ownedVariantUsagevariantMembership = + /// ownedMembership->selectByKind(VariantMembership)isVariation implies not + /// ownedSpecialization.specific->exists( oclIsKindOf(Definition) and + /// oclAsType(Definition).isVariation)usage = feature->selectByKind(Usage)directedUsage = + /// directedFeature->selectByKind(Usage)ownedUsage = ownedFeature->selectByKind(Usage)ownedAttribute = + /// ownedUsage->selectByKind(AttributeUsage)ownedReference = + /// ownedUsage->selectByKind(ReferenceUsage)ownedEnumeration = + /// ownedUsage->selectByKind(EnumerationUsage)ownedOccurrence = + /// ownedUsage->selectByKind(OccurrenceUsage)ownedItem = ownedUsage->selectByKind(ItemUsage)ownedPart = + /// ownedUsage->selectByKind(PartUsage)ownedPort = ownedUsage->selectByKind(PortUsage)ownedConnection = + /// ownedUsage->selectByKind(ConnectorAsUsage)ownedFlow = + /// ownedUsage->selectByKind(FlowConnectionUsage)ownedInterface = + /// ownedUsage->selectByKind(ReferenceUsage)ownedAllocation = + /// ownedUsage->selectByKind(AllocationUsage)ownedAction = + /// ownedUsage->selectByKind(ActionUsage)ownedState = + /// ownedUsage->selectByKind(StateUsage)ownedTransition = + /// ownedUsage->selectByKind(TransitionUsage)ownedCalculation = + /// ownedUsage->selectByKind(CalculationUsage)ownedConstraint = + /// ownedUsage->selectByKind(ConstraintUsage)ownedRequirement = + /// ownedUsage->selectByKind(RequirementUsage)ownedConcern = + /// ownedUsage->selectByKind(ConcernUsage)ownedCase = + /// ownedUsage->selectByKind(CaseUsage)ownedAnalysisCase = + /// ownedUsage->selectByKind(AnalysisCaseUsage)ownedVerificationCase = + /// ownedUsage->selectByKind(VerificationCaseUsage)ownedUseCase = + /// ownedUsage->selectByKind(UseCaseUsage)ownedView = ownedUsage->selectByKind(ViewUsage)ownedViewpoint + /// = ownedUsage->selectByKind(ViewpointUsage)ownedRendering = + /// ownedUsage->selectByKind(RenderingUsage)ownedMetadata = + /// ownedUsage->selectByKind(MetadataUsage)isVariation implies isAbstract + /// + public partial interface IDefinition : IClassifier + { + /// + /// Queries the derived property DirectedUsage + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryDirectedUsage(); + + /// + /// Whether this Definition is for a variation point or not. If true, then all the memberships of the + /// Definition must be VariantMemberships. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + bool IsVariation { get; set; } + + /// + /// Queries the derived property OwnedAction + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedAction(); + + /// + /// Queries the derived property OwnedAllocation + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedAllocation(); + + /// + /// Queries the derived property OwnedAnalysisCase + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedAnalysisCase(); + + /// + /// Queries the derived property OwnedAttribute + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedAttribute(); + + /// + /// Queries the derived property OwnedCalculation + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedCalculation(); + + /// + /// Queries the derived property OwnedCase + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedCase(); + + /// + /// Queries the derived property OwnedConcern + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedConcern(); + + /// + /// Queries the derived property OwnedConnection + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedConnection(); + + /// + /// Queries the derived property OwnedConstraint + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedConstraint(); + + /// + /// Queries the derived property OwnedEnumeration + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedEnumeration(); + + /// + /// Queries the derived property OwnedFlow + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedFlow(); + + /// + /// Queries the derived property OwnedInterface + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedInterface(); + + /// + /// Queries the derived property OwnedItem + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedItem(); + + /// + /// Queries the derived property OwnedMetadata + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedMetadata(); + + /// + /// Queries the derived property OwnedOccurrence + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedOccurrence(); + + /// + /// Queries the derived property OwnedPart + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedPart(); + + /// + /// Queries the derived property OwnedPort + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedPort(); + + /// + /// Queries the derived property OwnedReference + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedReference(); + + /// + /// Queries the derived property OwnedRendering + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedRendering(); + + /// + /// Queries the derived property OwnedRequirement + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedRequirement(); + + /// + /// Queries the derived property OwnedState + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedState(); + + /// + /// Queries the derived property OwnedTransition + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedTransition(); + + /// + /// Queries the derived property OwnedUsage + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedUsage(); + + /// + /// Queries the derived property OwnedUseCase + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedUseCase(); + + /// + /// Queries the derived property OwnedVerificationCase + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedVerificationCase(); + + /// + /// Queries the derived property OwnedView + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedView(); + + /// + /// Queries the derived property OwnedViewpoint + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryOwnedViewpoint(); + + /// + /// Queries the derived property Usage + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryUsage(); + + /// + /// Queries the derived property Variant + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryVariant(); + + /// + /// Queries the derived property VariantMembership + /// + [EFeature(isChangeable: true, isVolatile: true, isTransient: true, isUnsettable: false, isDerived: true, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + List QueryVariantMembership(); + + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IDependency.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IDependency.cs index a48c1989..e2647ac8 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IDependency.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IDependency.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IElement.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IElement.cs index 135382f1..5c121bd5 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IElement.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IElement.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -42,7 +42,7 @@ namespace SysML2.NET.Core.POCO /// ownedElement->selectByKind(Documentation)ownedAnnotation = ownedRelationship-> /// selectByKind(Annotation)-> select(a | a.annotatedElement = self)name = /// effectiveName()ownedRelationship->exists(isImplied) implies isImpliedIncludedisLibraryElement = - /// libraryNamespace() <>nullshortName = effectiveShortName()owningNamespace = if owningMembership = + /// libraryNamespace() <> nullshortName = effectiveShortName()owningNamespace = if owningMembership = /// null then null else owningMembership.membershipOwningNamespace endiftextualRepresentation = /// ownedElement->selectByKind(TextualRepresentation) /// diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IFeature.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IFeature.cs index 772e318b..3e17183c 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IFeature.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IFeature.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -49,51 +49,46 @@ namespace SysML2.NET.Core.POCO /// ownedSubsetting->selectByKind(Redefinition)ownedTypeFeaturing = /// ownedRelationship->selectByKind(TypeFeaturing)-> select(tf | tf.featureOfType = /// self)ownedSubsetting = ownedSpecialization->selectByKind(Subsetting)ownedTyping = - /// ownedGeneralization->selectByKind(FeatureTyping)type = let types : OrderedSet(Type) = - /// typing.type-> union(subsetting.subsettedFeature.type)-> asOrderedSet() in if - /// chainingFeature->isEmpty() then types else types->union(chainingFeature->last().type)-> - /// asOrderedSet() endifmultiplicity <> null implies multiplicity.featuringType = featuringType - /// specializesFromLibrary("Base::things")chainingFeatures->excludes(self)ownedFeatureChaining = + /// ownedGeneralization->selectByKind(FeatureTyping)type = let types : OrderedSet(Types) = + /// OrderedSet{self}-> -- Note: The closure operation automatically handles circular + /// relationships. closure(typingFeatures()).typing.type->asOrderedSet() in types->reject(t1 | + /// types->exist(t2 | t2 <> t1 and t2.specializes(t1)))multiplicity <> null implies + /// multiplicity.featuringType = featuringType + /// specializesFromLibrary('Base::things')chainingFeature->excludes(self)ownedFeatureChaining = /// ownedRelationship->selectByKind(FeatureChaining)chainingFeature = - /// ownedFeatureChaining.chainingFeaturechainingFeatures->size() <> 1isEnd and owningType <> null - /// implies let i : Integer = owningType.ownedFeature->select(isEnd) in - /// owningType.ownedSpecialization.general-> forAll(supertype | let ownedEndFeatures : - /// Sequence(Feature) = supertype.ownedFeature->select(isEnd) in - /// ownedEndFeatures->size() >= i implies - /// redefines(ownedEndFeatures->at(i))ownedMembership-> selectByKind(FeatureValue)-> forAll(fv | - /// specializes(fv.value.result))isEnd and owningType <> null andowningType.oclIsKindOf(Association) - /// implies specializesFromLibrary("Links::Link::participants")isComposite + /// ownedFeatureChaining.chainingFeaturechainingFeature->size() <> 1isEnd and owningType <> null implies + /// let i : Integer = owningType.ownedEndFeature->indexOf(self) in + /// owningType.ownedSpecialization.general-> forAll(supertype | + /// supertype.endFeature->size() >= i implies + /// redefines(supertype.endFeature->at(i))direction = null andownedSpecializations->forAll(isImplied) + /// implies ownedMembership-> selectByKind(FeatureValue)-> forAll(fv | + /// specializes(fv.value.result))isEnd and owningType <> null and(owningType.oclIsKindOf(Association) or + /// owningType.oclIsKindOf(Connector)) implies + /// specializesFromLibrary('Links::Link::participant')isComposite /// andownedTyping.type->includes(oclIsKindOf(Structure)) andowningType <> null /// and(owningType.oclIsKindOf(Structure) or owningType.type->includes(oclIsKindOf(Structure))) implies - /// specializesFromLibrary("Occurrence::Occurrence::suboccurrences")owningType <> null - /// and(owningType.oclIsKindOf(LiteralExpression) or owningType.oclIsKindOf(FeatureReferenceExpression)) - /// implies if owningType.oclIsKindOf(LiteralString) then - /// specializesFromLibrary("ScalarValues::String") else if owningType.oclIsKindOf(LiteralBoolean) - /// then specializesFromLibrary("ScalarValues::Boolean") else if - /// owningType.oclIsKindOf(LiteralInteger) then specializesFromLibrary("ScalarValues::Rational") - /// else if owningType.oclIsKindOf(LiteralBoolean) then - /// specializesFromLibrary("ScalarValues::Rational") else if owningType.oclIsKindOf(LiteralBoolean) - /// then specializesFromLibrary("ScalarValues::Real") else specializes( - /// owningType.oclAsType(FeatureReferenceExpression).referent) endif endif endif endif - /// endifownedTyping.type->exists(selectByKind(Class)) implies - /// specializesFromLibrary("Occurrences::occurrences")isComposite + /// specializesFromLibrary('Occurrence::Occurrence::suboccurrences')owningType <> null + /// andowningType.oclIsKindOf(FeatureReferenceExpression) andself = + /// owningType.oclAsType(FeatureReferenceExpression).result implies + /// specializes(owningType.oclAsType(FeatureReferenceExpression).referent)ownedTyping.type->exists(selectByKind(Class)) + /// implies specializesFromLibrary('Occurrences::occurrences')isComposite /// andownedTyping.type->includes(oclIsKindOf(Class)) andowningType <> null /// and(owningType.oclIsKindOf(Class) or owningType.oclIsKindOf(Feature) and /// owningType.oclAsType(Feature).type-> exists(oclIsKindOf(Class))) implies - /// specializesFromLibrary("Occurrence::Occurrence::suboccurrences")ownedTyping.type->exists(selectByKind(DataType)) - /// implies specializesFromLibary("Base::dataValues")owningType <> null + /// specializesFromLibrary('Occurrence::Occurrence::suboccurrences')ownedTyping.type->exists(selectByKind(DataType)) + /// implies specializesFromLibrary('Base::dataValues')owningType <> null /// andowningType.oclIsKindOf(ItemFlowEnd) andowningType.ownedFeature->at(1) = self implies let /// flowType : Type = owningType.owningType in flowType <> null implies let i : Integer = /// flowType.ownedFeature.indexOf(owningType) in (i = 1 implies - /// redefinesFromLibrary("Transfers::Transfer::source::sourceOutput")) and (i = 2 implies - /// redefinesFromLibrary("Transfers::Transfer::source::targetInput")) owningType <> + /// redefinesFromLibrary('Transfers::Transfer::source::sourceOutput')) and (i = 2 implies + /// redefinesFromLibrary('Transfers::Transfer::source::targetInput')) owningType <> /// null and(owningType.oclIsKindOf(Behavior) or owningType.oclIsKindOf(Step)) implies let i : /// Integer = owningType.ownedFeature->select(direction <> null) in /// owningType.ownedSpecialization.general-> forAll(supertype | let ownedParameters : /// Sequence(Feature) = supertype.ownedFeature->select(direction <> null) in /// ownedParameters->size() >= i implies /// redefines(ownedParameters->at(i))ownedTyping.type->exists(selectByKind(Structure)) implies - /// specializesFromLibary("Objects::objects")owningType <> null and(owningType.oclIsKindOf(Function) and + /// specializesFromLibary('Objects::objects')owningType <> null and(owningType.oclIsKindOf(Function) and /// self = owningType.oclAsType(Function).result or owningType.oclIsKindOf(Expression) and self = /// owningType.oclAsType(Expression).result) implies owningType.ownedSpecialization.general-> /// select(oclIsKindOf(Function) or oclIsKindOf(Expression))-> forAll(supertype | @@ -102,12 +97,18 @@ namespace SysML2.NET.Core.POCO /// superType.oclAsType(Expression).result endif)ownedFeatureInverting = /// ownedRelationship->selectByKind(FeatureInverting)-> select(fi | fi.featureInverted = /// self)featuringType = let featuringTypes : OrderedSet(Type) = - /// typeFeaturing.featuringType->asOrderedSet() in if chainingFeature->isEmpty() then featuringTypes - /// else featuringTypes-> union(chainingFeature->first().featuringType)-> + /// featuring.type->asOrderedSet() in if chainingFeature->isEmpty() then featuringTypes else + /// featuringTypes-> union(chainingFeature->first().featuringType)-> /// asOrderedSet() endifownedReferenceSubsetting = let referenceSubsettings : /// OrderedSet(ReferenceSubsetting) = ownedSubsetting->selectByKind(ReferenceSubsetting) in if /// referenceSubsettings->isEmpty() then null else referenceSubsettings->first() - /// endifownedSubsetting->selectByKind(ReferenceSubsetting)->size() <= 1 + /// endifownedSubsetting->selectByKind(ReferenceSubsetting)->size() <= + /// 1Sequence{1..chainingFeature->size() - 1}->forAll(i | chainingFeature->at(i + + /// 1).featuringType->forAll(t | chainingFeature->at(i).specializes(t)))isPortion + /// andownedTyping.type->includes(oclIsKindOf(Class)) andowningType <> null + /// and(owningType.oclIsKindOf(Class) or owningType.oclIsKindOf(Feature) and + /// owningType.oclAsType(Feature).type-> exists(oclIsKindOf(Class))) implies + /// specializesFromLibrary('Occurrence::Occurrence::portions') /// public partial interface IFeature : IType { @@ -144,7 +145,7 @@ public partial interface IFeature : IType bool IsComposite { get; set; } /// - /// Whether the values of this Feature can always be computed from the values of other Feature. + /// Whether the values of this Feature can always be computed from the values of other Features. /// [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] bool IsDerived { get; set; } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IImport.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IImport.cs index c7a31f64..f88011f3 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IImport.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/IImport.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/ILiteralInteger.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/ILiteralInteger.cs index 2b6ab53a..14d05cbd 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/ILiteralInteger.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/ILiteralInteger.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,7 +32,8 @@ namespace SysML2.NET.Core.POCO /// /// A LiteralInteger is a LiteralExpression that provides an Integer value as a result. Its result - /// parameter must have the type Integer. + /// parameter must have the type + /// Integer.specializesFromLibrary('Performances::literalIntegerEvaluations') /// public partial interface ILiteralInteger : ILiteralExpression { diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/ILiteralRational.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/ILiteralRational.cs index 61c42d91..9f5e1a95 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/ILiteralRational.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/ILiteralRational.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,7 +32,8 @@ namespace SysML2.NET.Core.POCO /// /// A LiteralRational is a LiteralExpression that provides a Rational value as a result. Its result - /// parameter must have the type Rational. + /// parameter must have the type + /// Rational.specializesFromLibrary('Performances::literalRationalEvaluations') /// public partial interface ILiteralRational : ILiteralExpression { diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/LiteralInteger.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/LiteralInteger.cs index 85b11dfd..19f5133f 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/LiteralInteger.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/LiteralInteger.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,7 +32,8 @@ namespace SysML2.NET.Core.POCO /// /// A LiteralInteger is a LiteralExpression that provides an Integer value as a result. Its result - /// parameter must have the type Integer. + /// parameter must have the type + /// Integer.specializesFromLibrary('Performances::literalIntegerEvaluations') /// public partial class LiteralInteger : ILiteralInteger { @@ -264,7 +265,7 @@ public bool QueryIsConjugated() } /// - /// Whether the values of this Feature can always be computed from the values of other Feature. + /// Whether the values of this Feature can always be computed from the values of other Features. /// [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] public bool IsDerived { get; set; } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/LiteralRational.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/LiteralRational.cs index 4befefc0..d0d3b5b8 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/LiteralRational.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/LiteralRational.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,7 +32,8 @@ namespace SysML2.NET.Core.POCO /// /// A LiteralRational is a LiteralExpression that provides a Rational value as a result. Its result - /// parameter must have the type Rational. + /// parameter must have the type + /// Rational.specializesFromLibrary('Performances::literalRationalEvaluations') /// public partial class LiteralRational : ILiteralRational { @@ -264,7 +265,7 @@ public bool QueryIsConjugated() } /// - /// Whether the values of this Feature can always be computed from the values of other Feature. + /// Whether the values of this Feature can always be computed from the values of other Features. /// [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] public bool IsDerived { get; set; } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/NamespaceImport.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/NamespaceImport.cs index 5e7ed2c6..f89fbb33 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/NamespaceImport.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutGenPoco/NamespaceImport.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ namespace SysML2.NET.Core.POCO /// /// A NamespaceImport is an Import that imports Memberships from its importedNamespace into the /// importOwningNamespace. If isRecursive = false, then only the visible Memberships of the - /// importOwningNamespace are imported. If isRecursive = true, then, in addition, Memberships are + /// importedNamespace are imported. If isRecursive = true, then, in addition, Memberships are /// recursively imported from any ownedMembers of the importedNamespace that are /// Namespaces.importedElement = importedNamespace /// diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/AnnotatingElementDictionaryReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/AnnotatingElementDictionaryReader.cs index 7fa365dd..e9032a95 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/AnnotatingElementDictionaryReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/AnnotatingElementDictionaryReader.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/AnnotationDictionaryReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/AnnotationDictionaryReader.cs index 04b59fc0..656b7eff 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/AnnotationDictionaryReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/AnnotationDictionaryReader.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/CommentDictionaryReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/CommentDictionaryReader.cs index 22830361..a56f9f96 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/CommentDictionaryReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/CommentDictionaryReader.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/ConnectorDictionaryReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/ConnectorDictionaryReader.cs index b31c0d0b..431cd2b2 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/ConnectorDictionaryReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/ConnectorDictionaryReader.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -152,12 +152,6 @@ private static IConnector ReadSimplified(Dictionary dictionary) } bool isDerivedFeature = Convert.ToBoolean(isDerivedObject); - if (!dictionary.TryGetValue("isDirected", out object isDirectedObject)) - { - throw new ArgumentException("The isDirected property is missing from the dictionary, the dictionary cannot be converted into a Connector"); - } - bool isDirectedFeature = Convert.ToBoolean(isDirectedObject); - if (!dictionary.TryGetValue("isEnd", out object isEndObject)) { throw new ArgumentException("The isEnd property is missing from the dictionary, the dictionary cannot be converted into a Connector"); @@ -251,7 +245,6 @@ private static IConnector ReadSimplified(Dictionary dictionary) connectorInstance.IsAbstract = isAbstractFeature; connectorInstance.IsComposite = isCompositeFeature; connectorInstance.IsDerived = isDerivedFeature; - connectorInstance.IsDirected = isDirectedFeature; connectorInstance.IsEnd = isEndFeature; connectorInstance.IsImplied = isImpliedFeature; connectorInstance.IsImpliedIncluded = isImpliedIncludedFeature; @@ -332,12 +325,6 @@ private static IConnector ReadComplex(Dictionary dictionary) } bool isDerivedFeature = Convert.ToBoolean(isDerivedObject); - if (!dictionary.TryGetValue("isDirected", out object isDirectedObject)) - { - throw new ArgumentException("The isDirected property is missing from the dictionary, the dictionary cannot be converted into a Connector"); - } - bool isDirectedFeature = Convert.ToBoolean(isDirectedObject); - if (!dictionary.TryGetValue("isEnd", out object isEndObject)) { throw new ArgumentException("The isEnd property is missing from the dictionary, the dictionary cannot be converted into a Connector"); @@ -431,7 +418,6 @@ private static IConnector ReadComplex(Dictionary dictionary) connectorInstance.IsAbstract = isAbstractFeature; connectorInstance.IsComposite = isCompositeFeature; connectorInstance.IsDerived = isDerivedFeature; - connectorInstance.IsDirected = isDirectedFeature; connectorInstance.IsEnd = isEndFeature; connectorInstance.IsImplied = isImpliedFeature; connectorInstance.IsImpliedIncluded = isImpliedIncludedFeature; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/DefinitionDictionaryReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/DefinitionDictionaryReader.cs new file mode 100644 index 00000000..bf661e27 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/DefinitionDictionaryReader.cs @@ -0,0 +1,325 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2024 RHEA System 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.Dictionary.Core.DTO +{ + using System; + using System.Collections.Generic; + using System.Linq; + + using SysML2.NET.Common; + using SysML2.NET.Core; + using SysML2.NET.Core.DTO; + + /// + /// The purpose of the is to read (convert) + /// a from an + /// + public static class DefinitionDictionaryReader + { + /// + /// Reads a from a that contains a key-value-pair + /// for each property. + /// + /// + /// The subject that is to be converted into a + /// + /// + /// The source that is to be read from + /// + /// + /// An instance of + /// + /// + /// When the is then the values that are read from the + /// are read as is. When the is + /// then the following applies: + /// The values that are of the following types are read as is: + /// - Number, an abstract type, which has the subtypes Integer and Float + /// - String + /// - Boolean + /// - The spatial type Point + /// - Temporal types: Date, Time, LocalTime, DateTime, LocalDateTime and Duration + /// values of other types are converted from string, in case these are an then + /// the values are converted from an Array of String using JSON notation, i.e. [ value_1, ..., value_n ] + /// + public static IData Read(Dictionary dictionary, DictionaryKind dictionaryKind) + { + switch (dictionaryKind) + { + case DictionaryKind.Complex: + return ReadComplex(dictionary); + case DictionaryKind.Simplified: + return ReadSimplified(dictionary); + default: + throw new NotSupportedException($"The dictionaryKind:{dictionaryKind} is not supported"); + } + } + + /// + /// Reads a from a that contains a key-value-pair + /// for each property. + /// + /// + /// The subject that is to be converted into a + /// + /// + /// An instance of + /// + /// + /// When the is then the values that are read from the + /// are read as is. When the is + /// then the following applies: + /// The values that are of the following types are read as is: + /// - Number, an abstract type, which has the subtypes Integer and Float + /// - String + /// - Boolean + /// - The spatial type Point + /// - Temporal types: Date, Time, LocalTime, DateTime, LocalDateTime and Duration + /// values of other types are converted from string, in case these are an then + /// the values are converted from an Array of String using JSON notation, i.e. [ value_1, ..., value_n ] + /// + private static IDefinition ReadSimplified(Dictionary dictionary) + { + var definitionInstance = DictionaryNullAndTypeCheck(dictionary); + + if (!dictionary.TryGetValue("aliasIds", out object aliasIdsObject)) + { + throw new ArgumentException("The aliasIds property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + List aliasIdsFeature = aliasIdsObject as List; + + if (!dictionary.TryGetValue("declaredName", out object declaredNameObject)) + { + throw new ArgumentException("The declaredName property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + string declaredNameFeature = declaredNameObject == null ? null : Convert.ToString(declaredNameObject); + + if (!dictionary.TryGetValue("declaredShortName", out object declaredShortNameObject)) + { + throw new ArgumentException("The declaredShortName property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + string declaredShortNameFeature = declaredShortNameObject == null ? null : Convert.ToString(declaredShortNameObject); + + if (!dictionary.TryGetValue("elementId", out object elementIdObject)) + { + throw new ArgumentException("The elementId property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + string elementIdFeature = Convert.ToString(elementIdObject); + + if (!dictionary.TryGetValue("isAbstract", out object isAbstractObject)) + { + throw new ArgumentException("The isAbstract property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + bool isAbstractFeature = Convert.ToBoolean(isAbstractObject); + + if (!dictionary.TryGetValue("isImpliedIncluded", out object isImpliedIncludedObject)) + { + throw new ArgumentException("The isImpliedIncluded property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + bool isImpliedIncludedFeature = Convert.ToBoolean(isImpliedIncludedObject); + + if (!dictionary.TryGetValue("isSufficient", out object isSufficientObject)) + { + throw new ArgumentException("The isSufficient property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + bool isSufficientFeature = Convert.ToBoolean(isSufficientObject); + + if (!dictionary.TryGetValue("isVariation", out object isVariationObject)) + { + throw new ArgumentException("The isVariation property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + bool isVariationFeature = Convert.ToBoolean(isVariationObject); + + if (!dictionary.TryGetValue("ownedRelationship", out object ownedRelationshipObject)) + { + throw new ArgumentException("The ownedRelationship property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + List ownedRelationshipFeature = (ownedRelationshipObject as List)?.Select(Guid.Parse).ToList(); + + if (!dictionary.TryGetValue("owningRelationship", out object owningRelationshipObject)) + { + throw new ArgumentException("The owningRelationship property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + Guid? owningRelationshipFeature = owningRelationshipObject == null ? (Guid?)null : Guid.Parse(Convert.ToString(owningRelationshipObject)); + + + definitionInstance.AliasIds = aliasIdsFeature ?? new List(); + definitionInstance.DeclaredName = declaredNameFeature; + definitionInstance.DeclaredShortName = declaredShortNameFeature; + definitionInstance.ElementId = elementIdFeature; + definitionInstance.IsAbstract = isAbstractFeature; + definitionInstance.IsImpliedIncluded = isImpliedIncludedFeature; + definitionInstance.IsSufficient = isSufficientFeature; + definitionInstance.IsVariation = isVariationFeature; + definitionInstance.OwnedRelationship = ownedRelationshipFeature ?? new List(); + definitionInstance.OwningRelationship = owningRelationshipFeature; + + return definitionInstance; + } + + /// + /// Reads a from a that contains a key-value-pair + /// for each property. + /// + /// + /// The subject that is to be converted into a + /// + /// + /// An instance of + /// + private static IDefinition ReadComplex(Dictionary dictionary) + { + var definitionInstance = DictionaryNullAndTypeCheck(dictionary); + + if (!dictionary.TryGetValue("aliasIds", out object aliasIdsObject)) + { + throw new ArgumentException("The aliasIds property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + List aliasIdsFeature = aliasIdsObject as List; + + if (!dictionary.TryGetValue("declaredName", out object declaredNameObject)) + { + throw new ArgumentException("The declaredName property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + string declaredNameFeature = declaredNameObject == null ? null : Convert.ToString(declaredNameObject); + + if (!dictionary.TryGetValue("declaredShortName", out object declaredShortNameObject)) + { + throw new ArgumentException("The declaredShortName property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + string declaredShortNameFeature = declaredShortNameObject == null ? null : Convert.ToString(declaredShortNameObject); + + if (!dictionary.TryGetValue("elementId", out object elementIdObject)) + { + throw new ArgumentException("The elementId property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + string elementIdFeature = Convert.ToString(elementIdObject); + + if (!dictionary.TryGetValue("isAbstract", out object isAbstractObject)) + { + throw new ArgumentException("The isAbstract property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + bool isAbstractFeature = Convert.ToBoolean(isAbstractObject); + + if (!dictionary.TryGetValue("isImpliedIncluded", out object isImpliedIncludedObject)) + { + throw new ArgumentException("The isImpliedIncluded property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + bool isImpliedIncludedFeature = Convert.ToBoolean(isImpliedIncludedObject); + + if (!dictionary.TryGetValue("isSufficient", out object isSufficientObject)) + { + throw new ArgumentException("The isSufficient property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + bool isSufficientFeature = Convert.ToBoolean(isSufficientObject); + + if (!dictionary.TryGetValue("isVariation", out object isVariationObject)) + { + throw new ArgumentException("The isVariation property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + bool isVariationFeature = Convert.ToBoolean(isVariationObject); + + if (!dictionary.TryGetValue("ownedRelationship", out object ownedRelationshipObject)) + { + throw new ArgumentException("The ownedRelationship property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + List ownedRelationshipFeature = (ownedRelationshipObject as List); + + if (!dictionary.TryGetValue("owningRelationship", out object owningRelationshipObject)) + { + throw new ArgumentException("The owningRelationship property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + Guid? owningRelationshipFeature = (Guid?)owningRelationshipObject; + + + definitionInstance.AliasIds = aliasIdsFeature ?? new List(); + definitionInstance.DeclaredName = declaredNameFeature; + definitionInstance.DeclaredShortName = declaredShortNameFeature; + definitionInstance.ElementId = elementIdFeature; + definitionInstance.IsAbstract = isAbstractFeature; + definitionInstance.IsImpliedIncluded = isImpliedIncludedFeature; + definitionInstance.IsSufficient = isSufficientFeature; + definitionInstance.IsVariation = isVariationFeature; + definitionInstance.OwnedRelationship = ownedRelationshipFeature ?? new List(); + definitionInstance.OwningRelationship = owningRelationshipFeature; + + return definitionInstance; + } + + /// + /// Checks whether the is not null and whether it is + /// of type + /// + /// + /// The subject that contains the key-value pairs of + /// properties and values. + /// + /// + /// an instance of + /// + /// + /// Thrown when is null + /// + /// + /// Thrown when is not of type + /// + private static IDefinition DictionaryNullAndTypeCheck(Dictionary dictionary) + { + if (dictionary == null) + { + throw new ArgumentNullException("dictionary", "The dictionary may not be null"); + } + + if (!dictionary.TryGetValue("@type", out object typeObject)) + { + throw new ArgumentException("The type property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + + var type = Convert.ToString(typeObject); + + if (type != "Definition") + { + throw new ArgumentException($"The dictionary contains an Object is of type {type} and can therefore not be converted into a Definition"); + } + + if (!dictionary.TryGetValue("@id", out object idObject)) + { + throw new ArgumentException("The id property is missing from the dictionary, the dictionary cannot be converted into a Definition"); + } + var id = Guid.Parse(Convert.ToString(idObject)); + + var definitionInstance = new SysML2.NET.Core.DTO.Definition + { + Id = id + }; + + return definitionInstance; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/DependencyDictionaryReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/DependencyDictionaryReader.cs index 571b50d3..74a01d56 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/DependencyDictionaryReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/DependencyDictionaryReader.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/FeatureDictionaryReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/FeatureDictionaryReader.cs index 862a3192..c479c5b7 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/FeatureDictionaryReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/FeatureDictionaryReader.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/LiteralIntegerDictionaryReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/LiteralIntegerDictionaryReader.cs index 3ee0f4b2..1bb0e3d9 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/LiteralIntegerDictionaryReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/LiteralIntegerDictionaryReader.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/LiteralRationalDictionaryReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/LiteralRationalDictionaryReader.cs index ec4b6946..cde06d44 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/LiteralRationalDictionaryReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/LiteralRationalDictionaryReader.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/NamespaceImportDictionaryReader.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/NamespaceImportDictionaryReader.cs index 015df388..994e12b1 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/NamespaceImportDictionaryReader.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryReader/NamespaceImportDictionaryReader.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/AnnotatingElementDictionaryWriter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/AnnotatingElementDictionaryWriter.cs index b45ba22f..9e2c15c7 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/AnnotatingElementDictionaryWriter.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/AnnotatingElementDictionaryWriter.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/AnnotationDictionaryWriter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/AnnotationDictionaryWriter.cs index f4af1c32..80c98791 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/AnnotationDictionaryWriter.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/AnnotationDictionaryWriter.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/CommentDictionaryWriter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/CommentDictionaryWriter.cs index f6224b8f..901428cc 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/CommentDictionaryWriter.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/CommentDictionaryWriter.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/ConnectorDictionaryWriter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/ConnectorDictionaryWriter.cs index 743d307d..c39b335e 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/ConnectorDictionaryWriter.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/ConnectorDictionaryWriter.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -115,7 +115,6 @@ private static Dictionary WriteSimplified(IConnector connectorIn dictionary.Add("isAbstract", connectorInstance.IsAbstract); dictionary.Add("isComposite", connectorInstance.IsComposite); dictionary.Add("isDerived", connectorInstance.IsDerived); - dictionary.Add("isDirected", connectorInstance.IsDirected); dictionary.Add("isEnd", connectorInstance.IsEnd); dictionary.Add("isImplied", connectorInstance.IsImplied); dictionary.Add("isImpliedIncluded", connectorInstance.IsImpliedIncluded); @@ -164,7 +163,6 @@ private static Dictionary WriteComplex(IConnector connectorInsta dictionary.Add("isAbstract", connectorInstance.IsAbstract); dictionary.Add("isComposite", connectorInstance.IsComposite); dictionary.Add("isDerived", connectorInstance.IsDerived); - dictionary.Add("isDirected", connectorInstance.IsDirected); dictionary.Add("isEnd", connectorInstance.IsEnd); dictionary.Add("isImplied", connectorInstance.IsImplied); dictionary.Add("isImpliedIncluded", connectorInstance.IsImpliedIncluded); diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/DefinitionDictionaryWriter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/DefinitionDictionaryWriter.cs new file mode 100644 index 00000000..b6e6b2e4 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/DefinitionDictionaryWriter.cs @@ -0,0 +1,195 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2024 RHEA System 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.Dictionary.Core.DTO +{ + using System; + using System.Collections.Generic; + + using SysML2.NET.Common; + using SysML2.NET.Core.DTO; + + /// + /// The purpose of the is to write (convert) a + /// to a . + /// + public static class DefinitionDictionaryWriter + { + /// + /// Writes a to a that contains a key-value-pair + /// for each property. The type key is used to store type information (name of the Type). + /// + /// + /// The subject that is to be written to a . + /// + /// + /// The target that is to be created + /// + /// + /// An instance of that contains all the properties as key-value-pairs as well + /// as a type key that is used to store type information (name of the Type). + /// + /// + /// When the is then the values are written to the + /// as is. When the is + /// then the following applies: + /// The values that are of the following types are stored as is: + /// - Number, an abstract type, which has the subtypes Integer and Float + /// - String + /// - Boolean + /// - The spatial type Point + /// - Temporal types: Date, Time, LocalTime, DateTime, LocalDateTime and Duration + /// values of other types are converted to string, in case these are an then + /// the values are converted to an Array of String using JSON notation, i.e. [ value_1, ..., value_n ] + /// + public static Dictionary Write(IData dataItem, DictionaryKind dictionaryKind) + { + var definitionInstance = ThingNullAndTypeCheck(dataItem); + + switch (dictionaryKind) + { + case DictionaryKind.Complex: + return WriteComplex(definitionInstance); + case DictionaryKind.Simplified: + return WriteSimplified(definitionInstance); + default: + throw new NotSupportedException($"The dictionaryKind:{dictionaryKind} is not supported"); + } + } + + /// + /// Writes a to a that contains a key-value-pair + /// for each property. The type key is used to store type information (name of the Type). + /// + /// + /// The subject that is to be written to a . + /// + /// + /// An instance of that contains all the properties as key-value-pairs as well + /// as a type key that is used to store type information (name of the Type). + /// + /// + /// The values that are of the following types are stored as is: + /// - Number, an abstract type, which has the subtypes Integer and Float + /// - String + /// - Boolean + /// - The spatial type Point + /// - Temporal types: Date, Time, LocalTime, DateTime, LocalDateTime and Duration + /// values of other types are converted to string, in case these are an then + /// the values are converted to an Array of String using JSON notation, i.e. [ value_1, ..., value_n ] + /// + private static Dictionary WriteSimplified(IDefinition definitionInstance) + { + var dictionary = new Dictionary + { + { "@type", "Definition" }, + { "@id", definitionInstance.Id.ToString() } + }; + + dictionary.Add("aliasIds", definitionInstance.AliasIds); + dictionary.Add("declaredName", definitionInstance.DeclaredName); + dictionary.Add("declaredShortName", definitionInstance.DeclaredShortName); + dictionary.Add("elementId", definitionInstance.ElementId); + dictionary.Add("isAbstract", definitionInstance.IsAbstract); + dictionary.Add("isImpliedIncluded", definitionInstance.IsImpliedIncluded); + dictionary.Add("isSufficient", definitionInstance.IsSufficient); + dictionary.Add("isVariation", definitionInstance.IsVariation); + dictionary.Add("ownedRelationship", $"[ {string.Join(",", definitionInstance.OwnedRelationship)} ]"); + dictionary.Add("owningRelationship", definitionInstance.OwningRelationship.ToString()); + + return dictionary; + } + + /// + /// Writes a to a that contains a key-value-pair + /// for each property. The type key is used to store type information (name of the Type). + /// + /// + /// The subject that is to be written to a . + /// + /// + /// An instance of that contains all the properties as key-value-pairs as well + /// as a type key that is used to store type information (name of the Type). + /// + /// + /// All values are stored as is, no conversion is done + /// + private static Dictionary WriteComplex(IDefinition definitionInstance) + { + var dictionary = new Dictionary + { + { "@type", "Definition" }, + { "@id", definitionInstance.Id } + }; + + dictionary.Add("aliasIds", definitionInstance.AliasIds); + dictionary.Add("declaredName", definitionInstance.DeclaredName); + dictionary.Add("declaredShortName", definitionInstance.DeclaredShortName); + dictionary.Add("elementId", definitionInstance.ElementId); + dictionary.Add("isAbstract", definitionInstance.IsAbstract); + dictionary.Add("isImpliedIncluded", definitionInstance.IsImpliedIncluded); + dictionary.Add("isSufficient", definitionInstance.IsSufficient); + dictionary.Add("isVariation", definitionInstance.IsVariation); + dictionary.Add("ownedRelationship", definitionInstance.OwnedRelationship); + dictionary.Add("owningRelationship", definitionInstance.OwningRelationship); + + return dictionary; + } + + /// + /// Checks whether the is not null and whether it is + /// of type + /// + /// + /// The subject + /// + /// + /// an instance of + /// + /// + /// Thrown when is null + /// + /// + /// Thrown when is not of type + /// + private static IDefinition ThingNullAndTypeCheck(IData dataItem) + { + if (dataItem == null) + { + throw new ArgumentNullException("dataItem", "The dataItem may not be null"); + } + + if (!(dataItem is IDefinition definitionInstance)) + { + throw new ArgumentException("The dataItem must be of Type IDefinition", "dataItem"); + } + + return definitionInstance; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/DependencyDictionaryWriter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/DependencyDictionaryWriter.cs index 53312b8d..68bc58cf 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/DependencyDictionaryWriter.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/DependencyDictionaryWriter.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/FeatureDictionaryWriter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/FeatureDictionaryWriter.cs index 416b59f7..ce7d0dc1 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/FeatureDictionaryWriter.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/FeatureDictionaryWriter.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/LiteralIntegerDictionaryWriter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/LiteralIntegerDictionaryWriter.cs index 9de67ea6..0d1f7ec4 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/LiteralIntegerDictionaryWriter.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/LiteralIntegerDictionaryWriter.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/LiteralRationalDictionaryWriter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/LiteralRationalDictionaryWriter.cs index ab3f377a..ef2cf69f 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/LiteralRationalDictionaryWriter.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/LiteralRationalDictionaryWriter.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/NamespaceImportDictionaryWriter.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/NamespaceImportDictionaryWriter.cs index 8c4ed558..fb6a3fb8 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/NamespaceImportDictionaryWriter.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDictionaryWriter/NamespaceImportDictionaryWriter.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/AnnotatingElement.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/AnnotatingElement.cs index 29504bee..73efc20a 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/AnnotatingElement.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/AnnotatingElement.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,7 +34,9 @@ namespace SysML2.NET.Core.DTO /// An AnnotatingElement is an Element that provides additional description of or metadata on some other /// Element. An AnnotatingElement is either attached to its annotatedElements by Annotation /// Relationships, or it implicitly annotates its owningNamespace.annotatedElement = if - /// annotation->notEmpty() then annotation.annotatedElement else Sequence{owningNamespace} endif + /// annotation->notEmpty() then annotation.annotatedElement else Sequence{owningNamespace} + /// endifownedAnnotatingRelationship = ownedRelationship-> selectByKind(Annotation)-> select(a | + /// a.annotatingElement = self) /// public partial class AnnotatingElement : IAnnotatingElement { diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Annotation.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Annotation.cs index df09a153..2ad45ce5 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Annotation.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Annotation.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Comment.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Comment.cs index dbf45fec..fa8f33ae 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Comment.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Comment.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Connector.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Connector.cs index 69484098..e921137d 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Connector.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Connector.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -36,17 +36,17 @@ namespace SysML2.NET.Core.DTO /// of things might be linked. The Connector further restricts these links to be between values of /// Features on instances of its domain.relatedFeature = connectorEnd.ownedReferenceSubsetting-> /// select(s | s <> null).subsettedFeaturerelatedFeature->forAll(f | if featuringType->isEmpty() - /// then f.isFeaturedWithin(null) else featuringType->exists(t | f.isFeaturedWithin(t)) + /// then f.isFeaturedWithin(null) else featuringType->forAll(t | f.isFeaturedWithin(t)) /// endif)sourceFeature = if relatedFeature->isEmpty() then null else relatedFeature->first() /// endiftargetFeature = if relatedFeature->size() < 2 then OrderedSet{} else /// relatedFeature-> subSequence(2, relatedFeature->size())-> asOrderedSet() /// endifnot isAbstract implies relatedFeature->size() >= - /// 2specializesFromLibrary("Links::links")association->exists(oclIsKindOf(AssociationStructure)) - /// implies specializesFromLibrary("Objects::linkObjects")connectorEnds->size() = 2 + /// 2specializesFromLibrary('Links::links')association->exists(oclIsKindOf(AssociationStructure)) + /// implies specializesFromLibrary('Objects::linkObjects')connectorEnds->size() = 2 /// andassociation->exists(oclIsKindOf(AssocationStructure)) implies - /// specializesFromLibrary("Objects::binaryLinkObjects")connectorEnd->size() = 2 implies - /// specializesFromLibrary("Links::binaryLinks")connectorEnds->size() > 2 implies not - /// specializesFromLibrary("Links::BinaryLink") + /// specializesFromLibrary('Objects::binaryLinkObjects')connectorEnd->size() = 2 implies + /// specializesFromLibrary('Links::binaryLinks')connectorEnds->size() > 2 implies not + /// specializesFromLibrary('Links::BinaryLink') /// public partial class Connector : IConnector { @@ -59,7 +59,6 @@ public Connector() this.IsAbstract = false; this.IsComposite = false; this.IsDerived = false; - this.IsDirected = false; this.IsEnd = false; this.IsImplied = false; this.IsImpliedIncluded = false; @@ -130,18 +129,11 @@ public Connector() public bool IsComposite { get; set; } /// - /// Whether the values of this Feature can always be computed from the values of other Feature. + /// Whether the values of this Feature can always be computed from the values of other Features. /// [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] public bool IsDerived { get; set; } - /// - /// For a binary Connector, whether or not the Connector should be considered to have a direction from - /// sourceFeature to targetFeature. - /// - [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] - public bool IsDirected { get; set; } - /// /// Whether or not the this Feature is an end Feature, requiring a different interpretation of the /// multiplicity of the Feature.An end Feature is always considered to map each domain instance to a diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Definition.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Definition.cs new file mode 100644 index 00000000..76c17609 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Definition.cs @@ -0,0 +1,173 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2024 RHEA System 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Core.DTO +{ + using System; + using System.Collections.Generic; + + using SysML2.NET.Core; + using SysML2.NET.Decorators; + + /// + /// A Definition is a Classifier of Usages. The actual kinds of Definition that may appear in a model + /// are given by the subclasses of Definition (possibly as extended with user-defined + /// SemanticMetadata).Normally, a Definition has owned Usages that model features of the thing being + /// defined. A Definition may also have other Definitions nested in it, but this has no semantic + /// significance, other than the nested scoping resulting from the Definition being considered as a + /// Namespace for any nested Definitions.However, if a Definition has isVariation = true, then it + /// represents a variation point Definition. In this case, all of its members must be variant Usages, + /// related to the Definition by VariantMembership Relationships. Rather than being features of the + /// Definition, variant Usages model different concrete alternatives that can be chosen to fill in for + /// an abstract Usage of the variation point Definition.isVariation implies + /// ownedFeatureMembership->isEmpty()variant = variantMembership.ownedVariantUsagevariantMembership = + /// ownedMembership->selectByKind(VariantMembership)isVariation implies not + /// ownedSpecialization.specific->exists( oclIsKindOf(Definition) and + /// oclAsType(Definition).isVariation)usage = feature->selectByKind(Usage)directedUsage = + /// directedFeature->selectByKind(Usage)ownedUsage = ownedFeature->selectByKind(Usage)ownedAttribute = + /// ownedUsage->selectByKind(AttributeUsage)ownedReference = + /// ownedUsage->selectByKind(ReferenceUsage)ownedEnumeration = + /// ownedUsage->selectByKind(EnumerationUsage)ownedOccurrence = + /// ownedUsage->selectByKind(OccurrenceUsage)ownedItem = ownedUsage->selectByKind(ItemUsage)ownedPart = + /// ownedUsage->selectByKind(PartUsage)ownedPort = ownedUsage->selectByKind(PortUsage)ownedConnection = + /// ownedUsage->selectByKind(ConnectorAsUsage)ownedFlow = + /// ownedUsage->selectByKind(FlowConnectionUsage)ownedInterface = + /// ownedUsage->selectByKind(ReferenceUsage)ownedAllocation = + /// ownedUsage->selectByKind(AllocationUsage)ownedAction = + /// ownedUsage->selectByKind(ActionUsage)ownedState = + /// ownedUsage->selectByKind(StateUsage)ownedTransition = + /// ownedUsage->selectByKind(TransitionUsage)ownedCalculation = + /// ownedUsage->selectByKind(CalculationUsage)ownedConstraint = + /// ownedUsage->selectByKind(ConstraintUsage)ownedRequirement = + /// ownedUsage->selectByKind(RequirementUsage)ownedConcern = + /// ownedUsage->selectByKind(ConcernUsage)ownedCase = + /// ownedUsage->selectByKind(CaseUsage)ownedAnalysisCase = + /// ownedUsage->selectByKind(AnalysisCaseUsage)ownedVerificationCase = + /// ownedUsage->selectByKind(VerificationCaseUsage)ownedUseCase = + /// ownedUsage->selectByKind(UseCaseUsage)ownedView = ownedUsage->selectByKind(ViewUsage)ownedViewpoint + /// = ownedUsage->selectByKind(ViewpointUsage)ownedRendering = + /// ownedUsage->selectByKind(RenderingUsage)ownedMetadata = + /// ownedUsage->selectByKind(MetadataUsage)isVariation implies isAbstract + /// + public partial class Definition : IDefinition + { + /// + /// Initializes a new instance of the class. + /// + public Definition() + { + this.AliasIds = new List(); + this.IsAbstract = false; + this.IsImpliedIncluded = false; + this.IsSufficient = false; + this.OwnedRelationship = new List(); + } + + /// + /// Gets or sets the unique identifier + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: true, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public Guid Id { get; set; } + + /// + /// Various alternative identifiers for this Element. Generally, these will be set by tools. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: false)] + public List AliasIds { get; set; } + + /// + /// The declared name of this Element. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public string DeclaredName { get; set; } + + /// + /// An optional alternative name for the Element that is intended to be shorter or in some way more + /// succinct than its primary name. It may act as a modeler-specified identifier for the Element, though + /// it is then the responsibility of the modeler to maintain the uniqueness of this identifier within a + /// model or relative to some other context. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public string DeclaredShortName { get; set; } + + /// + /// The globally unique identifier for this Element. This is intended to be set by tooling, and it must + /// not change during the lifetime of the Element. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public string ElementId { get; set; } + + /// + /// Indicates whether instances of this Type must also be instances of at least one of its specialized + /// Types. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public bool IsAbstract { get; set; } + + /// + /// Whether all necessary implied Relationships have been included in the ownedRelationships of this + /// Element. This property may be true, even if there are not actually any ownedRelationships with + /// isImplied = true, meaning that no such Relationships are actually implied for this Element. However, + /// if it is false, then ownedRelationships may not contain any implied Relationships. That is, either + /// all required implied Relationships must be included, or none of them. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public bool IsImpliedIncluded { get; set; } + + /// + /// Whether all things that meet the classification conditions of this Type must be classified by the + /// Type.(A Type gives conditions that must be met by whatever it classifies, but when isSufficient + /// is false, things may meet those conditions but still not be classified by the Type. For example, a + /// Type Car that is not sufficient could require everything it classifies to have four wheels, but not + /// all four wheeled things would classify as cars. However, if the Type Car were sufficient, it would + /// classify all four-wheeled things.) + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public bool IsSufficient { get; set; } + + /// + /// Whether this Definition is for a variation point or not. If true, then all the memberships of the + /// Definition must be VariantMemberships. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public bool IsVariation { get; set; } + + /// + /// The Relationships for which this Element is the owningRelatedElement. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: true, isUnique: true, lowerBound: 0, upperBound: -1, isMany: false, isRequired: false, isContainment: true)] + public List OwnedRelationship { get; set; } + + /// + /// The Relationship for which this Element is an ownedRelatedElement, if any. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 0, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + public Guid? OwningRelationship { get; set; } + + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Dependency.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Dependency.cs index ba041d7b..b3987700 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Dependency.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Dependency.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Feature.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Feature.cs index fbd260cd..a171c575 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Feature.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/Feature.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -49,51 +49,46 @@ namespace SysML2.NET.Core.DTO /// ownedSubsetting->selectByKind(Redefinition)ownedTypeFeaturing = /// ownedRelationship->selectByKind(TypeFeaturing)-> select(tf | tf.featureOfType = /// self)ownedSubsetting = ownedSpecialization->selectByKind(Subsetting)ownedTyping = - /// ownedGeneralization->selectByKind(FeatureTyping)type = let types : OrderedSet(Type) = - /// typing.type-> union(subsetting.subsettedFeature.type)-> asOrderedSet() in if - /// chainingFeature->isEmpty() then types else types->union(chainingFeature->last().type)-> - /// asOrderedSet() endifmultiplicity <> null implies multiplicity.featuringType = featuringType - /// specializesFromLibrary("Base::things")chainingFeatures->excludes(self)ownedFeatureChaining = + /// ownedGeneralization->selectByKind(FeatureTyping)type = let types : OrderedSet(Types) = + /// OrderedSet{self}-> -- Note: The closure operation automatically handles circular + /// relationships. closure(typingFeatures()).typing.type->asOrderedSet() in types->reject(t1 | + /// types->exist(t2 | t2 <> t1 and t2.specializes(t1)))multiplicity <> null implies + /// multiplicity.featuringType = featuringType + /// specializesFromLibrary('Base::things')chainingFeature->excludes(self)ownedFeatureChaining = /// ownedRelationship->selectByKind(FeatureChaining)chainingFeature = - /// ownedFeatureChaining.chainingFeaturechainingFeatures->size() <> 1isEnd and owningType <> null - /// implies let i : Integer = owningType.ownedFeature->select(isEnd) in - /// owningType.ownedSpecialization.general-> forAll(supertype | let ownedEndFeatures : - /// Sequence(Feature) = supertype.ownedFeature->select(isEnd) in - /// ownedEndFeatures->size() >= i implies - /// redefines(ownedEndFeatures->at(i))ownedMembership-> selectByKind(FeatureValue)-> forAll(fv | - /// specializes(fv.value.result))isEnd and owningType <> null andowningType.oclIsKindOf(Association) - /// implies specializesFromLibrary("Links::Link::participants")isComposite + /// ownedFeatureChaining.chainingFeaturechainingFeature->size() <> 1isEnd and owningType <> null implies + /// let i : Integer = owningType.ownedEndFeature->indexOf(self) in + /// owningType.ownedSpecialization.general-> forAll(supertype | + /// supertype.endFeature->size() >= i implies + /// redefines(supertype.endFeature->at(i))direction = null andownedSpecializations->forAll(isImplied) + /// implies ownedMembership-> selectByKind(FeatureValue)-> forAll(fv | + /// specializes(fv.value.result))isEnd and owningType <> null and(owningType.oclIsKindOf(Association) or + /// owningType.oclIsKindOf(Connector)) implies + /// specializesFromLibrary('Links::Link::participant')isComposite /// andownedTyping.type->includes(oclIsKindOf(Structure)) andowningType <> null /// and(owningType.oclIsKindOf(Structure) or owningType.type->includes(oclIsKindOf(Structure))) implies - /// specializesFromLibrary("Occurrence::Occurrence::suboccurrences")owningType <> null - /// and(owningType.oclIsKindOf(LiteralExpression) or owningType.oclIsKindOf(FeatureReferenceExpression)) - /// implies if owningType.oclIsKindOf(LiteralString) then - /// specializesFromLibrary("ScalarValues::String") else if owningType.oclIsKindOf(LiteralBoolean) - /// then specializesFromLibrary("ScalarValues::Boolean") else if - /// owningType.oclIsKindOf(LiteralInteger) then specializesFromLibrary("ScalarValues::Rational") - /// else if owningType.oclIsKindOf(LiteralBoolean) then - /// specializesFromLibrary("ScalarValues::Rational") else if owningType.oclIsKindOf(LiteralBoolean) - /// then specializesFromLibrary("ScalarValues::Real") else specializes( - /// owningType.oclAsType(FeatureReferenceExpression).referent) endif endif endif endif - /// endifownedTyping.type->exists(selectByKind(Class)) implies - /// specializesFromLibrary("Occurrences::occurrences")isComposite + /// specializesFromLibrary('Occurrence::Occurrence::suboccurrences')owningType <> null + /// andowningType.oclIsKindOf(FeatureReferenceExpression) andself = + /// owningType.oclAsType(FeatureReferenceExpression).result implies + /// specializes(owningType.oclAsType(FeatureReferenceExpression).referent)ownedTyping.type->exists(selectByKind(Class)) + /// implies specializesFromLibrary('Occurrences::occurrences')isComposite /// andownedTyping.type->includes(oclIsKindOf(Class)) andowningType <> null /// and(owningType.oclIsKindOf(Class) or owningType.oclIsKindOf(Feature) and /// owningType.oclAsType(Feature).type-> exists(oclIsKindOf(Class))) implies - /// specializesFromLibrary("Occurrence::Occurrence::suboccurrences")ownedTyping.type->exists(selectByKind(DataType)) - /// implies specializesFromLibary("Base::dataValues")owningType <> null + /// specializesFromLibrary('Occurrence::Occurrence::suboccurrences')ownedTyping.type->exists(selectByKind(DataType)) + /// implies specializesFromLibrary('Base::dataValues')owningType <> null /// andowningType.oclIsKindOf(ItemFlowEnd) andowningType.ownedFeature->at(1) = self implies let /// flowType : Type = owningType.owningType in flowType <> null implies let i : Integer = /// flowType.ownedFeature.indexOf(owningType) in (i = 1 implies - /// redefinesFromLibrary("Transfers::Transfer::source::sourceOutput")) and (i = 2 implies - /// redefinesFromLibrary("Transfers::Transfer::source::targetInput")) owningType <> + /// redefinesFromLibrary('Transfers::Transfer::source::sourceOutput')) and (i = 2 implies + /// redefinesFromLibrary('Transfers::Transfer::source::targetInput')) owningType <> /// null and(owningType.oclIsKindOf(Behavior) or owningType.oclIsKindOf(Step)) implies let i : /// Integer = owningType.ownedFeature->select(direction <> null) in /// owningType.ownedSpecialization.general-> forAll(supertype | let ownedParameters : /// Sequence(Feature) = supertype.ownedFeature->select(direction <> null) in /// ownedParameters->size() >= i implies /// redefines(ownedParameters->at(i))ownedTyping.type->exists(selectByKind(Structure)) implies - /// specializesFromLibary("Objects::objects")owningType <> null and(owningType.oclIsKindOf(Function) and + /// specializesFromLibary('Objects::objects')owningType <> null and(owningType.oclIsKindOf(Function) and /// self = owningType.oclAsType(Function).result or owningType.oclIsKindOf(Expression) and self = /// owningType.oclAsType(Expression).result) implies owningType.ownedSpecialization.general-> /// select(oclIsKindOf(Function) or oclIsKindOf(Expression))-> forAll(supertype | @@ -102,12 +97,18 @@ namespace SysML2.NET.Core.DTO /// superType.oclAsType(Expression).result endif)ownedFeatureInverting = /// ownedRelationship->selectByKind(FeatureInverting)-> select(fi | fi.featureInverted = /// self)featuringType = let featuringTypes : OrderedSet(Type) = - /// typeFeaturing.featuringType->asOrderedSet() in if chainingFeature->isEmpty() then featuringTypes - /// else featuringTypes-> union(chainingFeature->first().featuringType)-> + /// featuring.type->asOrderedSet() in if chainingFeature->isEmpty() then featuringTypes else + /// featuringTypes-> union(chainingFeature->first().featuringType)-> /// asOrderedSet() endifownedReferenceSubsetting = let referenceSubsettings : /// OrderedSet(ReferenceSubsetting) = ownedSubsetting->selectByKind(ReferenceSubsetting) in if /// referenceSubsettings->isEmpty() then null else referenceSubsettings->first() - /// endifownedSubsetting->selectByKind(ReferenceSubsetting)->size() <= 1 + /// endifownedSubsetting->selectByKind(ReferenceSubsetting)->size() <= + /// 1Sequence{1..chainingFeature->size() - 1}->forAll(i | chainingFeature->at(i + + /// 1).featuringType->forAll(t | chainingFeature->at(i).specializes(t)))isPortion + /// andownedTyping.type->includes(oclIsKindOf(Class)) andowningType <> null + /// and(owningType.oclIsKindOf(Class) or owningType.oclIsKindOf(Feature) and + /// owningType.oclAsType(Feature).type-> exists(oclIsKindOf(Class))) implies + /// specializesFromLibrary('Occurrence::Occurrence::portions') /// public partial class Feature : IFeature { @@ -186,7 +187,7 @@ public Feature() public bool IsComposite { get; set; } /// - /// Whether the values of this Feature can always be computed from the values of other Feature. + /// Whether the values of this Feature can always be computed from the values of other Features. /// [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] public bool IsDerived { get; set; } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IAnnotatingElement.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IAnnotatingElement.cs index c31dd232..4d38064b 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IAnnotatingElement.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IAnnotatingElement.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,7 +34,9 @@ namespace SysML2.NET.Core.DTO /// An AnnotatingElement is an Element that provides additional description of or metadata on some other /// Element. An AnnotatingElement is either attached to its annotatedElements by Annotation /// Relationships, or it implicitly annotates its owningNamespace.annotatedElement = if - /// annotation->notEmpty() then annotation.annotatedElement else Sequence{owningNamespace} endif + /// annotation->notEmpty() then annotation.annotatedElement else Sequence{owningNamespace} + /// endifownedAnnotatingRelationship = ownedRelationship-> selectByKind(Annotation)-> select(a | + /// a.annotatingElement = self) /// public partial interface IAnnotatingElement : IElement { diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IAnnotation.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IAnnotation.cs index a037e39a..4af369e7 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IAnnotation.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IAnnotation.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IComment.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IComment.cs index 18da8974..6c794d15 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IComment.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IComment.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IConnector.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IConnector.cs index 3c08d099..9c3fa161 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IConnector.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IConnector.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -36,27 +36,20 @@ namespace SysML2.NET.Core.DTO /// of things might be linked. The Connector further restricts these links to be between values of /// Features on instances of its domain.relatedFeature = connectorEnd.ownedReferenceSubsetting-> /// select(s | s <> null).subsettedFeaturerelatedFeature->forAll(f | if featuringType->isEmpty() - /// then f.isFeaturedWithin(null) else featuringType->exists(t | f.isFeaturedWithin(t)) + /// then f.isFeaturedWithin(null) else featuringType->forAll(t | f.isFeaturedWithin(t)) /// endif)sourceFeature = if relatedFeature->isEmpty() then null else relatedFeature->first() /// endiftargetFeature = if relatedFeature->size() < 2 then OrderedSet{} else /// relatedFeature-> subSequence(2, relatedFeature->size())-> asOrderedSet() /// endifnot isAbstract implies relatedFeature->size() >= - /// 2specializesFromLibrary("Links::links")association->exists(oclIsKindOf(AssociationStructure)) - /// implies specializesFromLibrary("Objects::linkObjects")connectorEnds->size() = 2 + /// 2specializesFromLibrary('Links::links')association->exists(oclIsKindOf(AssociationStructure)) + /// implies specializesFromLibrary('Objects::linkObjects')connectorEnds->size() = 2 /// andassociation->exists(oclIsKindOf(AssocationStructure)) implies - /// specializesFromLibrary("Objects::binaryLinkObjects")connectorEnd->size() = 2 implies - /// specializesFromLibrary("Links::binaryLinks")connectorEnds->size() > 2 implies not - /// specializesFromLibrary("Links::BinaryLink") + /// specializesFromLibrary('Objects::binaryLinkObjects')connectorEnd->size() = 2 implies + /// specializesFromLibrary('Links::binaryLinks')connectorEnds->size() > 2 implies not + /// specializesFromLibrary('Links::BinaryLink') /// public partial interface IConnector : IFeature, IRelationship { - /// - /// For a binary Connector, whether or not the Connector should be considered to have a direction from - /// sourceFeature to targetFeature. - /// - [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] - bool IsDirected { get; set; } - } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IDefinition.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IDefinition.cs new file mode 100644 index 00000000..4ed8e538 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IDefinition.cs @@ -0,0 +1,87 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2024 RHEA System 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Core.DTO +{ + using System; + using System.Collections.Generic; + + using SysML2.NET.Core; + using SysML2.NET.Decorators; + + /// + /// A Definition is a Classifier of Usages. The actual kinds of Definition that may appear in a model + /// are given by the subclasses of Definition (possibly as extended with user-defined + /// SemanticMetadata).Normally, a Definition has owned Usages that model features of the thing being + /// defined. A Definition may also have other Definitions nested in it, but this has no semantic + /// significance, other than the nested scoping resulting from the Definition being considered as a + /// Namespace for any nested Definitions.However, if a Definition has isVariation = true, then it + /// represents a variation point Definition. In this case, all of its members must be variant Usages, + /// related to the Definition by VariantMembership Relationships. Rather than being features of the + /// Definition, variant Usages model different concrete alternatives that can be chosen to fill in for + /// an abstract Usage of the variation point Definition.isVariation implies + /// ownedFeatureMembership->isEmpty()variant = variantMembership.ownedVariantUsagevariantMembership = + /// ownedMembership->selectByKind(VariantMembership)isVariation implies not + /// ownedSpecialization.specific->exists( oclIsKindOf(Definition) and + /// oclAsType(Definition).isVariation)usage = feature->selectByKind(Usage)directedUsage = + /// directedFeature->selectByKind(Usage)ownedUsage = ownedFeature->selectByKind(Usage)ownedAttribute = + /// ownedUsage->selectByKind(AttributeUsage)ownedReference = + /// ownedUsage->selectByKind(ReferenceUsage)ownedEnumeration = + /// ownedUsage->selectByKind(EnumerationUsage)ownedOccurrence = + /// ownedUsage->selectByKind(OccurrenceUsage)ownedItem = ownedUsage->selectByKind(ItemUsage)ownedPart = + /// ownedUsage->selectByKind(PartUsage)ownedPort = ownedUsage->selectByKind(PortUsage)ownedConnection = + /// ownedUsage->selectByKind(ConnectorAsUsage)ownedFlow = + /// ownedUsage->selectByKind(FlowConnectionUsage)ownedInterface = + /// ownedUsage->selectByKind(ReferenceUsage)ownedAllocation = + /// ownedUsage->selectByKind(AllocationUsage)ownedAction = + /// ownedUsage->selectByKind(ActionUsage)ownedState = + /// ownedUsage->selectByKind(StateUsage)ownedTransition = + /// ownedUsage->selectByKind(TransitionUsage)ownedCalculation = + /// ownedUsage->selectByKind(CalculationUsage)ownedConstraint = + /// ownedUsage->selectByKind(ConstraintUsage)ownedRequirement = + /// ownedUsage->selectByKind(RequirementUsage)ownedConcern = + /// ownedUsage->selectByKind(ConcernUsage)ownedCase = + /// ownedUsage->selectByKind(CaseUsage)ownedAnalysisCase = + /// ownedUsage->selectByKind(AnalysisCaseUsage)ownedVerificationCase = + /// ownedUsage->selectByKind(VerificationCaseUsage)ownedUseCase = + /// ownedUsage->selectByKind(UseCaseUsage)ownedView = ownedUsage->selectByKind(ViewUsage)ownedViewpoint + /// = ownedUsage->selectByKind(ViewpointUsage)ownedRendering = + /// ownedUsage->selectByKind(RenderingUsage)ownedMetadata = + /// ownedUsage->selectByKind(MetadataUsage)isVariation implies isAbstract + /// + public partial interface IDefinition : IClassifier + { + /// + /// Whether this Definition is for a variation point or not. If true, then all the memberships of the + /// Definition must be VariantMemberships. + /// + [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] + bool IsVariation { get; set; } + + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IDependency.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IDependency.cs index dea2f821..54084ea7 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IDependency.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IDependency.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IElement.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IElement.cs index 0843f69b..434b8f51 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IElement.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IElement.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -42,7 +42,7 @@ namespace SysML2.NET.Core.DTO /// ownedElement->selectByKind(Documentation)ownedAnnotation = ownedRelationship-> /// selectByKind(Annotation)-> select(a | a.annotatedElement = self)name = /// effectiveName()ownedRelationship->exists(isImplied) implies isImpliedIncludedisLibraryElement = - /// libraryNamespace() <>nullshortName = effectiveShortName()owningNamespace = if owningMembership = + /// libraryNamespace() <> nullshortName = effectiveShortName()owningNamespace = if owningMembership = /// null then null else owningMembership.membershipOwningNamespace endiftextualRepresentation = /// ownedElement->selectByKind(TextualRepresentation) /// diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IFeature.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IFeature.cs index 0a050882..64100042 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IFeature.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IFeature.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -49,51 +49,46 @@ namespace SysML2.NET.Core.DTO /// ownedSubsetting->selectByKind(Redefinition)ownedTypeFeaturing = /// ownedRelationship->selectByKind(TypeFeaturing)-> select(tf | tf.featureOfType = /// self)ownedSubsetting = ownedSpecialization->selectByKind(Subsetting)ownedTyping = - /// ownedGeneralization->selectByKind(FeatureTyping)type = let types : OrderedSet(Type) = - /// typing.type-> union(subsetting.subsettedFeature.type)-> asOrderedSet() in if - /// chainingFeature->isEmpty() then types else types->union(chainingFeature->last().type)-> - /// asOrderedSet() endifmultiplicity <> null implies multiplicity.featuringType = featuringType - /// specializesFromLibrary("Base::things")chainingFeatures->excludes(self)ownedFeatureChaining = + /// ownedGeneralization->selectByKind(FeatureTyping)type = let types : OrderedSet(Types) = + /// OrderedSet{self}-> -- Note: The closure operation automatically handles circular + /// relationships. closure(typingFeatures()).typing.type->asOrderedSet() in types->reject(t1 | + /// types->exist(t2 | t2 <> t1 and t2.specializes(t1)))multiplicity <> null implies + /// multiplicity.featuringType = featuringType + /// specializesFromLibrary('Base::things')chainingFeature->excludes(self)ownedFeatureChaining = /// ownedRelationship->selectByKind(FeatureChaining)chainingFeature = - /// ownedFeatureChaining.chainingFeaturechainingFeatures->size() <> 1isEnd and owningType <> null - /// implies let i : Integer = owningType.ownedFeature->select(isEnd) in - /// owningType.ownedSpecialization.general-> forAll(supertype | let ownedEndFeatures : - /// Sequence(Feature) = supertype.ownedFeature->select(isEnd) in - /// ownedEndFeatures->size() >= i implies - /// redefines(ownedEndFeatures->at(i))ownedMembership-> selectByKind(FeatureValue)-> forAll(fv | - /// specializes(fv.value.result))isEnd and owningType <> null andowningType.oclIsKindOf(Association) - /// implies specializesFromLibrary("Links::Link::participants")isComposite + /// ownedFeatureChaining.chainingFeaturechainingFeature->size() <> 1isEnd and owningType <> null implies + /// let i : Integer = owningType.ownedEndFeature->indexOf(self) in + /// owningType.ownedSpecialization.general-> forAll(supertype | + /// supertype.endFeature->size() >= i implies + /// redefines(supertype.endFeature->at(i))direction = null andownedSpecializations->forAll(isImplied) + /// implies ownedMembership-> selectByKind(FeatureValue)-> forAll(fv | + /// specializes(fv.value.result))isEnd and owningType <> null and(owningType.oclIsKindOf(Association) or + /// owningType.oclIsKindOf(Connector)) implies + /// specializesFromLibrary('Links::Link::participant')isComposite /// andownedTyping.type->includes(oclIsKindOf(Structure)) andowningType <> null /// and(owningType.oclIsKindOf(Structure) or owningType.type->includes(oclIsKindOf(Structure))) implies - /// specializesFromLibrary("Occurrence::Occurrence::suboccurrences")owningType <> null - /// and(owningType.oclIsKindOf(LiteralExpression) or owningType.oclIsKindOf(FeatureReferenceExpression)) - /// implies if owningType.oclIsKindOf(LiteralString) then - /// specializesFromLibrary("ScalarValues::String") else if owningType.oclIsKindOf(LiteralBoolean) - /// then specializesFromLibrary("ScalarValues::Boolean") else if - /// owningType.oclIsKindOf(LiteralInteger) then specializesFromLibrary("ScalarValues::Rational") - /// else if owningType.oclIsKindOf(LiteralBoolean) then - /// specializesFromLibrary("ScalarValues::Rational") else if owningType.oclIsKindOf(LiteralBoolean) - /// then specializesFromLibrary("ScalarValues::Real") else specializes( - /// owningType.oclAsType(FeatureReferenceExpression).referent) endif endif endif endif - /// endifownedTyping.type->exists(selectByKind(Class)) implies - /// specializesFromLibrary("Occurrences::occurrences")isComposite + /// specializesFromLibrary('Occurrence::Occurrence::suboccurrences')owningType <> null + /// andowningType.oclIsKindOf(FeatureReferenceExpression) andself = + /// owningType.oclAsType(FeatureReferenceExpression).result implies + /// specializes(owningType.oclAsType(FeatureReferenceExpression).referent)ownedTyping.type->exists(selectByKind(Class)) + /// implies specializesFromLibrary('Occurrences::occurrences')isComposite /// andownedTyping.type->includes(oclIsKindOf(Class)) andowningType <> null /// and(owningType.oclIsKindOf(Class) or owningType.oclIsKindOf(Feature) and /// owningType.oclAsType(Feature).type-> exists(oclIsKindOf(Class))) implies - /// specializesFromLibrary("Occurrence::Occurrence::suboccurrences")ownedTyping.type->exists(selectByKind(DataType)) - /// implies specializesFromLibary("Base::dataValues")owningType <> null + /// specializesFromLibrary('Occurrence::Occurrence::suboccurrences')ownedTyping.type->exists(selectByKind(DataType)) + /// implies specializesFromLibrary('Base::dataValues')owningType <> null /// andowningType.oclIsKindOf(ItemFlowEnd) andowningType.ownedFeature->at(1) = self implies let /// flowType : Type = owningType.owningType in flowType <> null implies let i : Integer = /// flowType.ownedFeature.indexOf(owningType) in (i = 1 implies - /// redefinesFromLibrary("Transfers::Transfer::source::sourceOutput")) and (i = 2 implies - /// redefinesFromLibrary("Transfers::Transfer::source::targetInput")) owningType <> + /// redefinesFromLibrary('Transfers::Transfer::source::sourceOutput')) and (i = 2 implies + /// redefinesFromLibrary('Transfers::Transfer::source::targetInput')) owningType <> /// null and(owningType.oclIsKindOf(Behavior) or owningType.oclIsKindOf(Step)) implies let i : /// Integer = owningType.ownedFeature->select(direction <> null) in /// owningType.ownedSpecialization.general-> forAll(supertype | let ownedParameters : /// Sequence(Feature) = supertype.ownedFeature->select(direction <> null) in /// ownedParameters->size() >= i implies /// redefines(ownedParameters->at(i))ownedTyping.type->exists(selectByKind(Structure)) implies - /// specializesFromLibary("Objects::objects")owningType <> null and(owningType.oclIsKindOf(Function) and + /// specializesFromLibary('Objects::objects')owningType <> null and(owningType.oclIsKindOf(Function) and /// self = owningType.oclAsType(Function).result or owningType.oclIsKindOf(Expression) and self = /// owningType.oclAsType(Expression).result) implies owningType.ownedSpecialization.general-> /// select(oclIsKindOf(Function) or oclIsKindOf(Expression))-> forAll(supertype | @@ -102,12 +97,18 @@ namespace SysML2.NET.Core.DTO /// superType.oclAsType(Expression).result endif)ownedFeatureInverting = /// ownedRelationship->selectByKind(FeatureInverting)-> select(fi | fi.featureInverted = /// self)featuringType = let featuringTypes : OrderedSet(Type) = - /// typeFeaturing.featuringType->asOrderedSet() in if chainingFeature->isEmpty() then featuringTypes - /// else featuringTypes-> union(chainingFeature->first().featuringType)-> + /// featuring.type->asOrderedSet() in if chainingFeature->isEmpty() then featuringTypes else + /// featuringTypes-> union(chainingFeature->first().featuringType)-> /// asOrderedSet() endifownedReferenceSubsetting = let referenceSubsettings : /// OrderedSet(ReferenceSubsetting) = ownedSubsetting->selectByKind(ReferenceSubsetting) in if /// referenceSubsettings->isEmpty() then null else referenceSubsettings->first() - /// endifownedSubsetting->selectByKind(ReferenceSubsetting)->size() <= 1 + /// endifownedSubsetting->selectByKind(ReferenceSubsetting)->size() <= + /// 1Sequence{1..chainingFeature->size() - 1}->forAll(i | chainingFeature->at(i + + /// 1).featuringType->forAll(t | chainingFeature->at(i).specializes(t)))isPortion + /// andownedTyping.type->includes(oclIsKindOf(Class)) andowningType <> null + /// and(owningType.oclIsKindOf(Class) or owningType.oclIsKindOf(Feature) and + /// owningType.oclAsType(Feature).type-> exists(oclIsKindOf(Class))) implies + /// specializesFromLibrary('Occurrence::Occurrence::portions') /// public partial interface IFeature : IType { @@ -126,7 +127,7 @@ public partial interface IFeature : IType bool IsComposite { get; set; } /// - /// Whether the values of this Feature can always be computed from the values of other Feature. + /// Whether the values of this Feature can always be computed from the values of other Features. /// [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] bool IsDerived { get; set; } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IImport.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IImport.cs index 4fe1d760..32cc75d5 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IImport.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/IImport.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/ILiteralInteger.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/ILiteralInteger.cs index 9969e06c..a9d202d6 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/ILiteralInteger.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/ILiteralInteger.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,7 +32,8 @@ namespace SysML2.NET.Core.DTO /// /// A LiteralInteger is a LiteralExpression that provides an Integer value as a result. Its result - /// parameter must have the type Integer. + /// parameter must have the type + /// Integer.specializesFromLibrary('Performances::literalIntegerEvaluations') /// public partial interface ILiteralInteger : ILiteralExpression { diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/ILiteralRational.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/ILiteralRational.cs index 07bdd58c..bc0f3d42 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/ILiteralRational.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/ILiteralRational.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,7 +32,8 @@ namespace SysML2.NET.Core.DTO /// /// A LiteralRational is a LiteralExpression that provides a Rational value as a result. Its result - /// parameter must have the type Rational. + /// parameter must have the type + /// Rational.specializesFromLibrary('Performances::literalRationalEvaluations') /// public partial interface ILiteralRational : ILiteralExpression { diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/LiteralInteger.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/LiteralInteger.cs index 8ca899a4..96f05da5 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/LiteralInteger.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/LiteralInteger.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,7 +32,8 @@ namespace SysML2.NET.Core.DTO /// /// A LiteralInteger is a LiteralExpression that provides an Integer value as a result. Its result - /// parameter must have the type Integer. + /// parameter must have the type + /// Integer.specializesFromLibrary('Performances::literalIntegerEvaluations') /// public partial class LiteralInteger : ILiteralInteger { @@ -111,7 +112,7 @@ public LiteralInteger() public bool IsComposite { get; set; } /// - /// Whether the values of this Feature can always be computed from the values of other Feature. + /// Whether the values of this Feature can always be computed from the values of other Features. /// [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] public bool IsDerived { get; set; } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/LiteralRational.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/LiteralRational.cs index 43e2cc96..e9a3c45d 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/LiteralRational.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/LiteralRational.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,7 +32,8 @@ namespace SysML2.NET.Core.DTO /// /// A LiteralRational is a LiteralExpression that provides a Rational value as a result. Its result - /// parameter must have the type Rational. + /// parameter must have the type + /// Rational.specializesFromLibrary('Performances::literalRationalEvaluations') /// public partial class LiteralRational : ILiteralRational { @@ -111,7 +112,7 @@ public LiteralRational() public bool IsComposite { get; set; } /// - /// Whether the values of this Feature can always be computed from the values of other Feature. + /// Whether the values of this Feature can always be computed from the values of other Features. /// [EFeature(isChangeable: true, isVolatile: false, isTransient: false, isUnsettable: false, isDerived: false, isOrdered: false, isUnique: true, lowerBound: 1, upperBound: 1, isMany: false, isRequired: false, isContainment: false)] public bool IsDerived { get; set; } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/NamespaceImport.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/NamespaceImport.cs index 95b6d249..4232a38d 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/NamespaceImport.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenDto/NamespaceImport.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -33,7 +33,7 @@ namespace SysML2.NET.Core.DTO /// /// A NamespaceImport is an Import that imports Memberships from its importedNamespace into the /// importOwningNamespace. If isRecursive = false, then only the visible Memberships of the - /// importOwningNamespace are imported. If isRecursive = true, then, in addition, Memberships are + /// importedNamespace are imported. If isRecursive = true, then, in addition, Memberships are /// recursively imported from any ownedMembers of the importedNamespace that are /// Namespaces.importedElement = importedNamespace /// diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/AnnotatingElementFactory.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/AnnotatingElementFactory.cs index 9da359ce..247f16cc 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/AnnotatingElementFactory.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/AnnotatingElementFactory.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/AnnotationFactory.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/AnnotationFactory.cs index 92dcfdeb..a91b9b29 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/AnnotationFactory.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/AnnotationFactory.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/CommentFactory.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/CommentFactory.cs index ce46ae9b..212ee9f7 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/CommentFactory.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/CommentFactory.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/ConnectorFactory.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/ConnectorFactory.cs index 84aaf2ef..b65d4900 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/ConnectorFactory.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/ConnectorFactory.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -63,7 +63,6 @@ public Core.POCO.Connector Create(Core.DTO.Connector dto) IsAbstract = dto.IsAbstract, IsComposite = dto.IsComposite, IsDerived = dto.IsDerived, - IsDirected = dto.IsDirected, IsEnd = dto.IsEnd, IsImplied = dto.IsImplied, IsImpliedIncluded = dto.IsImpliedIncluded, diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/DefinitionFactory.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/DefinitionFactory.cs new file mode 100644 index 00000000..df9131e2 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/DefinitionFactory.cs @@ -0,0 +1,75 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2024 RHEA System 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Dal +{ + using System; + + /// + /// The purpose of the is to create a new instance of a + /// based on a + /// + public class DefinitionFactory + { + /// + /// Creates an instance of the and sets the value properties + /// based on the DTO + /// + /// + /// The instance of the + /// + /// + /// an instance of + /// + /// + /// thrown when is null + /// + public Core.POCO.Definition Create(Core.DTO.Definition dto) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), $"the {nameof(dto)} may not be null"); + } + + var poco = new Core.POCO.Definition + { + Id = dto.Id, + AliasIds = dto.AliasIds, + DeclaredName = dto.DeclaredName, + DeclaredShortName = dto.DeclaredShortName, + ElementId = dto.ElementId, + IsAbstract = dto.IsAbstract, + IsImpliedIncluded = dto.IsImpliedIncluded, + IsSufficient = dto.IsSufficient, + IsVariation = dto.IsVariation, + }; + + return poco; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/DependencyFactory.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/DependencyFactory.cs index cda74aeb..2ae6420f 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/DependencyFactory.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/DependencyFactory.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/ElementFactory.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/ElementFactory.cs new file mode 100644 index 00000000..07bd2199 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/ElementFactory.cs @@ -0,0 +1,557 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2024 RHEA System 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Dal +{ + using System; + + /// + /// The purpose of the is to create a POCO + /// based on a DTO + /// + public class ElementFactory : IElementFactory + { + /// + /// Creates a POCO based on a + /// + /// + /// the source DTO + /// + /// + /// a POCO + /// + /// + /// thrown when is null + /// + public Core.POCO.IElement Create(Core.DTO.IElement dto) + { + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), $"the {nameof(dto)} may not be null"); + } + + switch (dto) + { + case Core.DTO.AcceptActionUsage acceptActionUsageDto: + var acceptActionUsageFactory = new AcceptActionUsageFactory(); + return acceptActionUsageFactory.Create(acceptActionUsageDto); + case Core.DTO.ActionDefinition actionDefinitionDto: + var actionDefinitionFactory = new ActionDefinitionFactory(); + return actionDefinitionFactory.Create(actionDefinitionDto); + case Core.DTO.ActionUsage actionUsageDto: + var actionUsageFactory = new ActionUsageFactory(); + return actionUsageFactory.Create(actionUsageDto); + case Core.DTO.ActorMembership actorMembershipDto: + var actorMembershipFactory = new ActorMembershipFactory(); + return actorMembershipFactory.Create(actorMembershipDto); + case Core.DTO.AllocationDefinition allocationDefinitionDto: + var allocationDefinitionFactory = new AllocationDefinitionFactory(); + return allocationDefinitionFactory.Create(allocationDefinitionDto); + case Core.DTO.AllocationUsage allocationUsageDto: + var allocationUsageFactory = new AllocationUsageFactory(); + return allocationUsageFactory.Create(allocationUsageDto); + case Core.DTO.AnalysisCaseDefinition analysisCaseDefinitionDto: + var analysisCaseDefinitionFactory = new AnalysisCaseDefinitionFactory(); + return analysisCaseDefinitionFactory.Create(analysisCaseDefinitionDto); + case Core.DTO.AnalysisCaseUsage analysisCaseUsageDto: + var analysisCaseUsageFactory = new AnalysisCaseUsageFactory(); + return analysisCaseUsageFactory.Create(analysisCaseUsageDto); + case Core.DTO.AnnotatingElement annotatingElementDto: + var annotatingElementFactory = new AnnotatingElementFactory(); + return annotatingElementFactory.Create(annotatingElementDto); + case Core.DTO.Annotation annotationDto: + var annotationFactory = new AnnotationFactory(); + return annotationFactory.Create(annotationDto); + case Core.DTO.AssertConstraintUsage assertConstraintUsageDto: + var assertConstraintUsageFactory = new AssertConstraintUsageFactory(); + return assertConstraintUsageFactory.Create(assertConstraintUsageDto); + case Core.DTO.AssignmentActionUsage assignmentActionUsageDto: + var assignmentActionUsageFactory = new AssignmentActionUsageFactory(); + return assignmentActionUsageFactory.Create(assignmentActionUsageDto); + case Core.DTO.Association associationDto: + var associationFactory = new AssociationFactory(); + return associationFactory.Create(associationDto); + case Core.DTO.AssociationStructure associationStructureDto: + var associationStructureFactory = new AssociationStructureFactory(); + return associationStructureFactory.Create(associationStructureDto); + case Core.DTO.AttributeDefinition attributeDefinitionDto: + var attributeDefinitionFactory = new AttributeDefinitionFactory(); + return attributeDefinitionFactory.Create(attributeDefinitionDto); + case Core.DTO.AttributeUsage attributeUsageDto: + var attributeUsageFactory = new AttributeUsageFactory(); + return attributeUsageFactory.Create(attributeUsageDto); + case Core.DTO.Behavior behaviorDto: + var behaviorFactory = new BehaviorFactory(); + return behaviorFactory.Create(behaviorDto); + case Core.DTO.BindingConnector bindingConnectorDto: + var bindingConnectorFactory = new BindingConnectorFactory(); + return bindingConnectorFactory.Create(bindingConnectorDto); + case Core.DTO.BindingConnectorAsUsage bindingConnectorAsUsageDto: + var bindingConnectorAsUsageFactory = new BindingConnectorAsUsageFactory(); + return bindingConnectorAsUsageFactory.Create(bindingConnectorAsUsageDto); + case Core.DTO.BooleanExpression booleanExpressionDto: + var booleanExpressionFactory = new BooleanExpressionFactory(); + return booleanExpressionFactory.Create(booleanExpressionDto); + case Core.DTO.CalculationDefinition calculationDefinitionDto: + var calculationDefinitionFactory = new CalculationDefinitionFactory(); + return calculationDefinitionFactory.Create(calculationDefinitionDto); + case Core.DTO.CalculationUsage calculationUsageDto: + var calculationUsageFactory = new CalculationUsageFactory(); + return calculationUsageFactory.Create(calculationUsageDto); + case Core.DTO.CaseDefinition caseDefinitionDto: + var caseDefinitionFactory = new CaseDefinitionFactory(); + return caseDefinitionFactory.Create(caseDefinitionDto); + case Core.DTO.CaseUsage caseUsageDto: + var caseUsageFactory = new CaseUsageFactory(); + return caseUsageFactory.Create(caseUsageDto); + case Core.DTO.Class classDto: + var classFactory = new ClassFactory(); + return classFactory.Create(classDto); + case Core.DTO.Classifier classifierDto: + var classifierFactory = new ClassifierFactory(); + return classifierFactory.Create(classifierDto); + case Core.DTO.CollectExpression collectExpressionDto: + var collectExpressionFactory = new CollectExpressionFactory(); + return collectExpressionFactory.Create(collectExpressionDto); + case Core.DTO.Comment commentDto: + var commentFactory = new CommentFactory(); + return commentFactory.Create(commentDto); + case Core.DTO.ConcernDefinition concernDefinitionDto: + var concernDefinitionFactory = new ConcernDefinitionFactory(); + return concernDefinitionFactory.Create(concernDefinitionDto); + case Core.DTO.ConcernUsage concernUsageDto: + var concernUsageFactory = new ConcernUsageFactory(); + return concernUsageFactory.Create(concernUsageDto); + case Core.DTO.ConjugatedPortDefinition conjugatedPortDefinitionDto: + var conjugatedPortDefinitionFactory = new ConjugatedPortDefinitionFactory(); + return conjugatedPortDefinitionFactory.Create(conjugatedPortDefinitionDto); + case Core.DTO.ConjugatedPortTyping conjugatedPortTypingDto: + var conjugatedPortTypingFactory = new ConjugatedPortTypingFactory(); + return conjugatedPortTypingFactory.Create(conjugatedPortTypingDto); + case Core.DTO.Conjugation conjugationDto: + var conjugationFactory = new ConjugationFactory(); + return conjugationFactory.Create(conjugationDto); + case Core.DTO.ConnectionDefinition connectionDefinitionDto: + var connectionDefinitionFactory = new ConnectionDefinitionFactory(); + return connectionDefinitionFactory.Create(connectionDefinitionDto); + case Core.DTO.ConnectionUsage connectionUsageDto: + var connectionUsageFactory = new ConnectionUsageFactory(); + return connectionUsageFactory.Create(connectionUsageDto); + case Core.DTO.Connector connectorDto: + var connectorFactory = new ConnectorFactory(); + return connectorFactory.Create(connectorDto); + case Core.DTO.ConstraintDefinition constraintDefinitionDto: + var constraintDefinitionFactory = new ConstraintDefinitionFactory(); + return constraintDefinitionFactory.Create(constraintDefinitionDto); + case Core.DTO.ConstraintUsage constraintUsageDto: + var constraintUsageFactory = new ConstraintUsageFactory(); + return constraintUsageFactory.Create(constraintUsageDto); + case Core.DTO.DataType dataTypeDto: + var dataTypeFactory = new DataTypeFactory(); + return dataTypeFactory.Create(dataTypeDto); + case Core.DTO.DecisionNode decisionNodeDto: + var decisionNodeFactory = new DecisionNodeFactory(); + return decisionNodeFactory.Create(decisionNodeDto); + case Core.DTO.Definition definitionDto: + var definitionFactory = new DefinitionFactory(); + return definitionFactory.Create(definitionDto); + case Core.DTO.Dependency dependencyDto: + var dependencyFactory = new DependencyFactory(); + return dependencyFactory.Create(dependencyDto); + case Core.DTO.Differencing differencingDto: + var differencingFactory = new DifferencingFactory(); + return differencingFactory.Create(differencingDto); + case Core.DTO.Disjoining disjoiningDto: + var disjoiningFactory = new DisjoiningFactory(); + return disjoiningFactory.Create(disjoiningDto); + case Core.DTO.Documentation documentationDto: + var documentationFactory = new DocumentationFactory(); + return documentationFactory.Create(documentationDto); + case Core.DTO.ElementFilterMembership elementFilterMembershipDto: + var elementFilterMembershipFactory = new ElementFilterMembershipFactory(); + return elementFilterMembershipFactory.Create(elementFilterMembershipDto); + case Core.DTO.EndFeatureMembership endFeatureMembershipDto: + var endFeatureMembershipFactory = new EndFeatureMembershipFactory(); + return endFeatureMembershipFactory.Create(endFeatureMembershipDto); + case Core.DTO.EnumerationDefinition enumerationDefinitionDto: + var enumerationDefinitionFactory = new EnumerationDefinitionFactory(); + return enumerationDefinitionFactory.Create(enumerationDefinitionDto); + case Core.DTO.EnumerationUsage enumerationUsageDto: + var enumerationUsageFactory = new EnumerationUsageFactory(); + return enumerationUsageFactory.Create(enumerationUsageDto); + case Core.DTO.EventOccurrenceUsage eventOccurrenceUsageDto: + var eventOccurrenceUsageFactory = new EventOccurrenceUsageFactory(); + return eventOccurrenceUsageFactory.Create(eventOccurrenceUsageDto); + case Core.DTO.ExhibitStateUsage exhibitStateUsageDto: + var exhibitStateUsageFactory = new ExhibitStateUsageFactory(); + return exhibitStateUsageFactory.Create(exhibitStateUsageDto); + case Core.DTO.Expression expressionDto: + var expressionFactory = new ExpressionFactory(); + return expressionFactory.Create(expressionDto); + case Core.DTO.Feature featureDto: + var featureFactory = new FeatureFactory(); + return featureFactory.Create(featureDto); + case Core.DTO.FeatureChainExpression featureChainExpressionDto: + var featureChainExpressionFactory = new FeatureChainExpressionFactory(); + return featureChainExpressionFactory.Create(featureChainExpressionDto); + case Core.DTO.FeatureChaining featureChainingDto: + var featureChainingFactory = new FeatureChainingFactory(); + return featureChainingFactory.Create(featureChainingDto); + case Core.DTO.FeatureInverting featureInvertingDto: + var featureInvertingFactory = new FeatureInvertingFactory(); + return featureInvertingFactory.Create(featureInvertingDto); + case Core.DTO.FeatureMembership featureMembershipDto: + var featureMembershipFactory = new FeatureMembershipFactory(); + return featureMembershipFactory.Create(featureMembershipDto); + case Core.DTO.FeatureReferenceExpression featureReferenceExpressionDto: + var featureReferenceExpressionFactory = new FeatureReferenceExpressionFactory(); + return featureReferenceExpressionFactory.Create(featureReferenceExpressionDto); + case Core.DTO.FeatureTyping featureTypingDto: + var featureTypingFactory = new FeatureTypingFactory(); + return featureTypingFactory.Create(featureTypingDto); + case Core.DTO.FeatureValue featureValueDto: + var featureValueFactory = new FeatureValueFactory(); + return featureValueFactory.Create(featureValueDto); + case Core.DTO.FlowConnectionDefinition flowConnectionDefinitionDto: + var flowConnectionDefinitionFactory = new FlowConnectionDefinitionFactory(); + return flowConnectionDefinitionFactory.Create(flowConnectionDefinitionDto); + case Core.DTO.FlowConnectionUsage flowConnectionUsageDto: + var flowConnectionUsageFactory = new FlowConnectionUsageFactory(); + return flowConnectionUsageFactory.Create(flowConnectionUsageDto); + case Core.DTO.ForkNode forkNodeDto: + var forkNodeFactory = new ForkNodeFactory(); + return forkNodeFactory.Create(forkNodeDto); + case Core.DTO.ForLoopActionUsage forLoopActionUsageDto: + var forLoopActionUsageFactory = new ForLoopActionUsageFactory(); + return forLoopActionUsageFactory.Create(forLoopActionUsageDto); + case Core.DTO.FramedConcernMembership framedConcernMembershipDto: + var framedConcernMembershipFactory = new FramedConcernMembershipFactory(); + return framedConcernMembershipFactory.Create(framedConcernMembershipDto); + case Core.DTO.Function functionDto: + var functionFactory = new FunctionFactory(); + return functionFactory.Create(functionDto); + case Core.DTO.IfActionUsage ifActionUsageDto: + var ifActionUsageFactory = new IfActionUsageFactory(); + return ifActionUsageFactory.Create(ifActionUsageDto); + case Core.DTO.IncludeUseCaseUsage includeUseCaseUsageDto: + var includeUseCaseUsageFactory = new IncludeUseCaseUsageFactory(); + return includeUseCaseUsageFactory.Create(includeUseCaseUsageDto); + case Core.DTO.Interaction interactionDto: + var interactionFactory = new InteractionFactory(); + return interactionFactory.Create(interactionDto); + case Core.DTO.InterfaceDefinition interfaceDefinitionDto: + var interfaceDefinitionFactory = new InterfaceDefinitionFactory(); + return interfaceDefinitionFactory.Create(interfaceDefinitionDto); + case Core.DTO.InterfaceUsage interfaceUsageDto: + var interfaceUsageFactory = new InterfaceUsageFactory(); + return interfaceUsageFactory.Create(interfaceUsageDto); + case Core.DTO.Intersecting intersectingDto: + var intersectingFactory = new IntersectingFactory(); + return intersectingFactory.Create(intersectingDto); + case Core.DTO.Invariant invariantDto: + var invariantFactory = new InvariantFactory(); + return invariantFactory.Create(invariantDto); + case Core.DTO.InvocationExpression invocationExpressionDto: + var invocationExpressionFactory = new InvocationExpressionFactory(); + return invocationExpressionFactory.Create(invocationExpressionDto); + case Core.DTO.ItemDefinition itemDefinitionDto: + var itemDefinitionFactory = new ItemDefinitionFactory(); + return itemDefinitionFactory.Create(itemDefinitionDto); + case Core.DTO.ItemFeature itemFeatureDto: + var itemFeatureFactory = new ItemFeatureFactory(); + return itemFeatureFactory.Create(itemFeatureDto); + case Core.DTO.ItemFlow itemFlowDto: + var itemFlowFactory = new ItemFlowFactory(); + return itemFlowFactory.Create(itemFlowDto); + case Core.DTO.ItemFlowEnd itemFlowEndDto: + var itemFlowEndFactory = new ItemFlowEndFactory(); + return itemFlowEndFactory.Create(itemFlowEndDto); + case Core.DTO.ItemUsage itemUsageDto: + var itemUsageFactory = new ItemUsageFactory(); + return itemUsageFactory.Create(itemUsageDto); + case Core.DTO.JoinNode joinNodeDto: + var joinNodeFactory = new JoinNodeFactory(); + return joinNodeFactory.Create(joinNodeDto); + case Core.DTO.LibraryPackage libraryPackageDto: + var libraryPackageFactory = new LibraryPackageFactory(); + return libraryPackageFactory.Create(libraryPackageDto); + case Core.DTO.LifeClass lifeClassDto: + var lifeClassFactory = new LifeClassFactory(); + return lifeClassFactory.Create(lifeClassDto); + case Core.DTO.LiteralBoolean literalBooleanDto: + var literalBooleanFactory = new LiteralBooleanFactory(); + return literalBooleanFactory.Create(literalBooleanDto); + case Core.DTO.LiteralExpression literalExpressionDto: + var literalExpressionFactory = new LiteralExpressionFactory(); + return literalExpressionFactory.Create(literalExpressionDto); + case Core.DTO.LiteralInfinity literalInfinityDto: + var literalInfinityFactory = new LiteralInfinityFactory(); + return literalInfinityFactory.Create(literalInfinityDto); + case Core.DTO.LiteralInteger literalIntegerDto: + var literalIntegerFactory = new LiteralIntegerFactory(); + return literalIntegerFactory.Create(literalIntegerDto); + case Core.DTO.LiteralRational literalRationalDto: + var literalRationalFactory = new LiteralRationalFactory(); + return literalRationalFactory.Create(literalRationalDto); + case Core.DTO.LiteralString literalStringDto: + var literalStringFactory = new LiteralStringFactory(); + return literalStringFactory.Create(literalStringDto); + case Core.DTO.Membership membershipDto: + var membershipFactory = new MembershipFactory(); + return membershipFactory.Create(membershipDto); + case Core.DTO.MembershipExpose membershipExposeDto: + var membershipExposeFactory = new MembershipExposeFactory(); + return membershipExposeFactory.Create(membershipExposeDto); + case Core.DTO.MembershipImport membershipImportDto: + var membershipImportFactory = new MembershipImportFactory(); + return membershipImportFactory.Create(membershipImportDto); + case Core.DTO.MergeNode mergeNodeDto: + var mergeNodeFactory = new MergeNodeFactory(); + return mergeNodeFactory.Create(mergeNodeDto); + case Core.DTO.Metaclass metaclassDto: + var metaclassFactory = new MetaclassFactory(); + return metaclassFactory.Create(metaclassDto); + case Core.DTO.MetadataAccessExpression metadataAccessExpressionDto: + var metadataAccessExpressionFactory = new MetadataAccessExpressionFactory(); + return metadataAccessExpressionFactory.Create(metadataAccessExpressionDto); + case Core.DTO.MetadataDefinition metadataDefinitionDto: + var metadataDefinitionFactory = new MetadataDefinitionFactory(); + return metadataDefinitionFactory.Create(metadataDefinitionDto); + case Core.DTO.MetadataFeature metadataFeatureDto: + var metadataFeatureFactory = new MetadataFeatureFactory(); + return metadataFeatureFactory.Create(metadataFeatureDto); + case Core.DTO.MetadataUsage metadataUsageDto: + var metadataUsageFactory = new MetadataUsageFactory(); + return metadataUsageFactory.Create(metadataUsageDto); + case Core.DTO.Multiplicity multiplicityDto: + var multiplicityFactory = new MultiplicityFactory(); + return multiplicityFactory.Create(multiplicityDto); + case Core.DTO.MultiplicityRange multiplicityRangeDto: + var multiplicityRangeFactory = new MultiplicityRangeFactory(); + return multiplicityRangeFactory.Create(multiplicityRangeDto); + case Core.DTO.Namespace namespaceDto: + var namespaceFactory = new NamespaceFactory(); + return namespaceFactory.Create(namespaceDto); + case Core.DTO.NamespaceExpose namespaceExposeDto: + var namespaceExposeFactory = new NamespaceExposeFactory(); + return namespaceExposeFactory.Create(namespaceExposeDto); + case Core.DTO.NamespaceImport namespaceImportDto: + var namespaceImportFactory = new NamespaceImportFactory(); + return namespaceImportFactory.Create(namespaceImportDto); + case Core.DTO.NullExpression nullExpressionDto: + var nullExpressionFactory = new NullExpressionFactory(); + return nullExpressionFactory.Create(nullExpressionDto); + case Core.DTO.ObjectiveMembership objectiveMembershipDto: + var objectiveMembershipFactory = new ObjectiveMembershipFactory(); + return objectiveMembershipFactory.Create(objectiveMembershipDto); + case Core.DTO.OccurrenceDefinition occurrenceDefinitionDto: + var occurrenceDefinitionFactory = new OccurrenceDefinitionFactory(); + return occurrenceDefinitionFactory.Create(occurrenceDefinitionDto); + case Core.DTO.OccurrenceUsage occurrenceUsageDto: + var occurrenceUsageFactory = new OccurrenceUsageFactory(); + return occurrenceUsageFactory.Create(occurrenceUsageDto); + case Core.DTO.OperatorExpression operatorExpressionDto: + var operatorExpressionFactory = new OperatorExpressionFactory(); + return operatorExpressionFactory.Create(operatorExpressionDto); + case Core.DTO.OwningMembership owningMembershipDto: + var owningMembershipFactory = new OwningMembershipFactory(); + return owningMembershipFactory.Create(owningMembershipDto); + case Core.DTO.Package packageDto: + var packageFactory = new PackageFactory(); + return packageFactory.Create(packageDto); + case Core.DTO.ParameterMembership parameterMembershipDto: + var parameterMembershipFactory = new ParameterMembershipFactory(); + return parameterMembershipFactory.Create(parameterMembershipDto); + case Core.DTO.PartDefinition partDefinitionDto: + var partDefinitionFactory = new PartDefinitionFactory(); + return partDefinitionFactory.Create(partDefinitionDto); + case Core.DTO.PartUsage partUsageDto: + var partUsageFactory = new PartUsageFactory(); + return partUsageFactory.Create(partUsageDto); + case Core.DTO.PerformActionUsage performActionUsageDto: + var performActionUsageFactory = new PerformActionUsageFactory(); + return performActionUsageFactory.Create(performActionUsageDto); + case Core.DTO.PortConjugation portConjugationDto: + var portConjugationFactory = new PortConjugationFactory(); + return portConjugationFactory.Create(portConjugationDto); + case Core.DTO.PortDefinition portDefinitionDto: + var portDefinitionFactory = new PortDefinitionFactory(); + return portDefinitionFactory.Create(portDefinitionDto); + case Core.DTO.PortUsage portUsageDto: + var portUsageFactory = new PortUsageFactory(); + return portUsageFactory.Create(portUsageDto); + case Core.DTO.Predicate predicateDto: + var predicateFactory = new PredicateFactory(); + return predicateFactory.Create(predicateDto); + case Core.DTO.Redefinition redefinitionDto: + var redefinitionFactory = new RedefinitionFactory(); + return redefinitionFactory.Create(redefinitionDto); + case Core.DTO.ReferenceSubsetting referenceSubsettingDto: + var referenceSubsettingFactory = new ReferenceSubsettingFactory(); + return referenceSubsettingFactory.Create(referenceSubsettingDto); + case Core.DTO.ReferenceUsage referenceUsageDto: + var referenceUsageFactory = new ReferenceUsageFactory(); + return referenceUsageFactory.Create(referenceUsageDto); + case Core.DTO.RenderingDefinition renderingDefinitionDto: + var renderingDefinitionFactory = new RenderingDefinitionFactory(); + return renderingDefinitionFactory.Create(renderingDefinitionDto); + case Core.DTO.RenderingUsage renderingUsageDto: + var renderingUsageFactory = new RenderingUsageFactory(); + return renderingUsageFactory.Create(renderingUsageDto); + case Core.DTO.RequirementConstraintMembership requirementConstraintMembershipDto: + var requirementConstraintMembershipFactory = new RequirementConstraintMembershipFactory(); + return requirementConstraintMembershipFactory.Create(requirementConstraintMembershipDto); + case Core.DTO.RequirementDefinition requirementDefinitionDto: + var requirementDefinitionFactory = new RequirementDefinitionFactory(); + return requirementDefinitionFactory.Create(requirementDefinitionDto); + case Core.DTO.RequirementUsage requirementUsageDto: + var requirementUsageFactory = new RequirementUsageFactory(); + return requirementUsageFactory.Create(requirementUsageDto); + case Core.DTO.RequirementVerificationMembership requirementVerificationMembershipDto: + var requirementVerificationMembershipFactory = new RequirementVerificationMembershipFactory(); + return requirementVerificationMembershipFactory.Create(requirementVerificationMembershipDto); + case Core.DTO.ResultExpressionMembership resultExpressionMembershipDto: + var resultExpressionMembershipFactory = new ResultExpressionMembershipFactory(); + return resultExpressionMembershipFactory.Create(resultExpressionMembershipDto); + case Core.DTO.ReturnParameterMembership returnParameterMembershipDto: + var returnParameterMembershipFactory = new ReturnParameterMembershipFactory(); + return returnParameterMembershipFactory.Create(returnParameterMembershipDto); + case Core.DTO.SatisfyRequirementUsage satisfyRequirementUsageDto: + var satisfyRequirementUsageFactory = new SatisfyRequirementUsageFactory(); + return satisfyRequirementUsageFactory.Create(satisfyRequirementUsageDto); + case Core.DTO.SelectExpression selectExpressionDto: + var selectExpressionFactory = new SelectExpressionFactory(); + return selectExpressionFactory.Create(selectExpressionDto); + case Core.DTO.SendActionUsage sendActionUsageDto: + var sendActionUsageFactory = new SendActionUsageFactory(); + return sendActionUsageFactory.Create(sendActionUsageDto); + case Core.DTO.Specialization specializationDto: + var specializationFactory = new SpecializationFactory(); + return specializationFactory.Create(specializationDto); + case Core.DTO.StakeholderMembership stakeholderMembershipDto: + var stakeholderMembershipFactory = new StakeholderMembershipFactory(); + return stakeholderMembershipFactory.Create(stakeholderMembershipDto); + case Core.DTO.StateDefinition stateDefinitionDto: + var stateDefinitionFactory = new StateDefinitionFactory(); + return stateDefinitionFactory.Create(stateDefinitionDto); + case Core.DTO.StateSubactionMembership stateSubactionMembershipDto: + var stateSubactionMembershipFactory = new StateSubactionMembershipFactory(); + return stateSubactionMembershipFactory.Create(stateSubactionMembershipDto); + case Core.DTO.StateUsage stateUsageDto: + var stateUsageFactory = new StateUsageFactory(); + return stateUsageFactory.Create(stateUsageDto); + case Core.DTO.Step stepDto: + var stepFactory = new StepFactory(); + return stepFactory.Create(stepDto); + case Core.DTO.Structure structureDto: + var structureFactory = new StructureFactory(); + return structureFactory.Create(structureDto); + case Core.DTO.Subclassification subclassificationDto: + var subclassificationFactory = new SubclassificationFactory(); + return subclassificationFactory.Create(subclassificationDto); + case Core.DTO.SubjectMembership subjectMembershipDto: + var subjectMembershipFactory = new SubjectMembershipFactory(); + return subjectMembershipFactory.Create(subjectMembershipDto); + case Core.DTO.Subsetting subsettingDto: + var subsettingFactory = new SubsettingFactory(); + return subsettingFactory.Create(subsettingDto); + case Core.DTO.Succession successionDto: + var successionFactory = new SuccessionFactory(); + return successionFactory.Create(successionDto); + case Core.DTO.SuccessionAsUsage successionAsUsageDto: + var successionAsUsageFactory = new SuccessionAsUsageFactory(); + return successionAsUsageFactory.Create(successionAsUsageDto); + case Core.DTO.SuccessionFlowConnectionUsage successionFlowConnectionUsageDto: + var successionFlowConnectionUsageFactory = new SuccessionFlowConnectionUsageFactory(); + return successionFlowConnectionUsageFactory.Create(successionFlowConnectionUsageDto); + case Core.DTO.SuccessionItemFlow successionItemFlowDto: + var successionItemFlowFactory = new SuccessionItemFlowFactory(); + return successionItemFlowFactory.Create(successionItemFlowDto); + case Core.DTO.TextualRepresentation textualRepresentationDto: + var textualRepresentationFactory = new TextualRepresentationFactory(); + return textualRepresentationFactory.Create(textualRepresentationDto); + case Core.DTO.TransitionFeatureMembership transitionFeatureMembershipDto: + var transitionFeatureMembershipFactory = new TransitionFeatureMembershipFactory(); + return transitionFeatureMembershipFactory.Create(transitionFeatureMembershipDto); + case Core.DTO.TransitionUsage transitionUsageDto: + var transitionUsageFactory = new TransitionUsageFactory(); + return transitionUsageFactory.Create(transitionUsageDto); + case Core.DTO.TriggerInvocationExpression triggerInvocationExpressionDto: + var triggerInvocationExpressionFactory = new TriggerInvocationExpressionFactory(); + return triggerInvocationExpressionFactory.Create(triggerInvocationExpressionDto); + case Core.DTO.Type typeDto: + var typeFactory = new TypeFactory(); + return typeFactory.Create(typeDto); + case Core.DTO.TypeFeaturing typeFeaturingDto: + var typeFeaturingFactory = new TypeFeaturingFactory(); + return typeFeaturingFactory.Create(typeFeaturingDto); + case Core.DTO.Unioning unioningDto: + var unioningFactory = new UnioningFactory(); + return unioningFactory.Create(unioningDto); + case Core.DTO.Usage usageDto: + var usageFactory = new UsageFactory(); + return usageFactory.Create(usageDto); + case Core.DTO.UseCaseDefinition useCaseDefinitionDto: + var useCaseDefinitionFactory = new UseCaseDefinitionFactory(); + return useCaseDefinitionFactory.Create(useCaseDefinitionDto); + case Core.DTO.UseCaseUsage useCaseUsageDto: + var useCaseUsageFactory = new UseCaseUsageFactory(); + return useCaseUsageFactory.Create(useCaseUsageDto); + case Core.DTO.VariantMembership variantMembershipDto: + var variantMembershipFactory = new VariantMembershipFactory(); + return variantMembershipFactory.Create(variantMembershipDto); + case Core.DTO.VerificationCaseDefinition verificationCaseDefinitionDto: + var verificationCaseDefinitionFactory = new VerificationCaseDefinitionFactory(); + return verificationCaseDefinitionFactory.Create(verificationCaseDefinitionDto); + case Core.DTO.VerificationCaseUsage verificationCaseUsageDto: + var verificationCaseUsageFactory = new VerificationCaseUsageFactory(); + return verificationCaseUsageFactory.Create(verificationCaseUsageDto); + case Core.DTO.ViewDefinition viewDefinitionDto: + var viewDefinitionFactory = new ViewDefinitionFactory(); + return viewDefinitionFactory.Create(viewDefinitionDto); + case Core.DTO.ViewpointDefinition viewpointDefinitionDto: + var viewpointDefinitionFactory = new ViewpointDefinitionFactory(); + return viewpointDefinitionFactory.Create(viewpointDefinitionDto); + case Core.DTO.ViewpointUsage viewpointUsageDto: + var viewpointUsageFactory = new ViewpointUsageFactory(); + return viewpointUsageFactory.Create(viewpointUsageDto); + case Core.DTO.ViewRenderingMembership viewRenderingMembershipDto: + var viewRenderingMembershipFactory = new ViewRenderingMembershipFactory(); + return viewRenderingMembershipFactory.Create(viewRenderingMembershipDto); + case Core.DTO.ViewUsage viewUsageDto: + var viewUsageFactory = new ViewUsageFactory(); + return viewUsageFactory.Create(viewUsageDto); + case Core.DTO.WhileLoopActionUsage whileLoopActionUsageDto: + var whileLoopActionUsageFactory = new WhileLoopActionUsageFactory(); + return whileLoopActionUsageFactory.Create(whileLoopActionUsageDto); + default: + throw new NotSupportedException($"{dto.GetType().Name} not yet supported"); + } + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/FeatureFactory.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/FeatureFactory.cs index e14b2f33..3dcd0615 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/FeatureFactory.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/FeatureFactory.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/LiteralIntegerFactory.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/LiteralIntegerFactory.cs index 6ea94719..802ce6a7 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/LiteralIntegerFactory.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/LiteralIntegerFactory.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/LiteralRationalFactory.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/LiteralRationalFactory.cs index 582e1490..6df8a843 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/LiteralRationalFactory.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/LiteralRationalFactory.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/NamespaceImportFactory.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/NamespaceImportFactory.cs index 413822dc..c9bfced3 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/NamespaceImportFactory.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenElementFactory/NamespaceImportFactory.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/AnnotatingElementExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/AnnotatingElementExtensions.cs index 2a6a179e..06fb0c80 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/AnnotatingElementExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/AnnotatingElementExtensions.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/AnnotationExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/AnnotationExtensions.cs index 436d12a2..58f7737b 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/AnnotationExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/AnnotationExtensions.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/CommentExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/CommentExtensions.cs index 46ff65cb..d126e8f4 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/CommentExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/CommentExtensions.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/ConnectorExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/ConnectorExtensions.cs index 7d2b7557..64e4cca7 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/ConnectorExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/ConnectorExtensions.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -83,8 +83,6 @@ public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(t poco.IsDerived = dto.IsDerived; - poco.IsDirected = dto.IsDirected; - poco.IsEnd = dto.IsEnd; poco.IsImplied = dto.IsImplied; @@ -243,7 +241,6 @@ public static Core.DTO.Connector ToDto(this Core.POCO.Connector poco) dto.IsAbstract = poco.IsAbstract; dto.IsComposite = poco.IsComposite; dto.IsDerived = poco.IsDerived; - dto.IsDirected = poco.IsDirected; dto.IsEnd = poco.IsEnd; dto.IsImplied = poco.IsImplied; dto.IsImpliedIncluded = poco.IsImpliedIncluded; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/DefinitionExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/DefinitionExtensions.cs new file mode 100644 index 00000000..9c1effb7 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/DefinitionExtensions.cs @@ -0,0 +1,183 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2024 RHEA System 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Dal +{ + using System; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.Linq; + + using Core.POCO; + + /// + /// A static class that provides extension methods for the class + /// + public static class DefinitionExtensions + { + /// + /// Updates the value properties of the by setting the value equal to that of the dto + /// Removes deleted objects from the reference properties and returns the unique identifiers + /// of the objects that have been removed from contained properties + /// + /// + /// The that is to be updated + /// + /// + /// The DTO that is used to update the with + /// + /// + /// The unique identifiers of the objects that have been removed from contained properties + /// + /// + /// Thrown when the or is null + /// + public static IEnumerable UpdateValueAndRemoveDeletedReferenceProperties(this Core.POCO.Definition poco, Core.DTO.Definition dto) + { + if (poco == null) + { + throw new ArgumentNullException(nameof(poco), $"the {nameof(poco)} may not be null"); + } + + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), $"the {nameof(dto)} may not be null"); + } + + var identifiersOfObjectsToDelete = new List(); + + poco.AliasIds = dto.AliasIds; + + poco.DeclaredName = dto.DeclaredName; + + poco.DeclaredShortName = dto.DeclaredShortName; + + poco.ElementId = dto.ElementId; + + poco.IsAbstract = dto.IsAbstract; + + poco.IsImpliedIncluded = dto.IsImpliedIncluded; + + poco.IsSufficient = dto.IsSufficient; + + poco.IsVariation = dto.IsVariation; + + var ownedRelationshipToDelete = poco.OwnedRelationship.Select(x => x.Id).Except(dto.OwnedRelationship); + foreach (var identifier in ownedRelationshipToDelete) + { + poco.OwnedRelationship.Remove(poco.OwnedRelationship.Single(x => x.Id == identifier)); + } + identifiersOfObjectsToDelete.AddRange(ownedRelationshipToDelete); + + + return identifiersOfObjectsToDelete; + } + + /// + /// Updates the Reference properties of the using the data (identifiers) encapsulated in the DTO + /// and the provided cache to find the referenced object. + /// + /// + /// The that is to be updated + /// + /// + /// The DTO that is used to update the with + /// + /// + /// The that contains the + /// s that are know and cached. + /// + /// + public static void UpdateReferenceProperties(this Core.POCO.Definition poco, Core.DTO.Definition dto, ConcurrentDictionary> cache) + { + if (poco == null) + { + throw new ArgumentNullException(nameof(poco), $"the {nameof(poco)} may not be null"); + } + + if (dto == null) + { + throw new ArgumentNullException(nameof(dto), $"the {nameof(dto)} may not be null"); + } + + if (cache == null) + { + throw new ArgumentNullException(nameof(cache), $"the {nameof(cache)} may not be null"); + } + + Lazy lazyPoco; + + var ownedRelationshipToAdd = dto.OwnedRelationship.Except(poco.OwnedRelationship.Select(x => x.Id)); + foreach (var identifier in ownedRelationshipToAdd) + { + if (cache.TryGetValue(identifier, out lazyPoco)) + { + poco.OwnedRelationship.Add((IRelationship)lazyPoco.Value); + } + } + + if (dto.OwningRelationship.HasValue && cache.TryGetValue(dto.OwningRelationship.Value, out lazyPoco)) + { + poco.OwningRelationship = (IRelationship)lazyPoco.Value; + } + else + { + poco.OwningRelationship = null; + } + + } + + /// + /// Creates a based on the provided POCO + /// + /// + /// The subject from which a DTO is to be created + /// + /// + /// An instance of + /// + public static Core.DTO.Definition ToDto(this Core.POCO.Definition poco) + { + var dto = new Core.DTO.Definition(); + + dto.Id = poco.Id; + dto.AliasIds = poco.AliasIds; + dto.DeclaredName = poco.DeclaredName; + dto.DeclaredShortName = poco.DeclaredShortName; + dto.ElementId = poco.ElementId; + dto.IsAbstract = poco.IsAbstract; + dto.IsImpliedIncluded = poco.IsImpliedIncluded; + dto.IsSufficient = poco.IsSufficient; + dto.IsVariation = poco.IsVariation; + dto.OwnedRelationship = poco.OwnedRelationship.Select(x => x.Id).ToList(); + dto.OwningRelationship = poco.OwningRelationship?.Id; + + return dto; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/DependencyExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/DependencyExtensions.cs index 4a5d7789..1c285882 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/DependencyExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/DependencyExtensions.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/ElementExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/ElementExtensions.cs index c02ca51e..c5fd1ca4 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/ElementExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/ElementExtensions.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/FeatureExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/FeatureExtensions.cs index cb84ad2a..fd37d574 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/FeatureExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/FeatureExtensions.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/LiteralIntegerExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/LiteralIntegerExtensions.cs index 5f1ed67e..a487116c 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/LiteralIntegerExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/LiteralIntegerExtensions.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/LiteralRationalExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/LiteralRationalExtensions.cs index 2cc0dcc7..22da0894 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/LiteralRationalExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/LiteralRationalExtensions.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/NamespaceImportExtensions.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/NamespaceImportExtensions.cs index ef2c2bc9..6edeb743 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/NamespaceImportExtensions.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenPocoExtension/NamespaceImportExtensions.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenSerializer/ElementSerializer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenSerializer/ElementSerializer.cs index 5401a996..79ce5185 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenSerializer/ElementSerializer.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenSerializer/ElementSerializer.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenSerializer/TriggerInvocationExpressionSerializer.cs b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenSerializer/TriggerInvocationExpressionSerializer.cs index 2f7c20af..053d4334 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenSerializer/TriggerInvocationExpressionSerializer.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/AutoGenSerializer/TriggerInvocationExpressionSerializer.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/ExpectedClasses.cs b/SysML2.NET.CodeGenerator.Tests/Expected/ExpectedClasses.cs index 67041668..f493a74f 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/ExpectedClasses.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/ExpectedClasses.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,6 +40,7 @@ public IEnumerator GetEnumerator() yield return "Annotation"; yield return "Comment"; yield return "Connector"; + yield return "Definition"; yield return "Dependency"; yield return "Feature"; yield return "NamespaceImport"; @@ -76,6 +77,7 @@ public IEnumerator GetEnumerator() yield return "Annotation"; yield return "Comment"; yield return "Connector"; + yield return "Definition"; yield return "Dependency"; yield return "Element"; yield return "Feature"; diff --git a/SysML2.NET.CodeGenerator.Tests/Extensions/EcoreExtensionsTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Extensions/EcoreExtensionsTestFixture.cs index a4e10a08..6af4356e 100644 --- a/SysML2.NET.CodeGenerator.Tests/Extensions/EcoreExtensionsTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Extensions/EcoreExtensionsTestFixture.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ namespace SysML2.NET.CodeGenerator.Tests.Extensions { + using System; using System.Collections.Generic; using System.Linq; @@ -38,62 +39,6 @@ public void SetUp() this.ePackage = DataModelLoader.Load(); } - [Test] - public void Verify_that_QueryDocumentation_returns_expected_result() - { - var expected = new List - { - "A Usage is a usage of a Definition. A Usage may only be an ownedFeature of a Definition or another", - "Usage.A Usage may have nestedUsages that model features that apply in the context of the", - "owningUsage. A Usage may also have Definitions nested in it, but this has no semantic significance,", - "other than the nested scoping resulting from the Usage being considered as a Namespace for any", - "nested Definitions.However, if a Usage has isVariation = true, then it represents a variation point", - "Usage. In this case, all of its members must be variant Usages, related to the Usage by", - "VariantMembership Relationships. Rather than being features of the Usage, variant Usages model", - "different concrete alternatives that can be chosen to fill in for the variation point Usage.variant", - "= variantMembership.ownedVariantUsagevariantMembership =", - "ownedMembership->selectByKind(VariantMembership)not isVariation implies", - "variantMembership->isEmpty()isVariation implies variantMembership = ownedMembershipisReference = not", - "isCompositeowningVariationUsage <> null implies specializes(owningVariationUsage)isVariation", - "implies not ownedSpecialization.specific->exists(isVariation)owningVariationDefinition <> null", - "implies specializes(owningVariationDefinition)directedUsage =", - "directedFeature->selectByKind(Usage)nestedAction =", - "nestedUsage->selectByKind(ActionUsage)nestedAllocation =", - "nestedUsage->selectByKind(AllocationUsage)nestedAnalysisCase =", - "nestedUsage->selectByKind(AnalysisCaseUsage)nestedAttribute =", - "nestedUsage->selectByKind(AttributeUsage)nestedCalculation =", - "nestedUsage->selectByKind(CalculationUsage)nestedCase =", - "nestedUsage->selectByKind(CaseUsage)nestedConcern =", - "nestedUsage->selectByKind(ConcernUsage)nestedConnection =", - "nestedUsage->selectByKind(ConnectorAsUsage)nestedConstraint =", - "nestedUsage->selectByKind(ConstraintUsage)ownedNested =", - "nestedUsage->selectByKind(EnumerationUsage)nestedFlow =", - "nestedUsage->selectByKind(FlowUsage)nestedInterface =", - "nestedUsage->selectByKind(ReferenceUsage)nestedItem =", - "nestedUsage->selectByKind(ItemUsage)nestedMetadata =", - "nestedUsage->selectByKind(MetadataUsage)nestedOccurrence =", - "nestedUsage->selectByKind(OccurrenceUsage)nestedPart =", - "nestedUsage->selectByKind(PartUsage)nestedPort = nestedUsage->selectByKind(PortUsage)nestedReference", - "= nestedUsage->selectByKind(ReferenceUsage)nestedRendering =", - "nestedUsage->selectByKind(RenderingUsage)nestedRequirement =", - "nestedUsage->selectByKind(RequirementUsage)nestedState =", - "nestedUsage->selectByKind(StateUsage)nestedTransition =", - "nestedUsage->selectByKind(TransitionUsage)nestedUsage =", - "ownedFeature->selectByKind(Usage)nestedUseCase =", - "nestedUsage->selectByKind(UseCaseUsage)nestedVerificationCase =", - "nestedUsage->selectByKind(VerificationCaseUsage)nestedView =", - "nestedUsage->selectByKind(ViewUsage)nestedViewpoint = nestedUsage->selectByKind(ViewpointUsage)usage", - "= feature->selectByKind(Usage)owningType <> null implies (owningType.oclIsKindOf(Definition) or ", - "ownigType.oclIsKindOf(Usage))", - }; - - var eClass = this.ePackage.EClassifiers.OfType().Single(x => x.Name == "Usage"); - - var documentation = eClass.QueryDocumentation(); - - Assert.That(documentation, Is.EquivalentTo(expected)); - } - [Test] public void Verify_that_QueryDocumentation_gracefully_returns() { diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDalFactoryGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDalFactoryGeneratorTestFixture.cs index bb960d00..743738bd 100644 --- a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDalFactoryGeneratorTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDalFactoryGeneratorTestFixture.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDalPocoExtensionsGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDalPocoExtensionsGeneratorTestFixture.cs index c89bc30b..382605f1 100644 --- a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDalPocoExtensionsGeneratorTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDalPocoExtensionsGeneratorTestFixture.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryReaderGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryReaderGeneratorTestFixture.cs index 9a0bb3e5..5beaedc9 100644 --- a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryReaderGeneratorTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryReaderGeneratorTestFixture.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryWriterGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryWriterGeneratorTestFixture.cs index a3941433..8929df1a 100644 --- a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryWriterGeneratorTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryWriterGeneratorTestFixture.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDtoGeneratorTestGenerator.cs b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDtoGeneratorTestGenerator.cs index 3950993c..0bee0650 100644 --- a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDtoGeneratorTestGenerator.cs +++ b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreDtoGeneratorTestGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreEnumGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreEnumGeneratorTestFixture.cs index 7e0cb430..bcfa3a70 100644 --- a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreEnumGeneratorTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreEnumGeneratorTestFixture.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreGraphQLSchemaGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreGraphQLSchemaGeneratorTestFixture.cs index b799059f..ebedfb46 100644 --- a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreGraphQLSchemaGeneratorTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreGraphQLSchemaGeneratorTestFixture.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreJsonDtoDeSerializerGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreJsonDtoDeSerializerGeneratorTestFixture.cs index b9a7b000..2ba49573 100644 --- a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreJsonDtoDeSerializerGeneratorTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreJsonDtoDeSerializerGeneratorTestFixture.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreJsonDtoSerializerGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreJsonDtoSerializerGeneratorTestFixture.cs index 828ea5c9..6bc70a38 100644 --- a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreJsonDtoSerializerGeneratorTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CoreJsonDtoSerializerGeneratorTestFixture.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CorePocoGeneratorTestGenerator.cs b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CorePocoGeneratorTestGenerator.cs index d35f02bc..55a0c0de 100644 --- a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CorePocoGeneratorTestGenerator.cs +++ b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/CorePocoGeneratorTestGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/HtmlDocsGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/HtmlDocsGeneratorTestFixture.cs index 8092c061..363bad0a 100644 --- a/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/HtmlDocsGeneratorTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Generators/EcoreHandleBarsGenerators/HtmlDocsGeneratorTestFixture.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/OpenApiHandleBarsGenerators/DtoPsmRestGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/OpenApiHandleBarsGenerators/DtoPsmRestGeneratorTestFixture.cs index 86662893..ea0f3c37 100644 --- a/SysML2.NET.CodeGenerator.Tests/Generators/OpenApiHandleBarsGenerators/DtoPsmRestGeneratorTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Generators/OpenApiHandleBarsGenerators/DtoPsmRestGeneratorTestFixture.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/Inspector/ModelInspectorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Inspector/ModelInspectorTestFixture.cs index a847e419..aa7aa56d 100644 --- a/SysML2.NET.CodeGenerator.Tests/Inspector/ModelInspectorTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Inspector/ModelInspectorTestFixture.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj b/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj index 0df3fba1..c91b1c67 100644 --- a/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj +++ b/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj @@ -22,12 +22,14 @@ + + @@ -43,6 +45,7 @@ + @@ -55,6 +58,7 @@ + @@ -64,12 +68,14 @@ + + @@ -83,7 +89,9 @@ + + @@ -93,6 +101,7 @@ + @@ -110,6 +119,30 @@ Always + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + Always @@ -329,6 +362,9 @@ Always + + Always + Always diff --git a/SysML2.NET.CodeGenerator/DataModelLoader.cs b/SysML2.NET.CodeGenerator/DataModelLoader.cs index f89d7cfd..86e28eeb 100644 --- a/SysML2.NET.CodeGenerator/DataModelLoader.cs +++ b/SysML2.NET.CodeGenerator/DataModelLoader.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Extensions/EcoreExtensions.cs b/SysML2.NET.CodeGenerator/Extensions/EcoreExtensions.cs index 30fcc95b..0049154f 100644 --- a/SysML2.NET.CodeGenerator/Extensions/EcoreExtensions.cs +++ b/SysML2.NET.CodeGenerator/Extensions/EcoreExtensions.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Extensions/GenericExtensions.cs b/SysML2.NET.CodeGenerator/Extensions/GenericExtensions.cs index 754764b8..ecabd88d 100644 --- a/SysML2.NET.CodeGenerator/Extensions/GenericExtensions.cs +++ b/SysML2.NET.CodeGenerator/Extensions/GenericExtensions.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDalFactoryGenerator.cs b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDalFactoryGenerator.cs index aa5494ce..25811528 100644 --- a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDalFactoryGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDalFactoryGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDalPocoExtensionsGenerator.cs b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDalPocoExtensionsGenerator.cs index eb48f699..b1cc0906 100644 --- a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDalPocoExtensionsGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDalPocoExtensionsGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryReaderGenerator.cs b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryReaderGenerator.cs index ce89c07d..c4a84e29 100644 --- a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryReaderGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryReaderGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryWriterGenerator.cs b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryWriterGenerator.cs index 703caa95..7b1cff10 100644 --- a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryWriterGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDtoDictionaryWriterGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDtoGenerator.cs b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDtoGenerator.cs index 3f3aebc0..c3637b00 100644 --- a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDtoGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreDtoGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreEnumGenerator.cs b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreEnumGenerator.cs index c5f69244..94f1f3be 100644 --- a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreEnumGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreEnumGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreGraphQLSchemaGenerator.cs b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreGraphQLSchemaGenerator.cs index e776e35e..e580413b 100644 --- a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreGraphQLSchemaGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreGraphQLSchemaGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreJsonDtoDeSerializerGenerator.cs b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreJsonDtoDeSerializerGenerator.cs index a95caf64..51362274 100644 --- a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreJsonDtoDeSerializerGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreJsonDtoDeSerializerGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreJsonDtoSerializerGenerator.cs b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreJsonDtoSerializerGenerator.cs index aecbefae..72a840db 100644 --- a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreJsonDtoSerializerGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CoreJsonDtoSerializerGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CorePocoGenerator.cs b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CorePocoGenerator.cs index ba07da45..afe1af8e 100644 --- a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CorePocoGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/CorePocoGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/EcoreHandleBarsGenerator.cs b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/EcoreHandleBarsGenerator.cs index 0d0f0a5f..e16dbe2c 100644 --- a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/EcoreHandleBarsGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/EcoreHandleBarsGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/HtmlDocsGenerator.cs b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/HtmlDocsGenerator.cs index 79d2c727..57983777 100644 --- a/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/HtmlDocsGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/EcoreHandleBarsGenerators/HtmlDocsGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/GeneratorPayload.cs b/SysML2.NET.CodeGenerator/Generators/GeneratorPayload.cs index dcf23d73..b9684cd9 100644 --- a/SysML2.NET.CodeGenerator/Generators/GeneratorPayload.cs +++ b/SysML2.NET.CodeGenerator/Generators/GeneratorPayload.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/HandleBarsGenerator.cs b/SysML2.NET.CodeGenerator/Generators/HandleBarsGenerator.cs index 779f4123..354e8cc0 100644 --- a/SysML2.NET.CodeGenerator/Generators/HandleBarsGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/HandleBarsGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/OpenApiHandleBarsGenerators/DtoPsmRestGenerator.cs b/SysML2.NET.CodeGenerator/Generators/OpenApiHandleBarsGenerators/DtoPsmRestGenerator.cs index 5902316c..688ecf73 100644 --- a/SysML2.NET.CodeGenerator/Generators/OpenApiHandleBarsGenerators/DtoPsmRestGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/OpenApiHandleBarsGenerators/DtoPsmRestGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Generators/OpenApiHandleBarsGenerators/OpenApiGenerator.cs b/SysML2.NET.CodeGenerator/Generators/OpenApiHandleBarsGenerators/OpenApiGenerator.cs index 75554fa9..770f9b47 100644 --- a/SysML2.NET.CodeGenerator/Generators/OpenApiHandleBarsGenerators/OpenApiGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/OpenApiHandleBarsGenerators/OpenApiGenerator.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/DocumentationHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/DocumentationHelper.cs index 8dbd61e4..e2a1cbb9 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/DocumentationHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/DocumentationHelper.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/StructuralFeatureHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/StructuralFeatureHelper.cs index 19ef5b37..cd8948c7 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/StructuralFeatureHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/StructuralFeatureHelper.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/TypeNameHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/TypeNameHelper.cs index 4c08b1de..de3cf268 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/TypeNameHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/TypeNameHelper.cs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-dal-element-extensions.hbs b/SysML2.NET.CodeGenerator/Templates/core-dal-element-extensions.hbs index 392d7e2c..cc077636 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-dal-element-extensions.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-dal-element-extensions.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-dal-poco-extensions.hbs b/SysML2.NET.CodeGenerator/Templates/core-dal-poco-extensions.hbs index 56fa717a..4c190de2 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-dal-poco-extensions.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-dal-poco-extensions.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-reader-provider-template.hbs b/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-reader-provider-template.hbs index 5dd8c393..7009b85a 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-reader-provider-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-reader-provider-template.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-reader-template.hbs b/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-reader-template.hbs index 2dd3bf9d..1c4bc9c1 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-reader-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-reader-template.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-writer-provider-template.hbs b/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-writer-provider-template.hbs index c3953774..d6eb86bb 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-writer-provider-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-writer-provider-template.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-writer-template.hbs b/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-writer-template.hbs index 4f681b50..330b09b8 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-writer-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-dictionary-dto-serializer-writer-template.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-dto-class-template.hbs b/SysML2.NET.CodeGenerator/Templates/core-dto-class-template.hbs index 09872f0c..3fc71f24 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-dto-class-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-dto-class-template.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-dto-interface-template.hbs b/SysML2.NET.CodeGenerator/Templates/core-dto-interface-template.hbs index d10da5a0..2eead943 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-dto-interface-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-dto-interface-template.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-element-dal-factory.hbs b/SysML2.NET.CodeGenerator/Templates/core-element-dal-factory.hbs index b024704d..5570815b 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-element-dal-factory.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-element-dal-factory.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-enum-template.hbs b/SysML2.NET.CodeGenerator/Templates/core-enum-template.hbs index 8f32d732..7ec837e7 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-enum-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-enum-template.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-json-dto-deserialization-provider-template.hbs b/SysML2.NET.CodeGenerator/Templates/core-json-dto-deserialization-provider-template.hbs index 79933cd5..ab824c9d 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-json-dto-deserialization-provider-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-json-dto-deserialization-provider-template.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-json-dto-deserializer-template.hbs b/SysML2.NET.CodeGenerator/Templates/core-json-dto-deserializer-template.hbs index 8c2c0252..56d886a3 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-json-dto-deserializer-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-json-dto-deserializer-template.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-json-dto-serialization-provider-template.hbs b/SysML2.NET.CodeGenerator/Templates/core-json-dto-serialization-provider-template.hbs index 9b62736c..3e778e15 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-json-dto-serialization-provider-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-json-dto-serialization-provider-template.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-json-dto-serializer-template.hbs b/SysML2.NET.CodeGenerator/Templates/core-json-dto-serializer-template.hbs index 723af691..d140439f 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-json-dto-serializer-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-json-dto-serializer-template.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-json-enum-deserializer-template.hbs b/SysML2.NET.CodeGenerator/Templates/core-json-enum-deserializer-template.hbs index 7d921472..fec543d6 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-json-enum-deserializer-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-json-enum-deserializer-template.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-ogm-graphql-schema.hbs b/SysML2.NET.CodeGenerator/Templates/core-ogm-graphql-schema.hbs index 93909ed9..e1fb2d97 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-ogm-graphql-schema.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-ogm-graphql-schema.hbs @@ -1,5 +1,5 @@ """ - Copyright 2022-2023 RHEA System S.A. + Copyright 2022-2024 RHEA System S.A. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-poco-class-template.hbs b/SysML2.NET.CodeGenerator/Templates/core-poco-class-template.hbs index edb57bbf..05ecb2a3 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-poco-class-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-poco-class-template.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-poco-dal-factory.hbs b/SysML2.NET.CodeGenerator/Templates/core-poco-dal-factory.hbs index 9f121e40..4ad39ab9 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-poco-dal-factory.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-poco-dal-factory.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/core-poco-interface-template.hbs b/SysML2.NET.CodeGenerator/Templates/core-poco-interface-template.hbs index 1d64b435..2263ad9f 100644 --- a/SysML2.NET.CodeGenerator/Templates/core-poco-interface-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/core-poco-interface-template.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/dto-psm-rest-class-template.hbs b/SysML2.NET.CodeGenerator/Templates/dto-psm-rest-class-template.hbs index 1d64b435..2263ad9f 100644 --- a/SysML2.NET.CodeGenerator/Templates/dto-psm-rest-class-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/dto-psm-rest-class-template.hbs @@ -1,7 +1,7 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/ecore-to-dot.hbs b/SysML2.NET.CodeGenerator/Templates/ecore-to-dot.hbs index 6b82a731..7405e162 100644 --- a/SysML2.NET.CodeGenerator/Templates/ecore-to-dot.hbs +++ b/SysML2.NET.CodeGenerator/Templates/ecore-to-dot.hbs @@ -1,4 +1,4 @@ -// Copyright 2022-2023 RHEA System S.A. +// Copyright 2022-2024 RHEA System S.A. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/SysML2.NET.CodeGenerator/Templates/ecore-to-html-docs.hbs b/SysML2.NET.CodeGenerator/Templates/ecore-to-html-docs.hbs index a0c41a2a..cb4ecc9a 100644 --- a/SysML2.NET.CodeGenerator/Templates/ecore-to-html-docs.hbs +++ b/SysML2.NET.CodeGenerator/Templates/ecore-to-html-docs.hbs @@ -1,5 +1,5 @@