From 91e85cb6cf5168ea4e2b0ec208974c6f1c308ac4 Mon Sep 17 00:00:00 2001 From: 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 Date: Fri, 6 Aug 2021 14:24:22 +0200 Subject: [PATCH] Model version 1.3.17 and features Header versions update Wrong Participant Permission on Behavior More forgotten participant permissions for Behaviors Fixed interface for attachments and DAL handling of file verification Architecture Diagram must have own permission set to support Modify if owned Attachment finetuning (#203) * Add Path property to Attachment * Implement Attachment functionality * Version bump * Code review changes * Fix according to review Participant Role test and session fix (#204) * Participant Role test and session fix * Refactor CanCancel and Cancel using only thread safe methods ignore file updates Bumped version number Model version 1.3.17 Wrong Participant Permission on Behavior More forgotten participant permissions for Behaviors Architecture Diagram must have own permission set to support Modify if owned Version bump Bump versions Revert "Bumped version number" This reverts commit c7b101e991c1da3020237d6b8a3182d08d32dcd9. --- .gitignore | 2 +- .../Helpers/TypeResolverTestFixture.cs | 2 +- .../Poco/AttachmentTestFixture.cs | 55 ++ .../Poco/ParticipantRoleTestFixture.cs | 8 +- .../Helpers/TypeResolverTestFixture.cs | 2 +- .../Poco/AttachmentTestFixture.cs | 55 ++ .../Poco/ParticipantRoleTestFixture.cs | 14 +- CDP4Common/AutoGenDto/ArchitectureDiagram.cs | 180 ++++++ CDP4Common/AutoGenDto/ArchitectureElement.cs | 175 ++++++ CDP4Common/AutoGenDto/ArrayParameterType.cs | 11 + CDP4Common/AutoGenDto/Attachment.cs | 173 ++++++ CDP4Common/AutoGenDto/Behavior.cs | 229 +++++++ CDP4Common/AutoGenDto/BehavioralParameter.cs | 158 +++++ .../AutoGenDto/BinaryRelationshipRule.cs | 11 + CDP4Common/AutoGenDto/BooleanParameterType.cs | 11 + CDP4Common/AutoGenDto/Category.cs | 11 + .../AutoGenDto/CompoundParameterType.cs | 11 + CDP4Common/AutoGenDto/Constant.cs | 11 + CDP4Common/AutoGenDto/CyclicRatioScale.cs | 11 + CDP4Common/AutoGenDto/DateParameterType.cs | 11 + .../AutoGenDto/DateTimeParameterType.cs | 11 + CDP4Common/AutoGenDto/DecompositionRule.cs | 11 + CDP4Common/AutoGenDto/DefinedThing.cs | 10 + CDP4Common/AutoGenDto/DerivedQuantityKind.cs | 11 + CDP4Common/AutoGenDto/DerivedUnit.cs | 11 + CDP4Common/AutoGenDto/DiagramCanvas.cs | 22 +- CDP4Common/AutoGenDto/DiagramFrame.cs | 171 ++++++ CDP4Common/AutoGenDto/DiagramObject.cs | 6 +- CDP4Common/AutoGenDto/DiagramPort.cs | 171 ++++++ CDP4Common/AutoGenDto/DomainOfExpertise.cs | 11 + .../AutoGenDto/DomainOfExpertiseGroup.cs | 11 + CDP4Common/AutoGenDto/ElementDefinition.cs | 33 + CDP4Common/AutoGenDto/ElementUsage.cs | 11 + .../AutoGenDto/EngineeringModelSetup.cs | 11 + .../AutoGenDto/EnumerationParameterType.cs | 11 + .../AutoGenDto/EnumerationValueDefinition.cs | 11 + CDP4Common/AutoGenDto/FileType.cs | 11 + CDP4Common/AutoGenDto/Glossary.cs | 11 + CDP4Common/AutoGenDto/Goal.cs | 11 + CDP4Common/AutoGenDto/IntervalScale.cs | 11 + CDP4Common/AutoGenDto/LinearConversionUnit.cs | 11 + CDP4Common/AutoGenDto/LogarithmicScale.cs | 11 + .../AutoGenDto/ModelReferenceDataLibrary.cs | 11 + .../AutoGenDto/MultiRelationshipRule.cs | 11 + CDP4Common/AutoGenDto/Option.cs | 11 + CDP4Common/AutoGenDto/OrdinalScale.cs | 11 + .../AutoGenDto/ParameterizedCategoryRule.cs | 11 + CDP4Common/AutoGenDto/ParticipantRole.cs | 11 + CDP4Common/AutoGenDto/PersonRole.cs | 11 + CDP4Common/AutoGenDto/PossibleFiniteState.cs | 11 + .../AutoGenDto/PossibleFiniteStateList.cs | 11 + CDP4Common/AutoGenDto/PrefixedUnit.cs | 11 + CDP4Common/AutoGenDto/RatioScale.cs | 11 + CDP4Common/AutoGenDto/ReferenceSource.cs | 11 + CDP4Common/AutoGenDto/ReferencerRule.cs | 11 + CDP4Common/AutoGenDto/Requirement.cs | 11 + CDP4Common/AutoGenDto/RequirementsGroup.cs | 11 + .../AutoGenDto/RequirementsSpecification.cs | 11 + CDP4Common/AutoGenDto/RuleVerificationList.cs | 11 + .../SampledFunctionParameterType.cs | 11 + CDP4Common/AutoGenDto/ScaleValueDefinition.cs | 11 + CDP4Common/AutoGenDto/SimpleQuantityKind.cs | 11 + CDP4Common/AutoGenDto/SimpleUnit.cs | 11 + .../AutoGenDto/SiteReferenceDataLibrary.cs | 11 + .../AutoGenDto/SpecializedQuantityKind.cs | 11 + CDP4Common/AutoGenDto/StakeHolderValueMap.cs | 11 + CDP4Common/AutoGenDto/Stakeholder.cs | 11 + CDP4Common/AutoGenDto/StakeholderValue.cs | 11 + CDP4Common/AutoGenDto/Term.cs | 11 + CDP4Common/AutoGenDto/TextParameterType.cs | 11 + .../AutoGenDto/TimeOfDayParameterType.cs | 11 + CDP4Common/AutoGenDto/UnitPrefix.cs | 11 + CDP4Common/AutoGenDto/ValueGroup.cs | 11 + .../AutoGenHelpers/ContainerPropertyHelper.cs | 7 + .../DefaultPermissionProvider.cs | 28 + CDP4Common/AutoGenMetaInfo/AliasMetaInfo.cs | 1 + .../ArchitectureDiagramMetaInfo.cs | 544 +++++++++++++++++ .../ArchitectureElementMetaInfo.cs | 552 +++++++++++++++++ .../ArrayParameterTypeMetaInfo.cs | 5 + .../AutoGenMetaInfo/AttachmentMetaInfo.cs | 578 ++++++++++++++++++ .../AutoGenMetaInfo/BehaviorMetaInfo.cs | 553 +++++++++++++++++ .../BehavioralParameterMetaInfo.cs | 520 ++++++++++++++++ .../BinaryRelationshipRuleMetaInfo.cs | 5 + .../BooleanParameterTypeMetaInfo.cs | 5 + CDP4Common/AutoGenMetaInfo/BoundsMetaInfo.cs | 4 + .../AutoGenMetaInfo/CategoryMetaInfo.cs | 5 + .../CompoundParameterTypeMetaInfo.cs | 5 + .../AutoGenMetaInfo/ConstantMetaInfo.cs | 5 + .../ConversionBasedUnitMetaInfo.cs | 5 + .../CyclicRatioScaleMetaInfo.cs | 5 + .../DateParameterTypeMetaInfo.cs | 5 + .../DateTimeParameterTypeMetaInfo.cs | 5 + .../DecompositionRuleMetaInfo.cs | 5 + .../AutoGenMetaInfo/DefinedThingMetaInfo.cs | 5 + .../AutoGenMetaInfo/DefinitionMetaInfo.cs | 1 + .../DerivedQuantityKindMetaInfo.cs | 5 + .../AutoGenMetaInfo/DerivedUnitMetaInfo.cs | 5 + .../AutoGenMetaInfo/DiagramCanvasMetaInfo.cs | 7 + .../AutoGenMetaInfo/DiagramEdgeMetaInfo.cs | 4 + .../DiagramElementThingMetaInfo.cs | 4 + .../AutoGenMetaInfo/DiagramFrameMetaInfo.cs | 545 +++++++++++++++++ .../AutoGenMetaInfo/DiagramObjectMetaInfo.cs | 4 + .../AutoGenMetaInfo/DiagramPortMetaInfo.cs | 545 +++++++++++++++++ .../AutoGenMetaInfo/DiagramShapeMetaInfo.cs | 4 + .../DomainOfExpertiseGroupMetaInfo.cs | 5 + .../DomainOfExpertiseMetaInfo.cs | 5 + .../AutoGenMetaInfo/ElementBaseMetaInfo.cs | 5 + .../ElementDefinitionMetaInfo.cs | 11 + .../AutoGenMetaInfo/ElementUsageMetaInfo.cs | 5 + .../EngineeringModelSetupMetaInfo.cs | 5 + .../EnumerationParameterTypeMetaInfo.cs | 5 + .../EnumerationValueDefinitionMetaInfo.cs | 5 + .../AutoGenMetaInfo/FileTypeMetaInfo.cs | 5 + .../AutoGenMetaInfo/GlossaryMetaInfo.cs | 5 + CDP4Common/AutoGenMetaInfo/GoalMetaInfo.cs | 5 + .../AutoGenMetaInfo/HyperLinkMetaInfo.cs | 1 + .../IArchitectureDiagramMetaInfo.cs | 33 + .../IArchitectureElementMetaInfo.cs | 33 + .../AutoGenMetaInfo/IAttachmentMetaInfo.cs | 33 + .../AutoGenMetaInfo/IBehaviorMetaInfo.cs | 33 + .../IBehavioralParameterMetaInfo.cs | 33 + .../AutoGenMetaInfo/IDiagramFrameMetaInfo.cs | 33 + .../AutoGenMetaInfo/IDiagramPortMetaInfo.cs | 33 + .../AutoGenMetaInfo/IntervalScaleMetaInfo.cs | 5 + .../LinearConversionUnitMetaInfo.cs | 5 + .../LogarithmicScaleMetaInfo.cs | 5 + .../MeasurementScaleMetaInfo.cs | 5 + .../MeasurementUnitMetaInfo.cs | 5 + .../AutoGenMetaInfo/MetaDataProvider.cs | 7 + .../ModelReferenceDataLibraryMetaInfo.cs | 5 + .../MultiRelationshipRuleMetaInfo.cs | 5 + CDP4Common/AutoGenMetaInfo/OptionMetaInfo.cs | 5 + .../AutoGenMetaInfo/OrdinalScaleMetaInfo.cs | 5 + .../AutoGenMetaInfo/OwnedStyleMetaInfo.cs | 3 + .../AutoGenMetaInfo/ParameterTypeMetaInfo.cs | 5 + .../ParameterizedCategoryRuleMetaInfo.cs | 5 + .../ParticipantRoleMetaInfo.cs | 5 + .../AutoGenMetaInfo/PersonRoleMetaInfo.cs | 5 + .../PossibleFiniteStateListMetaInfo.cs | 5 + .../PossibleFiniteStateMetaInfo.cs | 5 + .../AutoGenMetaInfo/PrefixedUnitMetaInfo.cs | 5 + .../AutoGenMetaInfo/QuantityKindMetaInfo.cs | 5 + .../AutoGenMetaInfo/RatioScaleMetaInfo.cs | 5 + .../ReferenceDataLibraryMetaInfo.cs | 5 + .../ReferenceSourceMetaInfo.cs | 5 + .../AutoGenMetaInfo/ReferencerRuleMetaInfo.cs | 5 + .../AutoGenMetaInfo/RequirementMetaInfo.cs | 5 + .../RequirementsContainerMetaInfo.cs | 5 + .../RequirementsGroupMetaInfo.cs | 5 + .../RequirementsSpecificationMetaInfo.cs | 5 + CDP4Common/AutoGenMetaInfo/RuleMetaInfo.cs | 5 + .../RuleVerificationListMetaInfo.cs | 5 + .../SampledFunctionParameterTypeMetaInfo.cs | 5 + .../ScalarParameterTypeMetaInfo.cs | 5 + .../ScaleValueDefinitionMetaInfo.cs | 5 + .../SimpleParameterizableThingMetaInfo.cs | 5 + .../SimpleQuantityKindMetaInfo.cs | 5 + .../AutoGenMetaInfo/SimpleUnitMetaInfo.cs | 5 + .../SiteReferenceDataLibraryMetaInfo.cs | 5 + .../SpecializedQuantityKindMetaInfo.cs | 5 + .../StakeHolderValueMapMetaInfo.cs | 5 + .../AutoGenMetaInfo/StakeholderMetaInfo.cs | 5 + .../StakeholderValueMetaInfo.cs | 5 + CDP4Common/AutoGenMetaInfo/TermMetaInfo.cs | 5 + .../TextParameterTypeMetaInfo.cs | 5 + .../TimeOfDayParameterTypeMetaInfo.cs | 5 + .../AutoGenMetaInfo/UnitPrefixMetaInfo.cs | 5 + .../AutoGenMetaInfo/ValueGroupMetaInfo.cs | 5 + CDP4Common/AutoGenPoco/ArchitectureDiagram.cs | 251 ++++++++ CDP4Common/AutoGenPoco/ArchitectureElement.cs | 199 ++++++ CDP4Common/AutoGenPoco/ArrayParameterType.cs | 4 + CDP4Common/AutoGenPoco/Attachment.cs | 253 ++++++++ CDP4Common/AutoGenPoco/Behavior.cs | 247 ++++++++ CDP4Common/AutoGenPoco/BehavioralModelKind.cs | 57 ++ CDP4Common/AutoGenPoco/BehavioralParameter.cs | 245 ++++++++ .../AutoGenPoco/BehavioralParameterKind.cs | 42 ++ .../AutoGenPoco/BinaryRelationshipRule.cs | 4 + .../AutoGenPoco/BooleanParameterType.cs | 4 + CDP4Common/AutoGenPoco/Category.cs | 4 + CDP4Common/AutoGenPoco/ClassKind.cs | 35 ++ .../AutoGenPoco/CompoundParameterType.cs | 4 + CDP4Common/AutoGenPoco/Constant.cs | 4 + CDP4Common/AutoGenPoco/CyclicRatioScale.cs | 4 + CDP4Common/AutoGenPoco/DateParameterType.cs | 4 + .../AutoGenPoco/DateTimeParameterType.cs | 4 + CDP4Common/AutoGenPoco/DecompositionRule.cs | 4 + CDP4Common/AutoGenPoco/DefinedThing.cs | 12 + CDP4Common/AutoGenPoco/DerivedQuantityKind.cs | 4 + CDP4Common/AutoGenPoco/DerivedUnit.cs | 4 + CDP4Common/AutoGenPoco/DiagramCanvas.cs | 30 +- CDP4Common/AutoGenPoco/DiagramFrame.cs | 195 ++++++ CDP4Common/AutoGenPoco/DiagramObject.cs | 6 +- CDP4Common/AutoGenPoco/DiagramPort.cs | 195 ++++++ CDP4Common/AutoGenPoco/DomainOfExpertise.cs | 4 + .../AutoGenPoco/DomainOfExpertiseGroup.cs | 4 + CDP4Common/AutoGenPoco/ElementDefinition.cs | 20 + CDP4Common/AutoGenPoco/ElementUsage.cs | 4 + .../AutoGenPoco/EngineeringModelSetup.cs | 4 + .../AutoGenPoco/EnumerationParameterType.cs | 4 + .../AutoGenPoco/EnumerationValueDefinition.cs | 4 + CDP4Common/AutoGenPoco/FileType.cs | 4 + CDP4Common/AutoGenPoco/Glossary.cs | 4 + CDP4Common/AutoGenPoco/Goal.cs | 4 + CDP4Common/AutoGenPoco/IntervalScale.cs | 4 + .../AutoGenPoco/LinearConversionUnit.cs | 4 + CDP4Common/AutoGenPoco/LogarithmicScale.cs | 4 + .../AutoGenPoco/ModelReferenceDataLibrary.cs | 4 + .../AutoGenPoco/MultiRelationshipRule.cs | 4 + CDP4Common/AutoGenPoco/Option.cs | 4 + CDP4Common/AutoGenPoco/OrdinalScale.cs | 4 + .../AutoGenPoco/ParameterizedCategoryRule.cs | 4 + CDP4Common/AutoGenPoco/ParticipantRole.cs | 4 + CDP4Common/AutoGenPoco/PersonRole.cs | 4 + CDP4Common/AutoGenPoco/PossibleFiniteState.cs | 4 + .../AutoGenPoco/PossibleFiniteStateList.cs | 4 + CDP4Common/AutoGenPoco/PrefixedUnit.cs | 4 + CDP4Common/AutoGenPoco/PublicationState.cs | 47 ++ CDP4Common/AutoGenPoco/RatioScale.cs | 4 + CDP4Common/AutoGenPoco/ReferenceSource.cs | 4 + CDP4Common/AutoGenPoco/ReferencerRule.cs | 4 + CDP4Common/AutoGenPoco/Requirement.cs | 4 + CDP4Common/AutoGenPoco/RequirementsGroup.cs | 4 + .../AutoGenPoco/RequirementsSpecification.cs | 4 + .../AutoGenPoco/RuleVerificationList.cs | 4 + .../SampledFunctionParameterType.cs | 4 + .../AutoGenPoco/ScaleValueDefinition.cs | 4 + CDP4Common/AutoGenPoco/SimpleQuantityKind.cs | 4 + CDP4Common/AutoGenPoco/SimpleUnit.cs | 4 + .../AutoGenPoco/SiteReferenceDataLibrary.cs | 4 + .../AutoGenPoco/SpecializedQuantityKind.cs | 4 + CDP4Common/AutoGenPoco/StakeHolderValueMap.cs | 4 + CDP4Common/AutoGenPoco/Stakeholder.cs | 4 + CDP4Common/AutoGenPoco/StakeholderValue.cs | 4 + CDP4Common/AutoGenPoco/Term.cs | 4 + CDP4Common/AutoGenPoco/TextParameterType.cs | 4 + .../AutoGenPoco/TimeOfDayParameterType.cs | 4 + CDP4Common/AutoGenPoco/UnitPrefix.cs | 4 + CDP4Common/AutoGenPoco/ValueGroup.cs | 4 + .../AutoGenSentinel/SentinelThingProvider.cs | 2 +- CDP4Common/Dto/Attachment.cs | 38 ++ CDP4Common/Dto/FileRevision.cs | 38 ++ CDP4Common/Dto/ILocalFile.cs | 42 ++ CDP4Common/{Poco => }/ILocalFile.cs | 98 +-- CDP4Common/Poco/Attachment.cs | 72 +++ CDP4Dal/CDP4Dal.csproj | 2 +- CDP4Dal/DAL/Dal.cs | 3 +- CDP4Dal/Operations/ThingTransaction.cs | 6 +- CDP4Dal/Session.cs | 18 +- CDP4JsonFileDal/CDP4JsonFileDal.csproj | 2 +- .../TestData/jsonTestSample.json | 2 + .../TestData/jsonTestSample.json | 2 + .../ArchitectureDiagramResolver.cs | 118 ++++ .../ArchitectureElementResolver.cs | 118 ++++ .../ArrayParameterTypeResolver.cs | 5 + .../AttachmentResolver.cs | 93 +++ .../BehaviorResolver.cs | 123 ++++ .../BehavioralParameterResolver.cs | 93 +++ .../BinaryRelationshipRuleResolver.cs | 5 + .../BooleanParameterTypeResolver.cs | 5 + .../CategoryResolver.cs | 5 + .../CompoundParameterTypeResolver.cs | 5 + .../ConstantResolver.cs | 5 + .../CyclicRatioScaleResolver.cs | 5 + .../DateParameterTypeResolver.cs | 5 + .../DateTimeParameterTypeResolver.cs | 5 + .../DecompositionRuleResolver.cs | 5 + .../DerivedQuantityKindResolver.cs | 5 + .../DerivedUnitResolver.cs | 5 + .../DiagramCanvasResolver.cs | 10 + .../DiagramFrameResolver.cs | 108 ++++ .../DiagramPortResolver.cs | 108 ++++ .../DomainOfExpertiseGroupResolver.cs | 5 + .../DomainOfExpertiseResolver.cs | 5 + .../AutoGenDtoDeserializer/DtoFactory.cs | 7 + .../ElementDefinitionResolver.cs | 10 + .../ElementUsageResolver.cs | 5 + .../EngineeringModelSetupResolver.cs | 5 + .../EnumerationParameterTypeResolver.cs | 5 + .../EnumerationValueDefinitionResolver.cs | 5 + .../FileTypeResolver.cs | 5 + .../GlossaryResolver.cs | 5 + .../AutoGenDtoDeserializer/GoalResolver.cs | 5 + .../IntervalScaleResolver.cs | 5 + .../LinearConversionUnitResolver.cs | 5 + .../LogarithmicScaleResolver.cs | 5 + .../ModelReferenceDataLibraryResolver.cs | 5 + .../MultiRelationshipRuleResolver.cs | 5 + .../AutoGenDtoDeserializer/OptionResolver.cs | 5 + .../OrdinalScaleResolver.cs | 5 + .../ParameterizedCategoryRuleResolver.cs | 5 + .../ParticipantRoleResolver.cs | 5 + .../PersonRoleResolver.cs | 5 + .../PossibleFiniteStateListResolver.cs | 5 + .../PossibleFiniteStateResolver.cs | 5 + .../PrefixedUnitResolver.cs | 5 + .../RatioScaleResolver.cs | 5 + .../ReferenceSourceResolver.cs | 5 + .../ReferencerRuleResolver.cs | 5 + .../RequirementResolver.cs | 5 + .../RequirementsGroupResolver.cs | 5 + .../RequirementsSpecificationResolver.cs | 5 + .../RuleVerificationListResolver.cs | 5 + .../SampledFunctionParameterTypeResolver.cs | 5 + .../ScaleValueDefinitionResolver.cs | 5 + .../SimpleQuantityKindResolver.cs | 5 + .../SimpleUnitResolver.cs | 5 + .../SiteReferenceDataLibraryResolver.cs | 5 + .../SpecializedQuantityKindResolver.cs | 5 + .../StakeHolderValueMapResolver.cs | 5 + .../StakeholderResolver.cs | 5 + .../StakeholderValueResolver.cs | 5 + .../AutoGenDtoDeserializer/TermResolver.cs | 5 + .../TextParameterTypeResolver.cs | 5 + .../TimeOfDayParameterTypeResolver.cs | 5 + .../UnitPrefixResolver.cs | 5 + .../ValueGroupResolver.cs | 5 + .../ArchitectureDiagramSerializer.cs | 117 ++++ .../ArchitectureElementSerializer.cs | 117 ++++ .../ArrayParameterTypeSerializer.cs | 2 + .../AttachmentSerializer.cs | 107 ++++ .../BehaviorSerializer.cs | 119 ++++ .../BehavioralParameterSerializer.cs | 107 ++++ .../BinaryRelationshipRuleSerializer.cs | 2 + .../BooleanParameterTypeSerializer.cs | 2 + .../CategorySerializer.cs | 2 + .../CompoundParameterTypeSerializer.cs | 2 + .../ConstantSerializer.cs | 2 + .../CyclicRatioScaleSerializer.cs | 2 + .../DateParameterTypeSerializer.cs | 2 + .../DateTimeParameterTypeSerializer.cs | 2 + .../DecompositionRuleSerializer.cs | 2 + .../DerivedQuantityKindSerializer.cs | 2 + .../DerivedUnitSerializer.cs | 2 + .../DiagramCanvasSerializer.cs | 4 + .../DiagramFrameSerializer.cs | 113 ++++ .../DiagramPortSerializer.cs | 113 ++++ .../DomainOfExpertiseGroupSerializer.cs | 2 + .../DomainOfExpertiseSerializer.cs | 2 + .../ElementDefinitionSerializer.cs | 4 + .../ElementUsageSerializer.cs | 2 + .../EngineeringModelSetupSerializer.cs | 2 + .../EnumerationParameterTypeSerializer.cs | 2 + .../EnumerationValueDefinitionSerializer.cs | 2 + .../FileTypeSerializer.cs | 2 + .../GlossarySerializer.cs | 2 + .../AutoGenDtoSerializer/GoalSerializer.cs | 2 + .../IntervalScaleSerializer.cs | 2 + .../LinearConversionUnitSerializer.cs | 2 + .../LogarithmicScaleSerializer.cs | 2 + .../ModelReferenceDataLibrarySerializer.cs | 2 + .../MultiRelationshipRuleSerializer.cs | 2 + .../AutoGenDtoSerializer/OptionSerializer.cs | 2 + .../OrdinalScaleSerializer.cs | 2 + .../ParameterizedCategoryRuleSerializer.cs | 2 + .../ParticipantRoleSerializer.cs | 2 + .../PersonRoleSerializer.cs | 2 + .../PossibleFiniteStateListSerializer.cs | 2 + .../PossibleFiniteStateSerializer.cs | 2 + .../PrefixedUnitSerializer.cs | 2 + .../RatioScaleSerializer.cs | 2 + .../ReferenceSourceSerializer.cs | 2 + .../ReferencerRuleSerializer.cs | 2 + .../RequirementSerializer.cs | 2 + .../RequirementsGroupSerializer.cs | 2 + .../RequirementsSpecificationSerializer.cs | 2 + .../RuleVerificationListSerializer.cs | 2 + .../SampledFunctionParameterTypeSerializer.cs | 2 + .../ScaleValueDefinitionSerializer.cs | 2 + .../SerializerProvider.cs | 7 + .../SimpleQuantityKindSerializer.cs | 2 + .../SimpleUnitSerializer.cs | 2 + .../SiteReferenceDataLibrarySerializer.cs | 2 + .../SpecializedQuantityKindSerializer.cs | 2 + .../StakeHolderValueMapSerializer.cs | 2 + .../StakeholderSerializer.cs | 2 + .../StakeholderValueSerializer.cs | 2 + .../AutoGenDtoSerializer/TermSerializer.cs | 2 + .../TextParameterTypeSerializer.cs | 2 + .../TimeOfDayParameterTypeSerializer.cs | 2 + .../UnitPrefixSerializer.cs | 2 + .../ValueGroupSerializer.cs | 2 + CDP4JsonSerializer/CDP4JsonSerializer.csproj | 2 +- CDP4Rules/CDP4Rules.csproj | 2 +- CDP4ServicesDal/CDP4ServicesDal.csproj | 2 +- CDP4ServicesDal/CdpServicesDal.cs | 2 +- CDP4ServicesDal/Headers.cs | 2 +- CDP4WspDal/CDP4WspDal.csproj | 2 +- 387 files changed, 10839 insertions(+), 93 deletions(-) create mode 100644 CDP4Common.NetCore.Tests/Poco/AttachmentTestFixture.cs create mode 100644 CDP4Common.Tests/Poco/AttachmentTestFixture.cs create mode 100644 CDP4Common/AutoGenDto/ArchitectureDiagram.cs create mode 100644 CDP4Common/AutoGenDto/ArchitectureElement.cs create mode 100644 CDP4Common/AutoGenDto/Attachment.cs create mode 100644 CDP4Common/AutoGenDto/Behavior.cs create mode 100644 CDP4Common/AutoGenDto/BehavioralParameter.cs create mode 100644 CDP4Common/AutoGenDto/DiagramFrame.cs create mode 100644 CDP4Common/AutoGenDto/DiagramPort.cs create mode 100644 CDP4Common/AutoGenMetaInfo/ArchitectureDiagramMetaInfo.cs create mode 100644 CDP4Common/AutoGenMetaInfo/ArchitectureElementMetaInfo.cs create mode 100644 CDP4Common/AutoGenMetaInfo/AttachmentMetaInfo.cs create mode 100644 CDP4Common/AutoGenMetaInfo/BehaviorMetaInfo.cs create mode 100644 CDP4Common/AutoGenMetaInfo/BehavioralParameterMetaInfo.cs create mode 100644 CDP4Common/AutoGenMetaInfo/DiagramFrameMetaInfo.cs create mode 100644 CDP4Common/AutoGenMetaInfo/DiagramPortMetaInfo.cs create mode 100644 CDP4Common/AutoGenMetaInfo/IArchitectureDiagramMetaInfo.cs create mode 100644 CDP4Common/AutoGenMetaInfo/IArchitectureElementMetaInfo.cs create mode 100644 CDP4Common/AutoGenMetaInfo/IAttachmentMetaInfo.cs create mode 100644 CDP4Common/AutoGenMetaInfo/IBehaviorMetaInfo.cs create mode 100644 CDP4Common/AutoGenMetaInfo/IBehavioralParameterMetaInfo.cs create mode 100644 CDP4Common/AutoGenMetaInfo/IDiagramFrameMetaInfo.cs create mode 100644 CDP4Common/AutoGenMetaInfo/IDiagramPortMetaInfo.cs create mode 100644 CDP4Common/AutoGenPoco/ArchitectureDiagram.cs create mode 100644 CDP4Common/AutoGenPoco/ArchitectureElement.cs create mode 100644 CDP4Common/AutoGenPoco/Attachment.cs create mode 100644 CDP4Common/AutoGenPoco/Behavior.cs create mode 100644 CDP4Common/AutoGenPoco/BehavioralModelKind.cs create mode 100644 CDP4Common/AutoGenPoco/BehavioralParameter.cs create mode 100644 CDP4Common/AutoGenPoco/BehavioralParameterKind.cs create mode 100644 CDP4Common/AutoGenPoco/DiagramFrame.cs create mode 100644 CDP4Common/AutoGenPoco/DiagramPort.cs create mode 100644 CDP4Common/AutoGenPoco/PublicationState.cs create mode 100644 CDP4Common/Dto/Attachment.cs create mode 100644 CDP4Common/Dto/FileRevision.cs create mode 100644 CDP4Common/Dto/ILocalFile.cs rename CDP4Common/{Poco => }/ILocalFile.cs (98%) create mode 100644 CDP4Common/Poco/Attachment.cs create mode 100644 CDP4JsonSerializer/AutoGenDtoDeserializer/ArchitectureDiagramResolver.cs create mode 100644 CDP4JsonSerializer/AutoGenDtoDeserializer/ArchitectureElementResolver.cs create mode 100644 CDP4JsonSerializer/AutoGenDtoDeserializer/AttachmentResolver.cs create mode 100644 CDP4JsonSerializer/AutoGenDtoDeserializer/BehaviorResolver.cs create mode 100644 CDP4JsonSerializer/AutoGenDtoDeserializer/BehavioralParameterResolver.cs create mode 100644 CDP4JsonSerializer/AutoGenDtoDeserializer/DiagramFrameResolver.cs create mode 100644 CDP4JsonSerializer/AutoGenDtoDeserializer/DiagramPortResolver.cs create mode 100644 CDP4JsonSerializer/AutoGenDtoSerializer/ArchitectureDiagramSerializer.cs create mode 100644 CDP4JsonSerializer/AutoGenDtoSerializer/ArchitectureElementSerializer.cs create mode 100644 CDP4JsonSerializer/AutoGenDtoSerializer/AttachmentSerializer.cs create mode 100644 CDP4JsonSerializer/AutoGenDtoSerializer/BehaviorSerializer.cs create mode 100644 CDP4JsonSerializer/AutoGenDtoSerializer/BehavioralParameterSerializer.cs create mode 100644 CDP4JsonSerializer/AutoGenDtoSerializer/DiagramFrameSerializer.cs create mode 100644 CDP4JsonSerializer/AutoGenDtoSerializer/DiagramPortSerializer.cs diff --git a/.gitignore b/.gitignore index c0dd0fe33..c9a7a6e2d 100644 --- a/.gitignore +++ b/.gitignore @@ -286,4 +286,4 @@ __pycache__/ *.btm.cs *.odx.cs *.xsd.cs -/*/*.orig +/**/*.orig diff --git a/CDP4Common.NetCore.Tests/Helpers/TypeResolverTestFixture.cs b/CDP4Common.NetCore.Tests/Helpers/TypeResolverTestFixture.cs index 9f1f5d3ad..09693c6d7 100644 --- a/CDP4Common.NetCore.Tests/Helpers/TypeResolverTestFixture.cs +++ b/CDP4Common.NetCore.Tests/Helpers/TypeResolverTestFixture.cs @@ -49,7 +49,7 @@ public void Verify_that_GetDerivedTypes_returns_expected_results() var subtypes = TypeResolver.GetDerivedTypes(subjectType, assembly).ToList(); - Assert.That(subtypes.Count, Is.EqualTo(67)); + Assert.That(subtypes.Count, Is.EqualTo(68)); } [Test] diff --git a/CDP4Common.NetCore.Tests/Poco/AttachmentTestFixture.cs b/CDP4Common.NetCore.Tests/Poco/AttachmentTestFixture.cs new file mode 100644 index 000000000..a483a6720 --- /dev/null +++ b/CDP4Common.NetCore.Tests/Poco/AttachmentTestFixture.cs @@ -0,0 +1,55 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft +// +// This file is part of CDP4-SDK Community Edition +// +// The CDP4-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.Tests.Poco +{ + using System; + + using CDP4Common.EngineeringModelData; + using CDP4Common.SiteDirectoryData; + + using NUnit.Framework; + + [TestFixture] + internal class AttachmentTestFixture + { + private Attachment attachment; + + [SetUp] + public void Setup() + { + this.attachment = new Attachment(Guid.NewGuid(), null, null); + this.attachment.FileName = "filerev"; + + this.attachment.FileType.Add(new FileType(Guid.NewGuid(), null, null) { Extension = "ext1" }); + this.attachment.FileType.Add(new FileType(Guid.NewGuid(), null, null) { Extension = "ext2" }); + } + + [Test] + public void VerifyPathForFileRevisionLocatedInFileStore() + { + Assert.AreEqual("filerev.ext1.ext2", this.attachment.Path); + } + } +} \ No newline at end of file diff --git a/CDP4Common.NetCore.Tests/Poco/ParticipantRoleTestFixture.cs b/CDP4Common.NetCore.Tests/Poco/ParticipantRoleTestFixture.cs index 37bdfba56..f41b1e994 100644 --- a/CDP4Common.NetCore.Tests/Poco/ParticipantRoleTestFixture.cs +++ b/CDP4Common.NetCore.Tests/Poco/ParticipantRoleTestFixture.cs @@ -1,8 +1,8 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2020 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. // -// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Patxi Ozkoidi, Alexander van Delft, Nathanael Smiechowski, Ahmed Ahmed, Simon Wood // // This file is part of CDP4-SDK Community Edition // @@ -38,8 +38,8 @@ internal class ParticipantRoleTestFixture public void VerifyPopulateParticipantPermissions() { var participantRole = new ParticipantRole(); - Assert.AreEqual(48, participantRole.ParticipantPermission.Count); + Assert.AreEqual(49, participantRole.ParticipantPermission.Count); Assert.IsTrue(participantRole.ParticipantPermission.All(x => x.AccessRight == ParticipantAccessRightKind.NONE)); } } -} \ No newline at end of file +} diff --git a/CDP4Common.Tests/Helpers/TypeResolverTestFixture.cs b/CDP4Common.Tests/Helpers/TypeResolverTestFixture.cs index ca31985f3..2c45f74ec 100644 --- a/CDP4Common.Tests/Helpers/TypeResolverTestFixture.cs +++ b/CDP4Common.Tests/Helpers/TypeResolverTestFixture.cs @@ -47,7 +47,7 @@ public void Verify_that_GetDerivedTypes_returns_expected_results() var subtypes = TypeResolver.GetDerivedTypes(subjectType, assembly).ToList(); - Assert.That(subtypes.Count, Is.EqualTo(67)); + Assert.That(subtypes.Count, Is.EqualTo(68)); } [Test] diff --git a/CDP4Common.Tests/Poco/AttachmentTestFixture.cs b/CDP4Common.Tests/Poco/AttachmentTestFixture.cs new file mode 100644 index 000000000..a483a6720 --- /dev/null +++ b/CDP4Common.Tests/Poco/AttachmentTestFixture.cs @@ -0,0 +1,55 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft +// +// This file is part of CDP4-SDK Community Edition +// +// The CDP4-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.Tests.Poco +{ + using System; + + using CDP4Common.EngineeringModelData; + using CDP4Common.SiteDirectoryData; + + using NUnit.Framework; + + [TestFixture] + internal class AttachmentTestFixture + { + private Attachment attachment; + + [SetUp] + public void Setup() + { + this.attachment = new Attachment(Guid.NewGuid(), null, null); + this.attachment.FileName = "filerev"; + + this.attachment.FileType.Add(new FileType(Guid.NewGuid(), null, null) { Extension = "ext1" }); + this.attachment.FileType.Add(new FileType(Guid.NewGuid(), null, null) { Extension = "ext2" }); + } + + [Test] + public void VerifyPathForFileRevisionLocatedInFileStore() + { + Assert.AreEqual("filerev.ext1.ext2", this.attachment.Path); + } + } +} \ No newline at end of file diff --git a/CDP4Common.Tests/Poco/ParticipantRoleTestFixture.cs b/CDP4Common.Tests/Poco/ParticipantRoleTestFixture.cs index d6ee89010..76a8c9c01 100644 --- a/CDP4Common.Tests/Poco/ParticipantRoleTestFixture.cs +++ b/CDP4Common.Tests/Poco/ParticipantRoleTestFixture.cs @@ -1,9 +1,8 @@ -#region Copyright -// -------------------------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright (c) 2015-2019 RHEA System S.A. +// Copyright (c) 2015-2021 RHEA System S.A. // -// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Patxi Ozkoidi, Alexander van Delft, Nathanael Smiechowski, Ahmed Ahmed, Simon Wood // // This file is part of CDP4-SDK Community Edition // @@ -22,13 +21,14 @@ // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // // -------------------------------------------------------------------------------------------------------------------- -#endregion namespace CDP4Common.Tests.Poco { using System.Linq; + using CDP4Common.CommonData; using CDP4Common.SiteDirectoryData; + using NUnit.Framework; [TestFixture] @@ -38,8 +38,8 @@ internal class ParticipantRoleTestFixture public void VerifyPopulateParticipantPermissions() { var participantRole = new ParticipantRole(); - Assert.AreEqual(48, participantRole.ParticipantPermission.Count); + Assert.AreEqual(49, participantRole.ParticipantPermission.Count); Assert.IsTrue(participantRole.ParticipantPermission.All(x => x.AccessRight == ParticipantAccessRightKind.NONE)); } } -} \ No newline at end of file +} diff --git a/CDP4Common/AutoGenDto/ArchitectureDiagram.cs b/CDP4Common/AutoGenDto/ArchitectureDiagram.cs new file mode 100644 index 000000000..2f7d5c789 --- /dev/null +++ b/CDP4Common/AutoGenDto/ArchitectureDiagram.cs @@ -0,0 +1,180 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.DTO +{ + using System; + using System.Collections; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.Linq; + using System.Runtime.Serialization; + using System.Xml.Serialization; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + + /// + /// A Data Transfer Object representation of the class. + /// + [DataContract] + [CDPVersion("1.3.0")] + [Container(typeof(Iteration), "DiagramCanvas")] + public sealed partial class ArchitectureDiagram : DiagramCanvas, IOwnedThing + { + /// + /// Initializes a new instance of the class. + /// + public ArchitectureDiagram() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier. + /// + /// + /// The revision number. + /// + public ArchitectureDiagram(Guid iid, int rev) : base(iid: iid, rev: rev) + { + } + + /// + /// Gets or sets the unique identifier of the referenced Owner. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + [DataMember] + public Guid Owner { get; set; } + + /// + /// Gets or sets the unique identifier of the referenced TopArchitectureElement. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: true, isPersistent: true)] + [DataMember] + public Guid? TopArchitectureElement { get; set; } + + /// + /// Gets the route for the current . + /// + public override string Route + { + get { return this.ComputedRoute(); } + } + + /// + /// Instantiate a from a + /// + /// The cache that stores all the s. + /// The of the . + /// A new + public override CommonData.Thing InstantiatePoco(ConcurrentDictionary> cache, Uri uri) + { + return new CDP4Common.DiagramData.ArchitectureDiagram(this.Iid, cache, uri); + } + + /// + /// Resolves the properties of a copied based on the original and a collection of copied . + /// + /// The original . + /// The map containig all instance of copied s with their original. + public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary originalCopyMap) + { + var original = originalThing as ArchitectureDiagram; + if (original == null) + { + throw new InvalidOperationException("The originalThing cannot be null or is of the incorrect type"); + } + + foreach (var guid in original.Bounds) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Bounds.Add(copy.Value.Iid); + } + + this.CreatedOn = original.CreatedOn; + + this.Description = original.Description; + + foreach (var guid in original.DiagramElement) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.DiagramElement.Add(copy.Value.Iid); + } + + foreach (var guid in original.ExcludedDomain) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + this.ExcludedDomain.Add(copy.Value == null ? guid : copy.Value.Iid); + } + + foreach (var guid in original.ExcludedPerson) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + this.ExcludedPerson.Add(copy.Value == null ? guid : copy.Value.Iid); + } + + this.ModifiedOn = original.ModifiedOn; + + this.Name = original.Name; + + var copyOwner = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == original.Owner); + this.Owner = copyOwner.Value == null ? original.Owner : copyOwner.Value.Iid; + + this.PublicationState = original.PublicationState; + + this.ThingPreference = original.ThingPreference; + + var copyTopArchitectureElement = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == original.TopArchitectureElement); + this.TopArchitectureElement = copyTopArchitectureElement.Value == null ? original.TopArchitectureElement : copyTopArchitectureElement.Value.Iid; + } + + /// + /// Resolves the references of a copied based on a original to copy map. + /// + /// The map containig all instance of copied s with their original. + /// True if a modification was done in the process of this method. + public override bool ResolveCopyReference(IReadOnlyDictionary originalCopyMap) + { + var hasChanges = false; + + return hasChanges; + } + } +} diff --git a/CDP4Common/AutoGenDto/ArchitectureElement.cs b/CDP4Common/AutoGenDto/ArchitectureElement.cs new file mode 100644 index 000000000..02caf111b --- /dev/null +++ b/CDP4Common/AutoGenDto/ArchitectureElement.cs @@ -0,0 +1,175 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.DTO +{ + using System; + using System.Collections; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.Linq; + using System.Runtime.Serialization; + using System.Xml.Serialization; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + + /// + /// A Data Transfer Object representation of the class. + /// + [DataContract] + [CDPVersion("1.3.0")] + [Container(typeof(DiagramElementContainer), "DiagramElement")] + public sealed partial class ArchitectureElement : DiagramObject + { + /// + /// Initializes a new instance of the class. + /// + public ArchitectureElement() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier. + /// + /// + /// The revision number. + /// + public ArchitectureElement(Guid iid, int rev) : base(iid: iid, rev: rev) + { + } + + /// + /// Gets the route for the current . + /// + public override string Route + { + get { return this.ComputedRoute(); } + } + + /// + /// Instantiate a from a + /// + /// The cache that stores all the s. + /// The of the . + /// A new + public override CommonData.Thing InstantiatePoco(ConcurrentDictionary> cache, Uri uri) + { + return new CDP4Common.DiagramData.ArchitectureElement(this.Iid, cache, uri); + } + + /// + /// Resolves the properties of a copied based on the original and a collection of copied . + /// + /// The original . + /// The map containig all instance of copied s with their original. + public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary originalCopyMap) + { + var original = originalThing as ArchitectureElement; + if (original == null) + { + throw new InvalidOperationException("The originalThing cannot be null or is of the incorrect type"); + } + + foreach (var guid in original.Bounds) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Bounds.Add(copy.Value.Iid); + } + + var copyDepictedThing = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == original.DepictedThing); + this.DepictedThing = copyDepictedThing.Value == null ? original.DepictedThing : copyDepictedThing.Value.Iid; + + foreach (var guid in original.DiagramElement) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.DiagramElement.Add(copy.Value.Iid); + } + + this.Documentation = original.Documentation; + + foreach (var guid in original.ExcludedDomain) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + this.ExcludedDomain.Add(copy.Value == null ? guid : copy.Value.Iid); + } + + foreach (var guid in original.ExcludedPerson) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + this.ExcludedPerson.Add(copy.Value == null ? guid : copy.Value.Iid); + } + + foreach (var guid in original.LocalStyle) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.LocalStyle.Add(copy.Value.Iid); + } + + this.ModifiedOn = original.ModifiedOn; + + this.Name = original.Name; + + this.Resolution = original.Resolution; + + var copySharedStyle = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == original.SharedStyle); + this.SharedStyle = copySharedStyle.Value == null ? original.SharedStyle : copySharedStyle.Value.Iid; + + this.ThingPreference = original.ThingPreference; + } + + /// + /// Resolves the references of a copied based on a original to copy map. + /// + /// The map containig all instance of copied s with their original. + /// True if a modification was done in the process of this method. + public override bool ResolveCopyReference(IReadOnlyDictionary originalCopyMap) + { + var hasChanges = false; + + return hasChanges; + } + } +} diff --git a/CDP4Common/AutoGenDto/ArrayParameterType.cs b/CDP4Common/AutoGenDto/ArrayParameterType.cs index 00a4fd53c..1cf62a539 100644 --- a/CDP4Common/AutoGenDto/ArrayParameterType.cs +++ b/CDP4Common/AutoGenDto/ArrayParameterType.cs @@ -152,6 +152,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/Attachment.cs b/CDP4Common/AutoGenDto/Attachment.cs new file mode 100644 index 000000000..febd71005 --- /dev/null +++ b/CDP4Common/AutoGenDto/Attachment.cs @@ -0,0 +1,173 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.DTO +{ + using System; + using System.Collections; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.Linq; + using System.Runtime.Serialization; + using System.Xml.Serialization; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + + /// + /// A Data Transfer Object representation of the class. + /// + [DataContract] + [CDPVersion("1.3.0")] + [Container(typeof(DefinedThing), "Attachment")] + public sealed partial class Attachment : Thing + { + /// + /// Initializes a new instance of the class. + /// + public Attachment() + { + this.FileType = new List(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier. + /// + /// + /// The revision number. + /// + public Attachment(Guid iid, int rev) : base(iid: iid, rev: rev) + { + this.FileType = new List(); + } + + /// + /// Gets or sets the ContentHash. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + [DataMember] + public string ContentHash { get; set; } + + /// + /// Gets or sets the FileName. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + [DataMember] + public string FileName { get; set; } + + /// + /// Gets or sets the list of unique identifiers of the referenced FileType instances. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + [DataMember] + public List FileType { get; set; } + + /// + /// Gets the route for the current . + /// + public override string Route + { + get { return this.ComputedRoute(); } + } + + /// + /// Instantiate a from a + /// + /// The cache that stores all the s. + /// The of the . + /// A new + public override CommonData.Thing InstantiatePoco(ConcurrentDictionary> cache, Uri uri) + { + return new CDP4Common.EngineeringModelData.Attachment(this.Iid, cache, uri); + } + + /// + /// Resolves the properties of a copied based on the original and a collection of copied . + /// + /// The original . + /// The map containig all instance of copied s with their original. + public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary originalCopyMap) + { + var original = originalThing as Attachment; + if (original == null) + { + throw new InvalidOperationException("The originalThing cannot be null or is of the incorrect type"); + } + + this.ContentHash = original.ContentHash; + + foreach (var guid in original.ExcludedDomain) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + this.ExcludedDomain.Add(copy.Value == null ? guid : copy.Value.Iid); + } + + foreach (var guid in original.ExcludedPerson) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + this.ExcludedPerson.Add(copy.Value == null ? guid : copy.Value.Iid); + } + + this.FileName = original.FileName; + + foreach (var guid in original.FileType) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + this.FileType.Add(copy.Value == null ? guid : copy.Value.Iid); + } + + this.ModifiedOn = original.ModifiedOn; + + this.ThingPreference = original.ThingPreference; + } + + /// + /// Resolves the references of a copied based on a original to copy map. + /// + /// The map containig all instance of copied s with their original. + /// True if a modification was done in the process of this method. + public override bool ResolveCopyReference(IReadOnlyDictionary originalCopyMap) + { + var hasChanges = false; + + for (var i = 0; i < this.FileType.Count; i++) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == this.FileType[i]); + if (copy.Key != null) + { + this.FileType[i] = copy.Value.Iid; + hasChanges = true; + } + } + + return hasChanges; + } + } +} diff --git a/CDP4Common/AutoGenDto/Behavior.cs b/CDP4Common/AutoGenDto/Behavior.cs new file mode 100644 index 000000000..b6b5a8d2b --- /dev/null +++ b/CDP4Common/AutoGenDto/Behavior.cs @@ -0,0 +1,229 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.DTO +{ + using System; + using System.Collections; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.Linq; + using System.Runtime.Serialization; + using System.Xml.Serialization; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + + /// + /// A Data Transfer Object representation of the class. + /// + [DataContract] + [CDPVersion("1.3.0")] + [Container(typeof(ElementDefinition), "Behavior")] + public sealed partial class Behavior : DefinedThing + { + /// + /// Initializes a new instance of the class. + /// + public Behavior() + { + this.BehavioralParameter = new List(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier. + /// + /// + /// The revision number. + /// + public Behavior(Guid iid, int rev) : base(iid: iid, rev: rev) + { + this.BehavioralParameter = new List(); + } + + /// + /// Gets or sets the BehavioralModelKind. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + [DataMember] + public BehavioralModelKind BehavioralModelKind { get; set; } + + /// + /// Gets or sets the unique identifiers of the contained BehavioralParameter instances. + /// + [UmlInformation(aggregation: AggregationKind.Composite, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + [DataMember] + public List BehavioralParameter { get; set; } + + /// + /// Gets or sets the Script. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + [DataMember] + public string Script { get; set; } + + /// + /// Gets the route for the current . + /// + public override string Route + { + get { return this.ComputedRoute(); } + } + + /// + /// Gets an that references the composite properties of the current . + /// + public override IEnumerable ContainerLists + { + get + { + var containers = new List(base.ContainerLists); + containers.Add(this.BehavioralParameter); + return containers; + } + } + + /// + /// Instantiate a from a + /// + /// The cache that stores all the s. + /// The of the . + /// A new + public override CommonData.Thing InstantiatePoco(ConcurrentDictionary> cache, Uri uri) + { + return new CDP4Common.EngineeringModelData.Behavior(this.Iid, cache, uri); + } + + /// + /// Resolves the properties of a copied based on the original and a collection of copied . + /// + /// The original . + /// The map containig all instance of copied s with their original. + public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary originalCopyMap) + { + var original = originalThing as Behavior; + if (original == null) + { + throw new InvalidOperationException("The originalThing cannot be null or is of the incorrect type"); + } + + foreach (var guid in original.Alias) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Alias.Add(copy.Value.Iid); + } + + foreach (var guid in original.Attachment) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + + this.BehavioralModelKind = original.BehavioralModelKind; + + foreach (var guid in original.BehavioralParameter) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.BehavioralParameter.Add(copy.Value.Iid); + } + + foreach (var guid in original.Definition) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Definition.Add(copy.Value.Iid); + } + + foreach (var guid in original.ExcludedDomain) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + this.ExcludedDomain.Add(copy.Value == null ? guid : copy.Value.Iid); + } + + foreach (var guid in original.ExcludedPerson) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + this.ExcludedPerson.Add(copy.Value == null ? guid : copy.Value.Iid); + } + + foreach (var guid in original.HyperLink) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.HyperLink.Add(copy.Value.Iid); + } + + this.ModifiedOn = original.ModifiedOn; + + this.Name = original.Name; + + this.Script = original.Script; + + this.ShortName = original.ShortName; + + this.ThingPreference = original.ThingPreference; + } + + /// + /// Resolves the references of a copied based on a original to copy map. + /// + /// The map containig all instance of copied s with their original. + /// True if a modification was done in the process of this method. + public override bool ResolveCopyReference(IReadOnlyDictionary originalCopyMap) + { + var hasChanges = false; + + return hasChanges; + } + } +} diff --git a/CDP4Common/AutoGenDto/BehavioralParameter.cs b/CDP4Common/AutoGenDto/BehavioralParameter.cs new file mode 100644 index 000000000..a36719250 --- /dev/null +++ b/CDP4Common/AutoGenDto/BehavioralParameter.cs @@ -0,0 +1,158 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.DTO +{ + using System; + using System.Collections; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.Linq; + using System.Runtime.Serialization; + using System.Xml.Serialization; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + + /// + /// A Data Transfer Object representation of the class. + /// + [DataContract] + [CDPVersion("1.3.0")] + [Container(typeof(Behavior), "BehavioralParameter")] + public sealed partial class BehavioralParameter : Thing + { + /// + /// Initializes a new instance of the class. + /// + public BehavioralParameter() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier. + /// + /// + /// The revision number. + /// + public BehavioralParameter(Guid iid, int rev) : base(iid: iid, rev: rev) + { + } + + /// + /// Gets or sets the BehavioralParameterKind. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + [DataMember] + public BehavioralParameterKind BehavioralParameterKind { get; set; } + + /// + /// Gets or sets the unique identifier of the referenced Parameter. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + [DataMember] + public Guid Parameter { get; set; } + + /// + /// Gets or sets the VariableName. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + [DataMember] + public string VariableName { get; set; } + + /// + /// Gets the route for the current . + /// + public override string Route + { + get { return this.ComputedRoute(); } + } + + /// + /// Instantiate a from a + /// + /// The cache that stores all the s. + /// The of the . + /// A new + public override CommonData.Thing InstantiatePoco(ConcurrentDictionary> cache, Uri uri) + { + return new CDP4Common.EngineeringModelData.BehavioralParameter(this.Iid, cache, uri); + } + + /// + /// Resolves the properties of a copied based on the original and a collection of copied . + /// + /// The original . + /// The map containig all instance of copied s with their original. + public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary originalCopyMap) + { + var original = originalThing as BehavioralParameter; + if (original == null) + { + throw new InvalidOperationException("The originalThing cannot be null or is of the incorrect type"); + } + + this.BehavioralParameterKind = original.BehavioralParameterKind; + + foreach (var guid in original.ExcludedDomain) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + this.ExcludedDomain.Add(copy.Value == null ? guid : copy.Value.Iid); + } + + foreach (var guid in original.ExcludedPerson) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + this.ExcludedPerson.Add(copy.Value == null ? guid : copy.Value.Iid); + } + + this.ModifiedOn = original.ModifiedOn; + + var copyParameter = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == original.Parameter); + this.Parameter = copyParameter.Value == null ? original.Parameter : copyParameter.Value.Iid; + + this.ThingPreference = original.ThingPreference; + + this.VariableName = original.VariableName; + } + + /// + /// Resolves the references of a copied based on a original to copy map. + /// + /// The map containig all instance of copied s with their original. + /// True if a modification was done in the process of this method. + public override bool ResolveCopyReference(IReadOnlyDictionary originalCopyMap) + { + var hasChanges = false; + + return hasChanges; + } + } +} diff --git a/CDP4Common/AutoGenDto/BinaryRelationshipRule.cs b/CDP4Common/AutoGenDto/BinaryRelationshipRule.cs index bc1764cb1..1b1780761 100644 --- a/CDP4Common/AutoGenDto/BinaryRelationshipRule.cs +++ b/CDP4Common/AutoGenDto/BinaryRelationshipRule.cs @@ -143,6 +143,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/BooleanParameterType.cs b/CDP4Common/AutoGenDto/BooleanParameterType.cs index b17545a03..23b537c78 100644 --- a/CDP4Common/AutoGenDto/BooleanParameterType.cs +++ b/CDP4Common/AutoGenDto/BooleanParameterType.cs @@ -108,6 +108,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/Category.cs b/CDP4Common/AutoGenDto/Category.cs index 1d8acda56..da3504a0f 100644 --- a/CDP4Common/AutoGenDto/Category.cs +++ b/CDP4Common/AutoGenDto/Category.cs @@ -140,6 +140,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/CompoundParameterType.cs b/CDP4Common/AutoGenDto/CompoundParameterType.cs index 655cb5d43..57b191e89 100644 --- a/CDP4Common/AutoGenDto/CompoundParameterType.cs +++ b/CDP4Common/AutoGenDto/CompoundParameterType.cs @@ -137,6 +137,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/Constant.cs b/CDP4Common/AutoGenDto/Constant.cs index d06ce687f..054705c14 100644 --- a/CDP4Common/AutoGenDto/Constant.cs +++ b/CDP4Common/AutoGenDto/Constant.cs @@ -147,6 +147,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/CyclicRatioScale.cs b/CDP4Common/AutoGenDto/CyclicRatioScale.cs index 36880e9d5..d5ae9b2fc 100644 --- a/CDP4Common/AutoGenDto/CyclicRatioScale.cs +++ b/CDP4Common/AutoGenDto/CyclicRatioScale.cs @@ -115,6 +115,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/DateParameterType.cs b/CDP4Common/AutoGenDto/DateParameterType.cs index a3e474cbf..debdfc0dd 100644 --- a/CDP4Common/AutoGenDto/DateParameterType.cs +++ b/CDP4Common/AutoGenDto/DateParameterType.cs @@ -108,6 +108,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/DateTimeParameterType.cs b/CDP4Common/AutoGenDto/DateTimeParameterType.cs index 098c6dc47..674c13554 100644 --- a/CDP4Common/AutoGenDto/DateTimeParameterType.cs +++ b/CDP4Common/AutoGenDto/DateTimeParameterType.cs @@ -108,6 +108,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/DecompositionRule.cs b/CDP4Common/AutoGenDto/DecompositionRule.cs index 190d9f084..3a862e176 100644 --- a/CDP4Common/AutoGenDto/DecompositionRule.cs +++ b/CDP4Common/AutoGenDto/DecompositionRule.cs @@ -138,6 +138,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.ContainedCategory) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/DefinedThing.cs b/CDP4Common/AutoGenDto/DefinedThing.cs index 3065304c3..469d61f97 100644 --- a/CDP4Common/AutoGenDto/DefinedThing.cs +++ b/CDP4Common/AutoGenDto/DefinedThing.cs @@ -50,6 +50,7 @@ public abstract partial class DefinedThing : Thing, INamedThing, IShortNamedThin protected DefinedThing() { this.Alias = new List(); + this.Attachment = new List(); this.Definition = new List(); this.HyperLink = new List(); } @@ -66,6 +67,7 @@ protected DefinedThing() protected DefinedThing(Guid iid, int rev) : base(iid: iid, rev: rev) { this.Alias = new List(); + this.Attachment = new List(); this.Definition = new List(); this.HyperLink = new List(); } @@ -77,6 +79,13 @@ protected DefinedThing(Guid iid, int rev) : base(iid: iid, rev: rev) [DataMember] public virtual List Alias { get; set; } + /// + /// Gets or sets the unique identifiers of the contained Attachment instances. + /// + [UmlInformation(aggregation: AggregationKind.Composite, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + [DataMember] + public virtual List Attachment { get; set; } + /// /// Gets or sets the unique identifiers of the contained Definition instances. /// @@ -114,6 +123,7 @@ public override IEnumerable ContainerLists { var containers = new List(base.ContainerLists); containers.Add(this.Alias); + containers.Add(this.Attachment); containers.Add(this.Definition); containers.Add(this.HyperLink); return containers; diff --git a/CDP4Common/AutoGenDto/DerivedQuantityKind.cs b/CDP4Common/AutoGenDto/DerivedQuantityKind.cs index f651c6a5f..4c617907c 100644 --- a/CDP4Common/AutoGenDto/DerivedQuantityKind.cs +++ b/CDP4Common/AutoGenDto/DerivedQuantityKind.cs @@ -130,6 +130,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/DerivedUnit.cs b/CDP4Common/AutoGenDto/DerivedUnit.cs index b98d173ae..3c092ec01 100644 --- a/CDP4Common/AutoGenDto/DerivedUnit.cs +++ b/CDP4Common/AutoGenDto/DerivedUnit.cs @@ -130,6 +130,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/DiagramCanvas.cs b/CDP4Common/AutoGenDto/DiagramCanvas.cs index 005eb5565..8d5b9fa3a 100644 --- a/CDP4Common/AutoGenDto/DiagramCanvas.cs +++ b/CDP4Common/AutoGenDto/DiagramCanvas.cs @@ -44,7 +44,7 @@ namespace CDP4Common.DTO [DataContract] [CDPVersion("1.1.0")] [Container(typeof(Iteration), "DiagramCanvas")] - public sealed partial class DiagramCanvas : DiagramElementContainer, ITimeStampedThing + public partial class DiagramCanvas : DiagramElementContainer, ITimeStampedThing { /// /// Initializes a new instance of the class. @@ -71,7 +71,21 @@ public DiagramCanvas(Guid iid, int rev) : base(iid: iid, rev: rev) /// [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] [DataMember] - public DateTime CreatedOn { get; set; } + public virtual DateTime CreatedOn { get; set; } + + /// + /// Gets or sets the Description. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + [DataMember] + public virtual string Description { get; set; } + + /// + /// Gets or sets the PublicationState. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + [DataMember] + public virtual PublicationState PublicationState { get; set; } /// /// Gets the route for the current . @@ -118,6 +132,8 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); @@ -145,6 +161,8 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.DTO +{ + using System; + using System.Collections; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.Linq; + using System.Runtime.Serialization; + using System.Xml.Serialization; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + + /// + /// A Data Transfer Object representation of the class. + /// + [DataContract] + [CDPVersion("1.3.0")] + [Container(typeof(DiagramElementContainer), "DiagramElement")] + public sealed partial class DiagramFrame : DiagramShape + { + /// + /// Initializes a new instance of the class. + /// + public DiagramFrame() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier. + /// + /// + /// The revision number. + /// + public DiagramFrame(Guid iid, int rev) : base(iid: iid, rev: rev) + { + } + + /// + /// Gets the route for the current . + /// + public override string Route + { + get { return this.ComputedRoute(); } + } + + /// + /// Instantiate a from a + /// + /// The cache that stores all the s. + /// The of the . + /// A new + public override CommonData.Thing InstantiatePoco(ConcurrentDictionary> cache, Uri uri) + { + return new CDP4Common.DiagramData.DiagramFrame(this.Iid, cache, uri); + } + + /// + /// Resolves the properties of a copied based on the original and a collection of copied . + /// + /// The original . + /// The map containig all instance of copied s with their original. + public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary originalCopyMap) + { + var original = originalThing as DiagramFrame; + if (original == null) + { + throw new InvalidOperationException("The originalThing cannot be null or is of the incorrect type"); + } + + foreach (var guid in original.Bounds) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Bounds.Add(copy.Value.Iid); + } + + var copyDepictedThing = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == original.DepictedThing); + this.DepictedThing = copyDepictedThing.Value == null ? original.DepictedThing : copyDepictedThing.Value.Iid; + + foreach (var guid in original.DiagramElement) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.DiagramElement.Add(copy.Value.Iid); + } + + foreach (var guid in original.ExcludedDomain) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + this.ExcludedDomain.Add(copy.Value == null ? guid : copy.Value.Iid); + } + + foreach (var guid in original.ExcludedPerson) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + this.ExcludedPerson.Add(copy.Value == null ? guid : copy.Value.Iid); + } + + foreach (var guid in original.LocalStyle) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.LocalStyle.Add(copy.Value.Iid); + } + + this.ModifiedOn = original.ModifiedOn; + + this.Name = original.Name; + + var copySharedStyle = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == original.SharedStyle); + this.SharedStyle = copySharedStyle.Value == null ? original.SharedStyle : copySharedStyle.Value.Iid; + + this.ThingPreference = original.ThingPreference; + } + + /// + /// Resolves the references of a copied based on a original to copy map. + /// + /// The map containig all instance of copied s with their original. + /// True if a modification was done in the process of this method. + public override bool ResolveCopyReference(IReadOnlyDictionary originalCopyMap) + { + var hasChanges = false; + + return hasChanges; + } + } +} diff --git a/CDP4Common/AutoGenDto/DiagramObject.cs b/CDP4Common/AutoGenDto/DiagramObject.cs index c482d6ca3..eff5b378b 100644 --- a/CDP4Common/AutoGenDto/DiagramObject.cs +++ b/CDP4Common/AutoGenDto/DiagramObject.cs @@ -44,7 +44,7 @@ namespace CDP4Common.DTO [DataContract] [CDPVersion("1.1.0")] [Container(typeof(DiagramElementContainer), "DiagramElement")] - public sealed partial class DiagramObject : DiagramShape + public partial class DiagramObject : DiagramShape { /// /// Initializes a new instance of the class. @@ -71,14 +71,14 @@ public DiagramObject(Guid iid, int rev) : base(iid: iid, rev: rev) /// [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] [DataMember] - public string Documentation { get; set; } + public virtual string Documentation { get; set; } /// /// Gets or sets the Resolution. /// [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] [DataMember] - public float Resolution { get; set; } + public virtual float Resolution { get; set; } /// /// Gets the route for the current . diff --git a/CDP4Common/AutoGenDto/DiagramPort.cs b/CDP4Common/AutoGenDto/DiagramPort.cs new file mode 100644 index 000000000..9228de6a1 --- /dev/null +++ b/CDP4Common/AutoGenDto/DiagramPort.cs @@ -0,0 +1,171 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.DTO +{ + using System; + using System.Collections; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.Linq; + using System.Runtime.Serialization; + using System.Xml.Serialization; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + + /// + /// A Data Transfer Object representation of the class. + /// + [DataContract] + [CDPVersion("1.3.0")] + [Container(typeof(DiagramElementContainer), "DiagramElement")] + public sealed partial class DiagramPort : DiagramShape + { + /// + /// Initializes a new instance of the class. + /// + public DiagramPort() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier. + /// + /// + /// The revision number. + /// + public DiagramPort(Guid iid, int rev) : base(iid: iid, rev: rev) + { + } + + /// + /// Gets the route for the current . + /// + public override string Route + { + get { return this.ComputedRoute(); } + } + + /// + /// Instantiate a from a + /// + /// The cache that stores all the s. + /// The of the . + /// A new + public override CommonData.Thing InstantiatePoco(ConcurrentDictionary> cache, Uri uri) + { + return new CDP4Common.DiagramData.DiagramPort(this.Iid, cache, uri); + } + + /// + /// Resolves the properties of a copied based on the original and a collection of copied . + /// + /// The original . + /// The map containig all instance of copied s with their original. + public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary originalCopyMap) + { + var original = originalThing as DiagramPort; + if (original == null) + { + throw new InvalidOperationException("The originalThing cannot be null or is of the incorrect type"); + } + + foreach (var guid in original.Bounds) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Bounds.Add(copy.Value.Iid); + } + + var copyDepictedThing = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == original.DepictedThing); + this.DepictedThing = copyDepictedThing.Value == null ? original.DepictedThing : copyDepictedThing.Value.Iid; + + foreach (var guid in original.DiagramElement) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.DiagramElement.Add(copy.Value.Iid); + } + + foreach (var guid in original.ExcludedDomain) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + this.ExcludedDomain.Add(copy.Value == null ? guid : copy.Value.Iid); + } + + foreach (var guid in original.ExcludedPerson) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + this.ExcludedPerson.Add(copy.Value == null ? guid : copy.Value.Iid); + } + + foreach (var guid in original.LocalStyle) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.LocalStyle.Add(copy.Value.Iid); + } + + this.ModifiedOn = original.ModifiedOn; + + this.Name = original.Name; + + var copySharedStyle = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == original.SharedStyle); + this.SharedStyle = copySharedStyle.Value == null ? original.SharedStyle : copySharedStyle.Value.Iid; + + this.ThingPreference = original.ThingPreference; + } + + /// + /// Resolves the references of a copied based on a original to copy map. + /// + /// The map containig all instance of copied s with their original. + /// True if a modification was done in the process of this method. + public override bool ResolveCopyReference(IReadOnlyDictionary originalCopyMap) + { + var hasChanges = false; + + return hasChanges; + } + } +} diff --git a/CDP4Common/AutoGenDto/DomainOfExpertise.cs b/CDP4Common/AutoGenDto/DomainOfExpertise.cs index bd24d6719..26184008a 100644 --- a/CDP4Common/AutoGenDto/DomainOfExpertise.cs +++ b/CDP4Common/AutoGenDto/DomainOfExpertise.cs @@ -124,6 +124,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/DomainOfExpertiseGroup.cs b/CDP4Common/AutoGenDto/DomainOfExpertiseGroup.cs index 29ad5121b..4b5ba6f78 100644 --- a/CDP4Common/AutoGenDto/DomainOfExpertiseGroup.cs +++ b/CDP4Common/AutoGenDto/DomainOfExpertiseGroup.cs @@ -124,6 +124,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/ElementDefinition.cs b/CDP4Common/AutoGenDto/ElementDefinition.cs index 7546666e4..da2a38df5 100644 --- a/CDP4Common/AutoGenDto/ElementDefinition.cs +++ b/CDP4Common/AutoGenDto/ElementDefinition.cs @@ -50,6 +50,7 @@ public sealed partial class ElementDefinition : ElementBase /// public ElementDefinition() { + this.Behavior = new List(); this.ContainedElement = new List(); this.OrganizationalParticipant = new List(); this.Parameter = new List(); @@ -68,6 +69,7 @@ public ElementDefinition() /// public ElementDefinition(Guid iid, int rev) : base(iid: iid, rev: rev) { + this.Behavior = new List(); this.ContainedElement = new List(); this.OrganizationalParticipant = new List(); this.Parameter = new List(); @@ -75,6 +77,14 @@ public ElementDefinition(Guid iid, int rev) : base(iid: iid, rev: rev) this.ReferencedElement = new List(); } + /// + /// Gets or sets the unique identifiers of the contained Behavior instances. + /// + [CDPVersion("1.3.0")] + [UmlInformation(aggregation: AggregationKind.Composite, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + [DataMember] + public List Behavior { get; set; } + /// /// Gets or sets the unique identifiers of the contained ContainedElement instances. /// @@ -127,6 +137,7 @@ public override IEnumerable ContainerLists get { var containers = new List(base.ContainerLists); + containers.Add(this.Behavior); containers.Add(this.ContainedElement); containers.Add(this.Parameter); containers.Add(this.ParameterGroup); @@ -169,6 +180,28 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + + foreach (var guid in original.Behavior) + { + var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Behavior.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/ElementUsage.cs b/CDP4Common/AutoGenDto/ElementUsage.cs index b8896157c..2be36633e 100644 --- a/CDP4Common/AutoGenDto/ElementUsage.cs +++ b/CDP4Common/AutoGenDto/ElementUsage.cs @@ -153,6 +153,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/EngineeringModelSetup.cs b/CDP4Common/AutoGenDto/EngineeringModelSetup.cs index 756c7aeeb..c176226d7 100644 --- a/CDP4Common/AutoGenDto/EngineeringModelSetup.cs +++ b/CDP4Common/AutoGenDto/EngineeringModelSetup.cs @@ -212,6 +212,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + var copyDefaultOrganizationalParticipant = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == original.DefaultOrganizationalParticipant); this.DefaultOrganizationalParticipant = copyDefaultOrganizationalParticipant.Value == null ? original.DefaultOrganizationalParticipant : copyDefaultOrganizationalParticipant.Value.Iid; diff --git a/CDP4Common/AutoGenDto/EnumerationParameterType.cs b/CDP4Common/AutoGenDto/EnumerationParameterType.cs index ac24a9845..0f6b7cfbf 100644 --- a/CDP4Common/AutoGenDto/EnumerationParameterType.cs +++ b/CDP4Common/AutoGenDto/EnumerationParameterType.cs @@ -139,6 +139,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/EnumerationValueDefinition.cs b/CDP4Common/AutoGenDto/EnumerationValueDefinition.cs index bbb46cdb9..a36d3dfa0 100644 --- a/CDP4Common/AutoGenDto/EnumerationValueDefinition.cs +++ b/CDP4Common/AutoGenDto/EnumerationValueDefinition.cs @@ -108,6 +108,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/FileType.cs b/CDP4Common/AutoGenDto/FileType.cs index 50d9a6ce2..7f1ec3cc8 100644 --- a/CDP4Common/AutoGenDto/FileType.cs +++ b/CDP4Common/AutoGenDto/FileType.cs @@ -131,6 +131,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/Glossary.cs b/CDP4Common/AutoGenDto/Glossary.cs index 647538655..64eec165a 100644 --- a/CDP4Common/AutoGenDto/Glossary.cs +++ b/CDP4Common/AutoGenDto/Glossary.cs @@ -146,6 +146,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/Goal.cs b/CDP4Common/AutoGenDto/Goal.cs index b749966a5..d0053e733 100644 --- a/CDP4Common/AutoGenDto/Goal.cs +++ b/CDP4Common/AutoGenDto/Goal.cs @@ -118,6 +118,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/IntervalScale.cs b/CDP4Common/AutoGenDto/IntervalScale.cs index 4fc72250e..1a41db805 100644 --- a/CDP4Common/AutoGenDto/IntervalScale.cs +++ b/CDP4Common/AutoGenDto/IntervalScale.cs @@ -108,6 +108,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/LinearConversionUnit.cs b/CDP4Common/AutoGenDto/LinearConversionUnit.cs index 17e90c853..86c6bcc29 100644 --- a/CDP4Common/AutoGenDto/LinearConversionUnit.cs +++ b/CDP4Common/AutoGenDto/LinearConversionUnit.cs @@ -108,6 +108,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + this.ConversionFactor = original.ConversionFactor; foreach (var guid in original.Definition) diff --git a/CDP4Common/AutoGenDto/LogarithmicScale.cs b/CDP4Common/AutoGenDto/LogarithmicScale.cs index b0feddcd3..fe30639cb 100644 --- a/CDP4Common/AutoGenDto/LogarithmicScale.cs +++ b/CDP4Common/AutoGenDto/LogarithmicScale.cs @@ -158,6 +158,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/ModelReferenceDataLibrary.cs b/CDP4Common/AutoGenDto/ModelReferenceDataLibrary.cs index 3082ed9cb..7483d2975 100644 --- a/CDP4Common/AutoGenDto/ModelReferenceDataLibrary.cs +++ b/CDP4Common/AutoGenDto/ModelReferenceDataLibrary.cs @@ -108,6 +108,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var orderedItem in original.BaseQuantityKind) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == Guid.Parse(orderedItem.V.ToString())); diff --git a/CDP4Common/AutoGenDto/MultiRelationshipRule.cs b/CDP4Common/AutoGenDto/MultiRelationshipRule.cs index 24ff8ca69..5e43f3c2b 100644 --- a/CDP4Common/AutoGenDto/MultiRelationshipRule.cs +++ b/CDP4Common/AutoGenDto/MultiRelationshipRule.cs @@ -138,6 +138,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/Option.cs b/CDP4Common/AutoGenDto/Option.cs index 38deb7b6d..a5e127a56 100644 --- a/CDP4Common/AutoGenDto/Option.cs +++ b/CDP4Common/AutoGenDto/Option.cs @@ -139,6 +139,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/OrdinalScale.cs b/CDP4Common/AutoGenDto/OrdinalScale.cs index e408b6755..341dbab42 100644 --- a/CDP4Common/AutoGenDto/OrdinalScale.cs +++ b/CDP4Common/AutoGenDto/OrdinalScale.cs @@ -115,6 +115,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/ParameterizedCategoryRule.cs b/CDP4Common/AutoGenDto/ParameterizedCategoryRule.cs index 8e87eeeb4..0ea370b9b 100644 --- a/CDP4Common/AutoGenDto/ParameterizedCategoryRule.cs +++ b/CDP4Common/AutoGenDto/ParameterizedCategoryRule.cs @@ -124,6 +124,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + var copyCategory = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == original.Category); this.Category = copyCategory.Value == null ? original.Category : copyCategory.Value.Iid; diff --git a/CDP4Common/AutoGenDto/ParticipantRole.cs b/CDP4Common/AutoGenDto/ParticipantRole.cs index 01e9eea6d..6608ba31b 100644 --- a/CDP4Common/AutoGenDto/ParticipantRole.cs +++ b/CDP4Common/AutoGenDto/ParticipantRole.cs @@ -137,6 +137,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/PersonRole.cs b/CDP4Common/AutoGenDto/PersonRole.cs index ef4ea3c81..9fbe96f6d 100644 --- a/CDP4Common/AutoGenDto/PersonRole.cs +++ b/CDP4Common/AutoGenDto/PersonRole.cs @@ -137,6 +137,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/PossibleFiniteState.cs b/CDP4Common/AutoGenDto/PossibleFiniteState.cs index 4465b401a..e7b7c4529 100644 --- a/CDP4Common/AutoGenDto/PossibleFiniteState.cs +++ b/CDP4Common/AutoGenDto/PossibleFiniteState.cs @@ -122,6 +122,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/PossibleFiniteStateList.cs b/CDP4Common/AutoGenDto/PossibleFiniteStateList.cs index 3c1c4b15b..d42d722f1 100644 --- a/CDP4Common/AutoGenDto/PossibleFiniteStateList.cs +++ b/CDP4Common/AutoGenDto/PossibleFiniteStateList.cs @@ -153,6 +153,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/PrefixedUnit.cs b/CDP4Common/AutoGenDto/PrefixedUnit.cs index 2e46bec20..e6b232980 100644 --- a/CDP4Common/AutoGenDto/PrefixedUnit.cs +++ b/CDP4Common/AutoGenDto/PrefixedUnit.cs @@ -157,6 +157,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/RatioScale.cs b/CDP4Common/AutoGenDto/RatioScale.cs index e742fa730..6861b8fd6 100644 --- a/CDP4Common/AutoGenDto/RatioScale.cs +++ b/CDP4Common/AutoGenDto/RatioScale.cs @@ -108,6 +108,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/ReferenceSource.cs b/CDP4Common/AutoGenDto/ReferenceSource.cs index 0cdce09a9..7a3cea17a 100644 --- a/CDP4Common/AutoGenDto/ReferenceSource.cs +++ b/CDP4Common/AutoGenDto/ReferenceSource.cs @@ -173,6 +173,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + this.Author = original.Author; foreach (var guid in original.Category) diff --git a/CDP4Common/AutoGenDto/ReferencerRule.cs b/CDP4Common/AutoGenDto/ReferencerRule.cs index 63dafd0fb..69f63135e 100644 --- a/CDP4Common/AutoGenDto/ReferencerRule.cs +++ b/CDP4Common/AutoGenDto/ReferencerRule.cs @@ -138,6 +138,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/Requirement.cs b/CDP4Common/AutoGenDto/Requirement.cs index e1a9e8528..87269bbe9 100644 --- a/CDP4Common/AutoGenDto/Requirement.cs +++ b/CDP4Common/AutoGenDto/Requirement.cs @@ -153,6 +153,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/RequirementsGroup.cs b/CDP4Common/AutoGenDto/RequirementsGroup.cs index dc3dc4de1..01f7114d9 100644 --- a/CDP4Common/AutoGenDto/RequirementsGroup.cs +++ b/CDP4Common/AutoGenDto/RequirementsGroup.cs @@ -108,6 +108,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/RequirementsSpecification.cs b/CDP4Common/AutoGenDto/RequirementsSpecification.cs index e480cab35..aead1265d 100644 --- a/CDP4Common/AutoGenDto/RequirementsSpecification.cs +++ b/CDP4Common/AutoGenDto/RequirementsSpecification.cs @@ -137,6 +137,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/RuleVerificationList.cs b/CDP4Common/AutoGenDto/RuleVerificationList.cs index 83385d87c..2cc9ca593 100644 --- a/CDP4Common/AutoGenDto/RuleVerificationList.cs +++ b/CDP4Common/AutoGenDto/RuleVerificationList.cs @@ -137,6 +137,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/SampledFunctionParameterType.cs b/CDP4Common/AutoGenDto/SampledFunctionParameterType.cs index 4258d4370..c5d85c28d 100644 --- a/CDP4Common/AutoGenDto/SampledFunctionParameterType.cs +++ b/CDP4Common/AutoGenDto/SampledFunctionParameterType.cs @@ -157,6 +157,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/ScaleValueDefinition.cs b/CDP4Common/AutoGenDto/ScaleValueDefinition.cs index 34166dd01..4796c1154 100644 --- a/CDP4Common/AutoGenDto/ScaleValueDefinition.cs +++ b/CDP4Common/AutoGenDto/ScaleValueDefinition.cs @@ -115,6 +115,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/SimpleQuantityKind.cs b/CDP4Common/AutoGenDto/SimpleQuantityKind.cs index eef89e877..9b30fa8a9 100644 --- a/CDP4Common/AutoGenDto/SimpleQuantityKind.cs +++ b/CDP4Common/AutoGenDto/SimpleQuantityKind.cs @@ -108,6 +108,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/SimpleUnit.cs b/CDP4Common/AutoGenDto/SimpleUnit.cs index 5d6c5915c..943dee17c 100644 --- a/CDP4Common/AutoGenDto/SimpleUnit.cs +++ b/CDP4Common/AutoGenDto/SimpleUnit.cs @@ -108,6 +108,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/SiteReferenceDataLibrary.cs b/CDP4Common/AutoGenDto/SiteReferenceDataLibrary.cs index 83ad396c0..2a1d2821e 100644 --- a/CDP4Common/AutoGenDto/SiteReferenceDataLibrary.cs +++ b/CDP4Common/AutoGenDto/SiteReferenceDataLibrary.cs @@ -115,6 +115,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var orderedItem in original.BaseQuantityKind) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == Guid.Parse(orderedItem.V.ToString())); diff --git a/CDP4Common/AutoGenDto/SpecializedQuantityKind.cs b/CDP4Common/AutoGenDto/SpecializedQuantityKind.cs index 5fcd5b3f6..7194872a9 100644 --- a/CDP4Common/AutoGenDto/SpecializedQuantityKind.cs +++ b/CDP4Common/AutoGenDto/SpecializedQuantityKind.cs @@ -115,6 +115,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/StakeHolderValueMap.cs b/CDP4Common/AutoGenDto/StakeHolderValueMap.cs index c374d7c76..766a08ac3 100644 --- a/CDP4Common/AutoGenDto/StakeHolderValueMap.cs +++ b/CDP4Common/AutoGenDto/StakeHolderValueMap.cs @@ -176,6 +176,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/Stakeholder.cs b/CDP4Common/AutoGenDto/Stakeholder.cs index e25b307df..44cf8a11d 100644 --- a/CDP4Common/AutoGenDto/Stakeholder.cs +++ b/CDP4Common/AutoGenDto/Stakeholder.cs @@ -127,6 +127,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/StakeholderValue.cs b/CDP4Common/AutoGenDto/StakeholderValue.cs index 97627278c..185984d2c 100644 --- a/CDP4Common/AutoGenDto/StakeholderValue.cs +++ b/CDP4Common/AutoGenDto/StakeholderValue.cs @@ -118,6 +118,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/Term.cs b/CDP4Common/AutoGenDto/Term.cs index d7c01df22..cd81baf32 100644 --- a/CDP4Common/AutoGenDto/Term.cs +++ b/CDP4Common/AutoGenDto/Term.cs @@ -115,6 +115,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Definition) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/TextParameterType.cs b/CDP4Common/AutoGenDto/TextParameterType.cs index df10b83ce..9fd7255e9 100644 --- a/CDP4Common/AutoGenDto/TextParameterType.cs +++ b/CDP4Common/AutoGenDto/TextParameterType.cs @@ -108,6 +108,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/TimeOfDayParameterType.cs b/CDP4Common/AutoGenDto/TimeOfDayParameterType.cs index f4626bb69..662849f19 100644 --- a/CDP4Common/AutoGenDto/TimeOfDayParameterType.cs +++ b/CDP4Common/AutoGenDto/TimeOfDayParameterType.cs @@ -108,6 +108,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenDto/UnitPrefix.cs b/CDP4Common/AutoGenDto/UnitPrefix.cs index 30fa206d9..0c0125515 100644 --- a/CDP4Common/AutoGenDto/UnitPrefix.cs +++ b/CDP4Common/AutoGenDto/UnitPrefix.cs @@ -122,6 +122,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + this.ConversionFactor = original.ConversionFactor; foreach (var guid in original.Definition) diff --git a/CDP4Common/AutoGenDto/ValueGroup.cs b/CDP4Common/AutoGenDto/ValueGroup.cs index c35a61cf9..01c865e30 100644 --- a/CDP4Common/AutoGenDto/ValueGroup.cs +++ b/CDP4Common/AutoGenDto/ValueGroup.cs @@ -118,6 +118,17 @@ public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary kvp.Key.Iid == guid); + if (Equals(copy, default(KeyValuePair))) + { + throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); + } + + this.Attachment.Add(copy.Value.Iid); + } + foreach (var guid in original.Category) { var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); diff --git a/CDP4Common/AutoGenHelpers/ContainerPropertyHelper.cs b/CDP4Common/AutoGenHelpers/ContainerPropertyHelper.cs index a00ac5ce7..4b8c527f5 100644 --- a/CDP4Common/AutoGenHelpers/ContainerPropertyHelper.cs +++ b/CDP4Common/AutoGenHelpers/ContainerPropertyHelper.cs @@ -47,7 +47,12 @@ public static class ContainerPropertyHelper { "Alias", new KeyValuePair("DefinedThing", "alias") }, { "AndExpression", new KeyValuePair("ParametricConstraint", "expression") }, { "Approval", new KeyValuePair("ModellingAnnotationItem", "approvedBy") }, + { "ArchitectureDiagram", new KeyValuePair("Iteration", "diagramCanvas") }, + { "ArchitectureElement", new KeyValuePair("DiagramElementContainer", "diagramElement") }, { "ArrayParameterType", new KeyValuePair("ReferenceDataLibrary", "parameterType") }, + { "Attachment", new KeyValuePair("DefinedThing", "attachment") }, + { "Behavior", new KeyValuePair("ElementDefinition", "behavior") }, + { "BehavioralParameter", new KeyValuePair("Behavior", "behavioralParameter") }, { "BinaryNote", new KeyValuePair("Page", "note") }, { "BinaryRelationship", new KeyValuePair("Iteration", "relationship") }, { "BinaryRelationshipRule", new KeyValuePair("ReferenceDataLibrary", "rule") }, @@ -78,7 +83,9 @@ public static class ContainerPropertyHelper { "DiagramCanvas", new KeyValuePair("Iteration", "diagramCanvas") }, { "DiagramEdge", new KeyValuePair("DiagramElementContainer", "diagramElement") }, { "DiagramElementThing", new KeyValuePair("DiagramElementContainer", "diagramElement") }, + { "DiagramFrame", new KeyValuePair("DiagramElementContainer", "diagramElement") }, { "DiagramObject", new KeyValuePair("DiagramElementContainer", "diagramElement") }, + { "DiagramPort", new KeyValuePair("DiagramElementContainer", "diagramElement") }, { "DiagramShape", new KeyValuePair("DiagramElementContainer", "diagramElement") }, { "DomainFileStore", new KeyValuePair("Iteration", "domainFileStore") }, { "DomainOfExpertise", new KeyValuePair("SiteDirectory", "domain") }, diff --git a/CDP4Common/AutoGenHelpers/DefaultPermissionProvider.cs b/CDP4Common/AutoGenHelpers/DefaultPermissionProvider.cs index 068296aff..18284499c 100644 --- a/CDP4Common/AutoGenHelpers/DefaultPermissionProvider.cs +++ b/CDP4Common/AutoGenHelpers/DefaultPermissionProvider.cs @@ -51,7 +51,12 @@ public class DefaultPermissionProvider : IDefaultPermissionProvider { ClassKind.Alias, ParticipantAccessRightKind.SAME_AS_CONTAINER }, { ClassKind.AndExpression, ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { ClassKind.Approval, ParticipantAccessRightKind.NONE }, + { ClassKind.ArchitectureDiagram, ParticipantAccessRightKind.NONE }, + { ClassKind.ArchitectureElement, ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { ClassKind.ArrayParameterType, ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, + { ClassKind.Attachment, ParticipantAccessRightKind.SAME_AS_CONTAINER }, + { ClassKind.Behavior, ParticipantAccessRightKind.SAME_AS_CONTAINER }, + { ClassKind.BehavioralParameter, ParticipantAccessRightKind.SAME_AS_CONTAINER }, { ClassKind.BinaryNote, ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { ClassKind.BinaryRelationship, ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { ClassKind.BinaryRelationshipRule, ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, @@ -84,8 +89,10 @@ public class DefaultPermissionProvider : IDefaultPermissionProvider { ClassKind.DiagramEdge, ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { ClassKind.DiagramElementContainer, ParticipantAccessRightKind.NOT_APPLICABLE }, { ClassKind.DiagramElementThing, ParticipantAccessRightKind.SAME_AS_CONTAINER }, + { ClassKind.DiagramFrame, ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { ClassKind.DiagrammingStyle, ParticipantAccessRightKind.NOT_APPLICABLE }, { ClassKind.DiagramObject, ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, + { ClassKind.DiagramPort, ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { ClassKind.DiagramShape, ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { ClassKind.DiagramThingBase, ParticipantAccessRightKind.NOT_APPLICABLE }, { ClassKind.DiscussionItem, ParticipantAccessRightKind.NOT_APPLICABLE }, @@ -239,7 +246,12 @@ public class DefaultPermissionProvider : IDefaultPermissionProvider { "Alias", ParticipantAccessRightKind.SAME_AS_CONTAINER }, { "AndExpression", ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { "Approval", ParticipantAccessRightKind.NONE }, + { "ArchitectureDiagram", ParticipantAccessRightKind.NONE }, + { "ArchitectureElement", ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { "ArrayParameterType", ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, + { "Attachment", ParticipantAccessRightKind.SAME_AS_CONTAINER }, + { "Behavior", ParticipantAccessRightKind.SAME_AS_CONTAINER }, + { "BehavioralParameter", ParticipantAccessRightKind.SAME_AS_CONTAINER }, { "BinaryNote", ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { "BinaryRelationship", ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { "BinaryRelationshipRule", ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, @@ -272,8 +284,10 @@ public class DefaultPermissionProvider : IDefaultPermissionProvider { "DiagramEdge", ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { "DiagramElementContainer", ParticipantAccessRightKind.NOT_APPLICABLE }, { "DiagramElementThing", ParticipantAccessRightKind.SAME_AS_CONTAINER }, + { "DiagramFrame", ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { "DiagrammingStyle", ParticipantAccessRightKind.NOT_APPLICABLE }, { "DiagramObject", ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, + { "DiagramPort", ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { "DiagramShape", ParticipantAccessRightKind.SAME_AS_SUPERCLASS }, { "DiagramThingBase", ParticipantAccessRightKind.NOT_APPLICABLE }, { "DiscussionItem", ParticipantAccessRightKind.NOT_APPLICABLE }, @@ -427,7 +441,12 @@ public class DefaultPermissionProvider : IDefaultPermissionProvider { ClassKind.Alias, PersonAccessRightKind.SAME_AS_CONTAINER }, { ClassKind.AndExpression, PersonAccessRightKind.NOT_APPLICABLE }, { ClassKind.Approval, PersonAccessRightKind.NOT_APPLICABLE }, + { ClassKind.ArchitectureDiagram, PersonAccessRightKind.NOT_APPLICABLE }, + { ClassKind.ArchitectureElement, PersonAccessRightKind.NOT_APPLICABLE }, { ClassKind.ArrayParameterType, PersonAccessRightKind.SAME_AS_SUPERCLASS }, + { ClassKind.Attachment, PersonAccessRightKind.SAME_AS_CONTAINER }, + { ClassKind.Behavior, PersonAccessRightKind.NOT_APPLICABLE }, + { ClassKind.BehavioralParameter, PersonAccessRightKind.NOT_APPLICABLE }, { ClassKind.BinaryNote, PersonAccessRightKind.NOT_APPLICABLE }, { ClassKind.BinaryRelationship, PersonAccessRightKind.NOT_APPLICABLE }, { ClassKind.BinaryRelationshipRule, PersonAccessRightKind.SAME_AS_SUPERCLASS }, @@ -460,8 +479,10 @@ public class DefaultPermissionProvider : IDefaultPermissionProvider { ClassKind.DiagramEdge, PersonAccessRightKind.NOT_APPLICABLE }, { ClassKind.DiagramElementContainer, PersonAccessRightKind.NOT_APPLICABLE }, { ClassKind.DiagramElementThing, PersonAccessRightKind.NOT_APPLICABLE }, + { ClassKind.DiagramFrame, PersonAccessRightKind.NOT_APPLICABLE }, { ClassKind.DiagrammingStyle, PersonAccessRightKind.NOT_APPLICABLE }, { ClassKind.DiagramObject, PersonAccessRightKind.NOT_APPLICABLE }, + { ClassKind.DiagramPort, PersonAccessRightKind.NOT_APPLICABLE }, { ClassKind.DiagramShape, PersonAccessRightKind.NOT_APPLICABLE }, { ClassKind.DiagramThingBase, PersonAccessRightKind.NOT_APPLICABLE }, { ClassKind.DiscussionItem, PersonAccessRightKind.NOT_APPLICABLE }, @@ -615,7 +636,12 @@ public class DefaultPermissionProvider : IDefaultPermissionProvider { "Alias", PersonAccessRightKind.SAME_AS_CONTAINER }, { "AndExpression", PersonAccessRightKind.NOT_APPLICABLE }, { "Approval", PersonAccessRightKind.NOT_APPLICABLE }, + { "ArchitectureDiagram", PersonAccessRightKind.NOT_APPLICABLE }, + { "ArchitectureElement", PersonAccessRightKind.NOT_APPLICABLE }, { "ArrayParameterType", PersonAccessRightKind.SAME_AS_SUPERCLASS }, + { "Attachment", PersonAccessRightKind.SAME_AS_CONTAINER }, + { "Behavior", PersonAccessRightKind.NOT_APPLICABLE }, + { "BehavioralParameter", PersonAccessRightKind.NOT_APPLICABLE }, { "BinaryNote", PersonAccessRightKind.NOT_APPLICABLE }, { "BinaryRelationship", PersonAccessRightKind.NOT_APPLICABLE }, { "BinaryRelationshipRule", PersonAccessRightKind.SAME_AS_SUPERCLASS }, @@ -648,8 +674,10 @@ public class DefaultPermissionProvider : IDefaultPermissionProvider { "DiagramEdge", PersonAccessRightKind.NOT_APPLICABLE }, { "DiagramElementContainer", PersonAccessRightKind.NOT_APPLICABLE }, { "DiagramElementThing", PersonAccessRightKind.NOT_APPLICABLE }, + { "DiagramFrame", PersonAccessRightKind.NOT_APPLICABLE }, { "DiagrammingStyle", PersonAccessRightKind.NOT_APPLICABLE }, { "DiagramObject", PersonAccessRightKind.NOT_APPLICABLE }, + { "DiagramPort", PersonAccessRightKind.NOT_APPLICABLE }, { "DiagramShape", PersonAccessRightKind.NOT_APPLICABLE }, { "DiagramThingBase", PersonAccessRightKind.NOT_APPLICABLE }, { "DiscussionItem", PersonAccessRightKind.NOT_APPLICABLE }, diff --git a/CDP4Common/AutoGenMetaInfo/AliasMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/AliasMetaInfo.cs index 93f3f6d29..16a1aaadd 100644 --- a/CDP4Common/AutoGenMetaInfo/AliasMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/AliasMetaInfo.cs @@ -280,6 +280,7 @@ public IEnumerable Properties private readonly Dictionary possibleContainerProperties = new Dictionary { { "ArrayParameterType", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Behavior", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "BinaryRelationshipRule", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "BooleanParameterType", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Category", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, diff --git a/CDP4Common/AutoGenMetaInfo/ArchitectureDiagramMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ArchitectureDiagramMetaInfo.cs new file mode 100644 index 000000000..51a4c4a30 --- /dev/null +++ b/CDP4Common/AutoGenMetaInfo/ArchitectureDiagramMetaInfo.cs @@ -0,0 +1,544 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.MetaInfo +{ + using System; + using System.Collections.Generic; + using System.Linq; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.Exceptions; + using CDP4Common.Helpers; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + using CDP4Common.Validation; + + /// + /// This a class that holds meta info for . + /// + public partial class ArchitectureDiagramMetaInfo : IArchitectureDiagramMetaInfo + { + /// + /// The containment property value map. + /// + private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> + { + { "Bounds", architectureDiagram => architectureDiagram.Bounds }, + { "DiagramElement", architectureDiagram => architectureDiagram.DiagramElement }, + }; + + /// + /// The ordered containment property value map. + /// + private readonly Dictionary>> orderedContainmentPropertyValueMap = new Dictionary>>(); + + /// + /// The validation rules that should pass for an instance of . + /// + private readonly Dictionary> validationRules = new Dictionary> + { + { "Bounds", new DtoValidationHelper(item => item.Bounds != null, "The 'Bounds' property of a 'ArchitectureDiagram' is mandatory and cannot be null.") }, + { "Description", new DtoValidationHelper(item => !string.IsNullOrWhiteSpace(item.Description), "The 'Description' property of a 'ArchitectureDiagram' is mandatory and cannot be empty or null.") }, + { "DiagramElement", new DtoValidationHelper(item => item.DiagramElement != null, "The 'DiagramElement' property of a 'ArchitectureDiagram' is mandatory and cannot be null.") }, + { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'ArchitectureDiagram' is mandatory and cannot be null.") }, + { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'ArchitectureDiagram' is mandatory and cannot be null.") }, + { "Name", new DtoValidationHelper(item => !string.IsNullOrWhiteSpace(item.Name), "The 'Name' property of a 'ArchitectureDiagram' is mandatory and cannot be empty or null.") }, + }; + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// If any validation rule failed. + /// + public void Validate(CDP4Common.DTO.Thing architectureDiagram) + { + this.Validate(architectureDiagram, x => true); + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// The validate Property. + /// + /// + /// If any validation rule failed. + /// + public void Validate(CDP4Common.DTO.Thing architectureDiagram, Func validateProperty) + { + foreach (var applicableRule in this.validationRules.Where(x => validateProperty(x.Key))) + { + applicableRule.Value.Validate((CDP4Common.DTO.ArchitectureDiagram)architectureDiagram); + } + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// True if all validation rules have passed or if none are defined. + /// + public bool TryValidate(CDP4Common.DTO.Thing architectureDiagram) + { + return this.TryValidate(architectureDiagram, x => true); + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// The validate Property. + /// + /// + /// True if all validation rules have passed or if none are defined. + /// + public bool TryValidate(CDP4Common.DTO.Thing architectureDiagram, Func validateProperty) + { + var applicableValidationRules = this.validationRules.Where(x => validateProperty(x.Key)).Select(x => x.Value); + + return applicableValidationRules.All(applicableRule => applicableRule.TryValidate((CDP4Common.DTO.ArchitectureDiagram)architectureDiagram)); + } + + /// + /// Returns the containment property value for the supplied . + /// + /// + /// The for which to return the containment property value. + /// + /// + /// Name of the containment property for which to return the value. + /// + /// + /// A collection of containment . + /// + /// + /// If the property name is not supported for the . + /// + public IEnumerable GetContainmentIds(CDP4Common.DTO.Thing architectureDiagram, string propertyName) + { + if (!this.containmentPropertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'ArchitectureDiagram'", propertyName)); + } + + return this.containmentPropertyValueMap[propertyName]((CDP4Common.DTO.ArchitectureDiagram)architectureDiagram); + } + + /// + /// Returns the ordered containment property value for the supplied . + /// + /// + /// The for which to return the containment property value. + /// + /// + /// Name of the containment property for which to return the value. + /// + /// + /// A collection of ordered containment . + /// + /// + /// If the property name is not supported for the . + /// + public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing architectureDiagram, string propertyName) + { + if (!this.orderedContainmentPropertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'ArchitectureDiagram'", propertyName)); + } + + return this.orderedContainmentPropertyValueMap[propertyName]((CDP4Common.DTO.ArchitectureDiagram)architectureDiagram); + } + + /// + /// The CDP version property map. + /// + private readonly Dictionary cdpVersionedProperties = new Dictionary + { + { "ExcludedDomain", "1.1.0" }, + { "ExcludedPerson", "1.1.0" }, + { "ModifiedOn", "1.1.0" }, + { "ThingPreference", "1.2.0" }, + }; + + /// + /// The containment property to type name map. + /// + private readonly Dictionary containmentTypeMap = new Dictionary + { + { "Bounds", new PropertyMetaInfo("Bounds", "Bounds", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, + { "DiagramElement", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + }; + + /// + /// Gets the for the class + /// + public IEnumerable Properties + { + get + { + foreach (var propertyMetaInfo in this.containmentTypeMap) + { + yield return propertyMetaInfo.Value; + } + + foreach (var propertyMetaInfo in this.propertyTypeMap) + { + yield return propertyMetaInfo.Value; + } + } + } + + /// + /// The property value map. + /// + private readonly Dictionary> propertyValueMap = new Dictionary> + { + { "Bounds", thing => thing.Bounds }, + { "ClassKind", thing => thing.ClassKind }, + { "CreatedOn", thing => thing.CreatedOn }, + { "Description", thing => thing.Description }, + { "DiagramElement", thing => thing.DiagramElement }, + { "ExcludedDomain", thing => thing.ExcludedDomain }, + { "ExcludedPerson", thing => thing.ExcludedPerson }, + { "Iid", thing => thing.Iid }, + { "ModifiedOn", thing => thing.ModifiedOn }, + { "Name", thing => thing.Name }, + { "Owner", thing => thing.Owner }, + { "PublicationState", thing => thing.PublicationState }, + { "RevisionNumber", thing => thing.RevisionNumber }, + { "ThingPreference", thing => thing.ThingPreference }, + { "TopArchitectureElement", thing => thing.TopArchitectureElement }, + }; + + /// + /// The property type map. + /// + /// + /// Contained properties are excluded for this map + /// + private readonly Dictionary propertyTypeMap = new Dictionary + { + { "ClassKind", new PropertyMetaInfo("ClassKind", "CDP4Common.CommonData.ClassKind", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "CreatedOn", new PropertyMetaInfo("CreatedOn", "DateTime", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "Description", new PropertyMetaInfo("Description", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ExcludedDomain", new PropertyMetaInfo("ExcludedDomain", "DomainOfExpertise", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, + { "ExcludedPerson", new PropertyMetaInfo("ExcludedPerson", "Person", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, + { "Iid", new PropertyMetaInfo("Iid", "Guid", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ModifiedOn", new PropertyMetaInfo("ModifiedOn", "DateTime", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "Name", new PropertyMetaInfo("Name", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "Owner", new PropertyMetaInfo("Owner", "DomainOfExpertise", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "PublicationState", new PropertyMetaInfo("PublicationState", "CDP4Common.DiagramData.PublicationState", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "RevisionNumber", new PropertyMetaInfo("RevisionNumber", "int", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ThingPreference", new PropertyMetaInfo("ThingPreference", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, + { "TopArchitectureElement", new PropertyMetaInfo("TopArchitectureElement", "ArchitectureElement", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, + }; + + /// + /// The collection property value deserialization map. + /// + private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> + { + { "Bounds", (value) => (Guid)value }, + { "DiagramElement", (value) => (Guid)value }, + { "ExcludedDomain", (value) => (Guid)value }, + { "ExcludedPerson", (value) => (Guid)value }, + }; + + /// + /// The property value assignment map. + /// + private readonly Dictionary> propertyValueAssignmentMap = new Dictionary> + { + { "CreatedOn", (architectureDiagram, value) => architectureDiagram.CreatedOn = (DateTime)value }, + { "Description", (architectureDiagram, value) => architectureDiagram.Description = value.ToString() }, + { "Iid", (architectureDiagram, value) => architectureDiagram.Iid = (Guid)value }, + { "ModifiedOn", (architectureDiagram, value) => architectureDiagram.ModifiedOn = (DateTime)value }, + { "Name", (architectureDiagram, value) => architectureDiagram.Name = value.ToString() }, + { "Owner", (architectureDiagram, value) => architectureDiagram.Owner = (Guid)value }, + { "PublicationState", (architectureDiagram, value) => architectureDiagram.PublicationState = (PublicationState)value }, + { "ThingPreference", (architectureDiagram, value) => architectureDiagram.ThingPreference = value == null ? (string)null : value.ToString() }, + { "TopArchitectureElement", (architectureDiagram, value) => architectureDiagram.TopArchitectureElement = value == null ? (Guid?)null : (Guid)value }, + }; + + /// + /// The possible container property map. + /// + private readonly Dictionary possibleContainerProperties = new Dictionary + { + { "Iteration", new PropertyMetaInfo("DiagramCanvas", "DiagramCanvas", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + }; + + /// + /// Gets a value indicating whether this type should be deprecated upon Delete. + /// + public bool IsDeprecatableThing + { + get + { + return false; + } + } + + /// + /// Gets a value indicating whether this type is a top container. + /// + public bool IsTopContainer + { + get + { + return false; + } + } + + /// + /// Gets the base type name of this class. + /// + public string BaseType + { + get { return "DiagramCanvas"; } + } + + /// + /// Gets the CDP class version. + /// + public string ClassVersion + { + get { return "1.3.0"; } + } + + /// + /// Get the data model version of the supplied property. + /// + /// + /// Name of the property for which to check if it is scalar. + /// + /// + /// The version number as specified property otherwise the default data model version. + /// + public string GetPropertyVersion(string propertyName) + { + return this.cdpVersionedProperties.ContainsKey(propertyName) ? this.cdpVersionedProperties[propertyName] : null; + } + + /// + /// Returns the containment property type from the supplied property name. + /// + /// + /// The containment property name. + /// + /// + /// The type name of the containment. + /// + /// + /// If the property name is not supported for the . + /// + public PropertyMetaInfo GetContainmentType(string propertyName) + { + if (!this.containmentTypeMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'ArchitectureDiagram'", propertyName)); + } + + return this.containmentTypeMap[propertyName]; + } + + /// + /// Returns the property type from the supplied property name. + /// + /// + /// The property name. + /// + /// + /// The or null if it does not exist. + /// + public PropertyMetaInfo GetPropertyMetaInfo(string propertyName) + { + if (this.containmentTypeMap.ContainsKey(propertyName)) + { + return this.containmentTypeMap[propertyName]; + } + + if (this.propertyTypeMap.ContainsKey(propertyName)) + { + return this.propertyTypeMap[propertyName]; + } + + return null; + } + + /// + /// Returns the container property for the supplied type name is a possible container for . + /// + /// + /// Name of the type for which to check if it is a container of . + /// + /// + /// Supplied container property info instance that will be set if the supplied type name is a container of . + /// + /// + /// True if the supplied typeName is a container for and sets the container property name. + /// + public bool TryGetContainerProperty(string typeName, out PropertyMetaInfo containerProperty) + { + var isContainer = this.possibleContainerProperties.ContainsKey(typeName); + containerProperty = isContainer ? this.possibleContainerProperties[typeName] : null; + + return isContainer; + } + + /// + /// Check if the supplied property name for is scalar. + /// + /// + /// Name of the property for which to check if it is scalar. + /// + /// + /// True if the supplied property name is a scalar property. + /// + public bool IsScalar(string propertyName) + { + if (this.propertyTypeMap.ContainsKey(propertyName)) + { + var propertyInfo = this.propertyTypeMap[propertyName]; + return propertyInfo.PropertyKind == PropertyKind.Scalar || propertyInfo.PropertyKind == PropertyKind.ValueArray; + } + + return false; + } + + /// + /// Apply the value update to the supplied property name of the updatable instance. + /// + /// + /// The instance to which to apply the property value update. + /// + /// + /// The property name of the to which to apply the value update. + /// + /// + /// The updated value to apply. + /// + /// + /// True if the value update was successfully applied. + /// + public bool ApplyPropertyUpdate(CDP4Common.DTO.Thing updatableThing, string propertyName, object value) + { + if (updatableThing == null || !this.IsScalar(propertyName)) + { + return false; + } + + this.propertyValueAssignmentMap[propertyName]((CDP4Common.DTO.ArchitectureDiagram)updatableThing, value); + + return true; + } + + /// + /// Returns a deserialized object from the supplied value string for the property name. + /// + /// + /// The property name. + /// + /// + /// The value to deserialize from its current string form. + /// + /// + /// A deserialized object from the supplied value. + /// + /// + /// If the property name is not supported for the . + /// + public object DeserializeCollectionValue(string propertyName, object value) + { + if (!this.collectionPropertyValueDeserializationMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid collection property of 'ArchitectureDiagram'", propertyName)); + } + + return this.collectionPropertyValueDeserializationMap[propertyName](value); + } + + /// + /// Returns the value of the property of a Thing + /// + /// + /// The property name. + /// + /// + /// The Thing object + /// + /// + /// The value of the property of a Thing + /// + /// + /// If the property name is not supported for the . + /// + public object GetValue(string propertyName, CDP4Common.DTO.Thing thing) + { + if (!this.propertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid collection property of 'ArchitectureDiagram'", propertyName)); + } + + return this.propertyValueMap[propertyName]((CDP4Common.DTO.ArchitectureDiagram)thing); + } + + /// + /// Gets the collection of property names for a + /// + public IEnumerable GetPropertyNameCollection() + { + var collection = new List(this.propertyTypeMap.Keys); + collection.AddRange(this.containmentTypeMap.Keys); + return collection; + } + + /// + /// Instantiates a + /// + /// + /// The instantiated + /// + public CDP4Common.DTO.Thing InstantiateDto(Guid guid, int revisionNumber) + { + return new CDP4Common.DTO.ArchitectureDiagram(guid, revisionNumber); + } + } +} diff --git a/CDP4Common/AutoGenMetaInfo/ArchitectureElementMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ArchitectureElementMetaInfo.cs new file mode 100644 index 000000000..105878968 --- /dev/null +++ b/CDP4Common/AutoGenMetaInfo/ArchitectureElementMetaInfo.cs @@ -0,0 +1,552 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.MetaInfo +{ + using System; + using System.Collections.Generic; + using System.Linq; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.Exceptions; + using CDP4Common.Helpers; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + using CDP4Common.Validation; + + /// + /// This a class that holds meta info for . + /// + public partial class ArchitectureElementMetaInfo : IArchitectureElementMetaInfo + { + /// + /// The containment property value map. + /// + private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> + { + { "Bounds", architectureElement => architectureElement.Bounds }, + { "DiagramElement", architectureElement => architectureElement.DiagramElement }, + { "LocalStyle", architectureElement => architectureElement.LocalStyle }, + }; + + /// + /// The ordered containment property value map. + /// + private readonly Dictionary>> orderedContainmentPropertyValueMap = new Dictionary>>(); + + /// + /// The validation rules that should pass for an instance of . + /// + private readonly Dictionary> validationRules = new Dictionary> + { + { "Bounds", new DtoValidationHelper(item => item.Bounds != null, "The 'Bounds' property of a 'ArchitectureElement' is mandatory and cannot be null.") }, + { "DiagramElement", new DtoValidationHelper(item => item.DiagramElement != null, "The 'DiagramElement' property of a 'ArchitectureElement' is mandatory and cannot be null.") }, + { "Documentation", new DtoValidationHelper(item => !string.IsNullOrWhiteSpace(item.Documentation), "The 'Documentation' property of a 'ArchitectureElement' is mandatory and cannot be empty or null.") }, + { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'ArchitectureElement' is mandatory and cannot be null.") }, + { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'ArchitectureElement' is mandatory and cannot be null.") }, + { "LocalStyle", new DtoValidationHelper(item => item.LocalStyle != null, "The 'LocalStyle' property of a 'ArchitectureElement' is mandatory and cannot be null.") }, + { "Name", new DtoValidationHelper(item => !string.IsNullOrWhiteSpace(item.Name), "The 'Name' property of a 'ArchitectureElement' is mandatory and cannot be empty or null.") }, + }; + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// If any validation rule failed. + /// + public void Validate(CDP4Common.DTO.Thing architectureElement) + { + this.Validate(architectureElement, x => true); + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// The validate Property. + /// + /// + /// If any validation rule failed. + /// + public void Validate(CDP4Common.DTO.Thing architectureElement, Func validateProperty) + { + foreach (var applicableRule in this.validationRules.Where(x => validateProperty(x.Key))) + { + applicableRule.Value.Validate((CDP4Common.DTO.ArchitectureElement)architectureElement); + } + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// True if all validation rules have passed or if none are defined. + /// + public bool TryValidate(CDP4Common.DTO.Thing architectureElement) + { + return this.TryValidate(architectureElement, x => true); + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// The validate Property. + /// + /// + /// True if all validation rules have passed or if none are defined. + /// + public bool TryValidate(CDP4Common.DTO.Thing architectureElement, Func validateProperty) + { + var applicableValidationRules = this.validationRules.Where(x => validateProperty(x.Key)).Select(x => x.Value); + + return applicableValidationRules.All(applicableRule => applicableRule.TryValidate((CDP4Common.DTO.ArchitectureElement)architectureElement)); + } + + /// + /// Returns the containment property value for the supplied . + /// + /// + /// The for which to return the containment property value. + /// + /// + /// Name of the containment property for which to return the value. + /// + /// + /// A collection of containment . + /// + /// + /// If the property name is not supported for the . + /// + public IEnumerable GetContainmentIds(CDP4Common.DTO.Thing architectureElement, string propertyName) + { + if (!this.containmentPropertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'ArchitectureElement'", propertyName)); + } + + return this.containmentPropertyValueMap[propertyName]((CDP4Common.DTO.ArchitectureElement)architectureElement); + } + + /// + /// Returns the ordered containment property value for the supplied . + /// + /// + /// The for which to return the containment property value. + /// + /// + /// Name of the containment property for which to return the value. + /// + /// + /// A collection of ordered containment . + /// + /// + /// If the property name is not supported for the . + /// + public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing architectureElement, string propertyName) + { + if (!this.orderedContainmentPropertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'ArchitectureElement'", propertyName)); + } + + return this.orderedContainmentPropertyValueMap[propertyName]((CDP4Common.DTO.ArchitectureElement)architectureElement); + } + + /// + /// The CDP version property map. + /// + private readonly Dictionary cdpVersionedProperties = new Dictionary + { + { "ExcludedDomain", "1.1.0" }, + { "ExcludedPerson", "1.1.0" }, + { "ModifiedOn", "1.1.0" }, + { "ThingPreference", "1.2.0" }, + }; + + /// + /// The containment property to type name map. + /// + private readonly Dictionary containmentTypeMap = new Dictionary + { + { "Bounds", new PropertyMetaInfo("Bounds", "Bounds", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, + { "DiagramElement", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "LocalStyle", new PropertyMetaInfo("LocalStyle", "OwnedStyle", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, + }; + + /// + /// Gets the for the class + /// + public IEnumerable Properties + { + get + { + foreach (var propertyMetaInfo in this.containmentTypeMap) + { + yield return propertyMetaInfo.Value; + } + + foreach (var propertyMetaInfo in this.propertyTypeMap) + { + yield return propertyMetaInfo.Value; + } + } + } + + /// + /// The property value map. + /// + private readonly Dictionary> propertyValueMap = new Dictionary> + { + { "Bounds", thing => thing.Bounds }, + { "ClassKind", thing => thing.ClassKind }, + { "DepictedThing", thing => thing.DepictedThing }, + { "DiagramElement", thing => thing.DiagramElement }, + { "Documentation", thing => thing.Documentation }, + { "ExcludedDomain", thing => thing.ExcludedDomain }, + { "ExcludedPerson", thing => thing.ExcludedPerson }, + { "Iid", thing => thing.Iid }, + { "LocalStyle", thing => thing.LocalStyle }, + { "ModifiedOn", thing => thing.ModifiedOn }, + { "Name", thing => thing.Name }, + { "Resolution", thing => thing.Resolution }, + { "RevisionNumber", thing => thing.RevisionNumber }, + { "SharedStyle", thing => thing.SharedStyle }, + { "ThingPreference", thing => thing.ThingPreference }, + }; + + /// + /// The property type map. + /// + /// + /// Contained properties are excluded for this map + /// + private readonly Dictionary propertyTypeMap = new Dictionary + { + { "ClassKind", new PropertyMetaInfo("ClassKind", "CDP4Common.CommonData.ClassKind", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "DepictedThing", new PropertyMetaInfo("DepictedThing", "Thing", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, + { "Documentation", new PropertyMetaInfo("Documentation", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ExcludedDomain", new PropertyMetaInfo("ExcludedDomain", "DomainOfExpertise", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, + { "ExcludedPerson", new PropertyMetaInfo("ExcludedPerson", "Person", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, + { "Iid", new PropertyMetaInfo("Iid", "Guid", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ModifiedOn", new PropertyMetaInfo("ModifiedOn", "DateTime", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "Name", new PropertyMetaInfo("Name", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "Resolution", new PropertyMetaInfo("Resolution", "float", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "RevisionNumber", new PropertyMetaInfo("RevisionNumber", "int", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "SharedStyle", new PropertyMetaInfo("SharedStyle", "SharedStyle", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, + { "ThingPreference", new PropertyMetaInfo("ThingPreference", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, + }; + + /// + /// The collection property value deserialization map. + /// + private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> + { + { "Bounds", (value) => (Guid)value }, + { "DiagramElement", (value) => (Guid)value }, + { "ExcludedDomain", (value) => (Guid)value }, + { "ExcludedPerson", (value) => (Guid)value }, + { "LocalStyle", (value) => (Guid)value }, + }; + + /// + /// The property value assignment map. + /// + private readonly Dictionary> propertyValueAssignmentMap = new Dictionary> + { + { "DepictedThing", (architectureElement, value) => architectureElement.DepictedThing = value == null ? (Guid?)null : (Guid)value }, + { "Documentation", (architectureElement, value) => architectureElement.Documentation = value.ToString() }, + { "Iid", (architectureElement, value) => architectureElement.Iid = (Guid)value }, + { "ModifiedOn", (architectureElement, value) => architectureElement.ModifiedOn = (DateTime)value }, + { "Name", (architectureElement, value) => architectureElement.Name = value.ToString() }, + { "Resolution", (architectureElement, value) => architectureElement.Resolution = (float)value }, + { "SharedStyle", (architectureElement, value) => architectureElement.SharedStyle = value == null ? (Guid?)null : (Guid)value }, + { "ThingPreference", (architectureElement, value) => architectureElement.ThingPreference = value == null ? (string)null : value.ToString() }, + }; + + /// + /// The possible container property map. + /// + private readonly Dictionary possibleContainerProperties = new Dictionary + { + { "ArchitectureDiagram", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ArchitectureElement", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramCanvas", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramEdge", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramFrame", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramObject", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramPort", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + }; + + /// + /// Gets a value indicating whether this type should be deprecated upon Delete. + /// + public bool IsDeprecatableThing + { + get + { + return false; + } + } + + /// + /// Gets a value indicating whether this type is a top container. + /// + public bool IsTopContainer + { + get + { + return false; + } + } + + /// + /// Gets the base type name of this class. + /// + public string BaseType + { + get { return "DiagramObject"; } + } + + /// + /// Gets the CDP class version. + /// + public string ClassVersion + { + get { return "1.3.0"; } + } + + /// + /// Get the data model version of the supplied property. + /// + /// + /// Name of the property for which to check if it is scalar. + /// + /// + /// The version number as specified property otherwise the default data model version. + /// + public string GetPropertyVersion(string propertyName) + { + return this.cdpVersionedProperties.ContainsKey(propertyName) ? this.cdpVersionedProperties[propertyName] : null; + } + + /// + /// Returns the containment property type from the supplied property name. + /// + /// + /// The containment property name. + /// + /// + /// The type name of the containment. + /// + /// + /// If the property name is not supported for the . + /// + public PropertyMetaInfo GetContainmentType(string propertyName) + { + if (!this.containmentTypeMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'ArchitectureElement'", propertyName)); + } + + return this.containmentTypeMap[propertyName]; + } + + /// + /// Returns the property type from the supplied property name. + /// + /// + /// The property name. + /// + /// + /// The or null if it does not exist. + /// + public PropertyMetaInfo GetPropertyMetaInfo(string propertyName) + { + if (this.containmentTypeMap.ContainsKey(propertyName)) + { + return this.containmentTypeMap[propertyName]; + } + + if (this.propertyTypeMap.ContainsKey(propertyName)) + { + return this.propertyTypeMap[propertyName]; + } + + return null; + } + + /// + /// Returns the container property for the supplied type name is a possible container for . + /// + /// + /// Name of the type for which to check if it is a container of . + /// + /// + /// Supplied container property info instance that will be set if the supplied type name is a container of . + /// + /// + /// True if the supplied typeName is a container for and sets the container property name. + /// + public bool TryGetContainerProperty(string typeName, out PropertyMetaInfo containerProperty) + { + var isContainer = this.possibleContainerProperties.ContainsKey(typeName); + containerProperty = isContainer ? this.possibleContainerProperties[typeName] : null; + + return isContainer; + } + + /// + /// Check if the supplied property name for is scalar. + /// + /// + /// Name of the property for which to check if it is scalar. + /// + /// + /// True if the supplied property name is a scalar property. + /// + public bool IsScalar(string propertyName) + { + if (this.propertyTypeMap.ContainsKey(propertyName)) + { + var propertyInfo = this.propertyTypeMap[propertyName]; + return propertyInfo.PropertyKind == PropertyKind.Scalar || propertyInfo.PropertyKind == PropertyKind.ValueArray; + } + + return false; + } + + /// + /// Apply the value update to the supplied property name of the updatable instance. + /// + /// + /// The instance to which to apply the property value update. + /// + /// + /// The property name of the to which to apply the value update. + /// + /// + /// The updated value to apply. + /// + /// + /// True if the value update was successfully applied. + /// + public bool ApplyPropertyUpdate(CDP4Common.DTO.Thing updatableThing, string propertyName, object value) + { + if (updatableThing == null || !this.IsScalar(propertyName)) + { + return false; + } + + this.propertyValueAssignmentMap[propertyName]((CDP4Common.DTO.ArchitectureElement)updatableThing, value); + + return true; + } + + /// + /// Returns a deserialized object from the supplied value string for the property name. + /// + /// + /// The property name. + /// + /// + /// The value to deserialize from its current string form. + /// + /// + /// A deserialized object from the supplied value. + /// + /// + /// If the property name is not supported for the . + /// + public object DeserializeCollectionValue(string propertyName, object value) + { + if (!this.collectionPropertyValueDeserializationMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid collection property of 'ArchitectureElement'", propertyName)); + } + + return this.collectionPropertyValueDeserializationMap[propertyName](value); + } + + /// + /// Returns the value of the property of a Thing + /// + /// + /// The property name. + /// + /// + /// The Thing object + /// + /// + /// The value of the property of a Thing + /// + /// + /// If the property name is not supported for the . + /// + public object GetValue(string propertyName, CDP4Common.DTO.Thing thing) + { + if (!this.propertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid collection property of 'ArchitectureElement'", propertyName)); + } + + return this.propertyValueMap[propertyName]((CDP4Common.DTO.ArchitectureElement)thing); + } + + /// + /// Gets the collection of property names for a + /// + public IEnumerable GetPropertyNameCollection() + { + var collection = new List(this.propertyTypeMap.Keys); + collection.AddRange(this.containmentTypeMap.Keys); + return collection; + } + + /// + /// Instantiates a + /// + /// + /// The instantiated + /// + public CDP4Common.DTO.Thing InstantiateDto(Guid guid, int revisionNumber) + { + return new CDP4Common.DTO.ArchitectureElement(guid, revisionNumber); + } + } +} diff --git a/CDP4Common/AutoGenMetaInfo/ArrayParameterTypeMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ArrayParameterTypeMetaInfo.cs index 1b22a267b..dc374e9d7 100644 --- a/CDP4Common/AutoGenMetaInfo/ArrayParameterTypeMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ArrayParameterTypeMetaInfo.cs @@ -48,6 +48,7 @@ public partial class ArrayParameterTypeMetaInfo : IArrayParameterTypeMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", arrayParameterType => arrayParameterType.Alias }, + { "Attachment", arrayParameterType => arrayParameterType.Attachment }, { "Component", arrayParameterType => arrayParameterType.Component.ToIdList() }, { "Definition", arrayParameterType => arrayParameterType.Definition }, { "HyperLink", arrayParameterType => arrayParameterType.HyperLink }, @@ -67,6 +68,7 @@ public partial class ArrayParameterTypeMetaInfo : IArrayParameterTypeMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'ArrayParameterType' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'ArrayParameterType' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'ArrayParameterType' is mandatory and cannot be null.") }, { "Component", new DtoValidationHelper(item => item.Component != null && item.Component.Any(), "The 'Component' property of a 'ArrayParameterType' is mandatory and must have at least one entry.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'ArrayParameterType' is mandatory and cannot be null.") }, @@ -213,6 +215,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing ar private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Component", new PropertyMetaInfo("Component", "ParameterTypeComponent", PropertyKind.OrderedList, AggregationKind.Composite, false, true, true, 1, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -243,6 +246,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Component", thing => thing.Component }, @@ -297,6 +301,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Component", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/AttachmentMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/AttachmentMetaInfo.cs new file mode 100644 index 000000000..285e64ca4 --- /dev/null +++ b/CDP4Common/AutoGenMetaInfo/AttachmentMetaInfo.cs @@ -0,0 +1,578 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.MetaInfo +{ + using System; + using System.Collections.Generic; + using System.Linq; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.Exceptions; + using CDP4Common.Helpers; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + using CDP4Common.Validation; + + /// + /// This a class that holds meta info for . + /// + public partial class AttachmentMetaInfo : IAttachmentMetaInfo + { + /// + /// The containment property value map. + /// + private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>>(); + + /// + /// The ordered containment property value map. + /// + private readonly Dictionary>> orderedContainmentPropertyValueMap = new Dictionary>>(); + + /// + /// The validation rules that should pass for an instance of . + /// + private readonly Dictionary> validationRules = new Dictionary> + { + { "ContentHash", new DtoValidationHelper(item => !string.IsNullOrWhiteSpace(item.ContentHash), "The 'ContentHash' property of a 'Attachment' is mandatory and cannot be empty or null.") }, + { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'Attachment' is mandatory and cannot be null.") }, + { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'Attachment' is mandatory and cannot be null.") }, + { "FileName", new DtoValidationHelper(item => !string.IsNullOrWhiteSpace(item.FileName), "The 'FileName' property of a 'Attachment' is mandatory and cannot be empty or null.") }, + { "FileType", new DtoValidationHelper(item => item.FileType != null && item.FileType.Any(), "The 'FileType' property of a 'Attachment' is mandatory and must have at least one entry.") }, + }; + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// If any validation rule failed. + /// + public void Validate(CDP4Common.DTO.Thing attachment) + { + this.Validate(attachment, x => true); + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// The validate Property. + /// + /// + /// If any validation rule failed. + /// + public void Validate(CDP4Common.DTO.Thing attachment, Func validateProperty) + { + foreach (var applicableRule in this.validationRules.Where(x => validateProperty(x.Key))) + { + applicableRule.Value.Validate((CDP4Common.DTO.Attachment)attachment); + } + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// True if all validation rules have passed or if none are defined. + /// + public bool TryValidate(CDP4Common.DTO.Thing attachment) + { + return this.TryValidate(attachment, x => true); + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// The validate Property. + /// + /// + /// True if all validation rules have passed or if none are defined. + /// + public bool TryValidate(CDP4Common.DTO.Thing attachment, Func validateProperty) + { + var applicableValidationRules = this.validationRules.Where(x => validateProperty(x.Key)).Select(x => x.Value); + + return applicableValidationRules.All(applicableRule => applicableRule.TryValidate((CDP4Common.DTO.Attachment)attachment)); + } + + /// + /// Returns the containment property value for the supplied . + /// + /// + /// The for which to return the containment property value. + /// + /// + /// Name of the containment property for which to return the value. + /// + /// + /// A collection of containment . + /// + /// + /// If the property name is not supported for the . + /// + public IEnumerable GetContainmentIds(CDP4Common.DTO.Thing attachment, string propertyName) + { + if (!this.containmentPropertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'Attachment'", propertyName)); + } + + return this.containmentPropertyValueMap[propertyName]((CDP4Common.DTO.Attachment)attachment); + } + + /// + /// Returns the ordered containment property value for the supplied . + /// + /// + /// The for which to return the containment property value. + /// + /// + /// Name of the containment property for which to return the value. + /// + /// + /// A collection of ordered containment . + /// + /// + /// If the property name is not supported for the . + /// + public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing attachment, string propertyName) + { + if (!this.orderedContainmentPropertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'Attachment'", propertyName)); + } + + return this.orderedContainmentPropertyValueMap[propertyName]((CDP4Common.DTO.Attachment)attachment); + } + + /// + /// The CDP version property map. + /// + private readonly Dictionary cdpVersionedProperties = new Dictionary + { + { "ExcludedDomain", "1.1.0" }, + { "ExcludedPerson", "1.1.0" }, + { "ModifiedOn", "1.1.0" }, + { "ThingPreference", "1.2.0" }, + }; + + /// + /// The containment property to type name map. + /// + private readonly Dictionary containmentTypeMap = new Dictionary(); + + /// + /// Gets the for the class + /// + public IEnumerable Properties + { + get + { + foreach (var propertyMetaInfo in this.containmentTypeMap) + { + yield return propertyMetaInfo.Value; + } + + foreach (var propertyMetaInfo in this.propertyTypeMap) + { + yield return propertyMetaInfo.Value; + } + } + } + + /// + /// The property value map. + /// + private readonly Dictionary> propertyValueMap = new Dictionary> + { + { "ClassKind", thing => thing.ClassKind }, + { "ContentHash", thing => thing.ContentHash }, + { "ExcludedDomain", thing => thing.ExcludedDomain }, + { "ExcludedPerson", thing => thing.ExcludedPerson }, + { "FileName", thing => thing.FileName }, + { "FileType", thing => thing.FileType }, + { "Iid", thing => thing.Iid }, + { "ModifiedOn", thing => thing.ModifiedOn }, + { "RevisionNumber", thing => thing.RevisionNumber }, + { "ThingPreference", thing => thing.ThingPreference }, + }; + + /// + /// The property type map. + /// + /// + /// Contained properties are excluded for this map + /// + private readonly Dictionary propertyTypeMap = new Dictionary + { + { "ClassKind", new PropertyMetaInfo("ClassKind", "CDP4Common.CommonData.ClassKind", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ContentHash", new PropertyMetaInfo("ContentHash", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ExcludedDomain", new PropertyMetaInfo("ExcludedDomain", "DomainOfExpertise", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, + { "ExcludedPerson", new PropertyMetaInfo("ExcludedPerson", "Person", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, + { "FileName", new PropertyMetaInfo("FileName", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "FileType", new PropertyMetaInfo("FileType", "FileType", PropertyKind.List, AggregationKind.None, false, false, true, 1, "*", true) }, + { "Iid", new PropertyMetaInfo("Iid", "Guid", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ModifiedOn", new PropertyMetaInfo("ModifiedOn", "DateTime", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "RevisionNumber", new PropertyMetaInfo("RevisionNumber", "int", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ThingPreference", new PropertyMetaInfo("ThingPreference", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, + }; + + /// + /// The collection property value deserialization map. + /// + private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> + { + { "ExcludedDomain", (value) => (Guid)value }, + { "ExcludedPerson", (value) => (Guid)value }, + { "FileType", (value) => (Guid)value }, + }; + + /// + /// The property value assignment map. + /// + private readonly Dictionary> propertyValueAssignmentMap = new Dictionary> + { + { "ContentHash", (attachment, value) => attachment.ContentHash = value.ToString() }, + { "FileName", (attachment, value) => attachment.FileName = value.ToString() }, + { "Iid", (attachment, value) => attachment.Iid = (Guid)value }, + { "ModifiedOn", (attachment, value) => attachment.ModifiedOn = (DateTime)value }, + { "ThingPreference", (attachment, value) => attachment.ThingPreference = value == null ? (string)null : value.ToString() }, + }; + + /// + /// The possible container property map. + /// + private readonly Dictionary possibleContainerProperties = new Dictionary + { + { "ArrayParameterType", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Behavior", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "BinaryRelationshipRule", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "BooleanParameterType", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Category", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "CompoundParameterType", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Constant", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "CyclicRatioScale", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DateParameterType", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DateTimeParameterType", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DecompositionRule", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DerivedQuantityKind", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DerivedUnit", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DomainOfExpertise", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DomainOfExpertiseGroup", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ElementDefinition", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ElementUsage", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "EngineeringModelSetup", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "EnumerationParameterType", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "EnumerationValueDefinition", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "FileType", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Glossary", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Goal", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "IntervalScale", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "LinearConversionUnit", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "LogarithmicScale", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ModelReferenceDataLibrary", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "MultiRelationshipRule", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Option", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "OrdinalScale", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ParameterizedCategoryRule", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ParticipantRole", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "PersonRole", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "PossibleFiniteState", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "PossibleFiniteStateList", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "PrefixedUnit", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "RatioScale", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ReferencerRule", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ReferenceSource", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Requirement", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "RequirementsGroup", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "RequirementsSpecification", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "RuleVerificationList", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "SampledFunctionParameterType", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ScaleValueDefinition", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "SimpleQuantityKind", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "SimpleUnit", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "SiteReferenceDataLibrary", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "SpecializedQuantityKind", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Stakeholder", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "StakeholderValue", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "StakeHolderValueMap", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Term", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "TextParameterType", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "TimeOfDayParameterType", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "UnitPrefix", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ValueGroup", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + }; + + /// + /// Gets a value indicating whether this type should be deprecated upon Delete. + /// + public bool IsDeprecatableThing + { + get + { + return false; + } + } + + /// + /// Gets a value indicating whether this type is a top container. + /// + public bool IsTopContainer + { + get + { + return false; + } + } + + /// + /// Gets the base type name of this class. + /// + public string BaseType + { + get { return "Thing"; } + } + + /// + /// Gets the CDP class version. + /// + public string ClassVersion + { + get { return "1.3.0"; } + } + + /// + /// Get the data model version of the supplied property. + /// + /// + /// Name of the property for which to check if it is scalar. + /// + /// + /// The version number as specified property otherwise the default data model version. + /// + public string GetPropertyVersion(string propertyName) + { + return this.cdpVersionedProperties.ContainsKey(propertyName) ? this.cdpVersionedProperties[propertyName] : null; + } + + /// + /// Returns the containment property type from the supplied property name. + /// + /// + /// The containment property name. + /// + /// + /// The type name of the containment. + /// + /// + /// If the property name is not supported for the . + /// + public PropertyMetaInfo GetContainmentType(string propertyName) + { + if (!this.containmentTypeMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'Attachment'", propertyName)); + } + + return this.containmentTypeMap[propertyName]; + } + + /// + /// Returns the property type from the supplied property name. + /// + /// + /// The property name. + /// + /// + /// The or null if it does not exist. + /// + public PropertyMetaInfo GetPropertyMetaInfo(string propertyName) + { + if (this.containmentTypeMap.ContainsKey(propertyName)) + { + return this.containmentTypeMap[propertyName]; + } + + if (this.propertyTypeMap.ContainsKey(propertyName)) + { + return this.propertyTypeMap[propertyName]; + } + + return null; + } + + /// + /// Returns the container property for the supplied type name is a possible container for . + /// + /// + /// Name of the type for which to check if it is a container of . + /// + /// + /// Supplied container property info instance that will be set if the supplied type name is a container of . + /// + /// + /// True if the supplied typeName is a container for and sets the container property name. + /// + public bool TryGetContainerProperty(string typeName, out PropertyMetaInfo containerProperty) + { + var isContainer = this.possibleContainerProperties.ContainsKey(typeName); + containerProperty = isContainer ? this.possibleContainerProperties[typeName] : null; + + return isContainer; + } + + /// + /// Check if the supplied property name for is scalar. + /// + /// + /// Name of the property for which to check if it is scalar. + /// + /// + /// True if the supplied property name is a scalar property. + /// + public bool IsScalar(string propertyName) + { + if (this.propertyTypeMap.ContainsKey(propertyName)) + { + var propertyInfo = this.propertyTypeMap[propertyName]; + return propertyInfo.PropertyKind == PropertyKind.Scalar || propertyInfo.PropertyKind == PropertyKind.ValueArray; + } + + return false; + } + + /// + /// Apply the value update to the supplied property name of the updatable instance. + /// + /// + /// The instance to which to apply the property value update. + /// + /// + /// The property name of the to which to apply the value update. + /// + /// + /// The updated value to apply. + /// + /// + /// True if the value update was successfully applied. + /// + public bool ApplyPropertyUpdate(CDP4Common.DTO.Thing updatableThing, string propertyName, object value) + { + if (updatableThing == null || !this.IsScalar(propertyName)) + { + return false; + } + + this.propertyValueAssignmentMap[propertyName]((CDP4Common.DTO.Attachment)updatableThing, value); + + return true; + } + + /// + /// Returns a deserialized object from the supplied value string for the property name. + /// + /// + /// The property name. + /// + /// + /// The value to deserialize from its current string form. + /// + /// + /// A deserialized object from the supplied value. + /// + /// + /// If the property name is not supported for the . + /// + public object DeserializeCollectionValue(string propertyName, object value) + { + if (!this.collectionPropertyValueDeserializationMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid collection property of 'Attachment'", propertyName)); + } + + return this.collectionPropertyValueDeserializationMap[propertyName](value); + } + + /// + /// Returns the value of the property of a Thing + /// + /// + /// The property name. + /// + /// + /// The Thing object + /// + /// + /// The value of the property of a Thing + /// + /// + /// If the property name is not supported for the . + /// + public object GetValue(string propertyName, CDP4Common.DTO.Thing thing) + { + if (!this.propertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid collection property of 'Attachment'", propertyName)); + } + + return this.propertyValueMap[propertyName]((CDP4Common.DTO.Attachment)thing); + } + + /// + /// Gets the collection of property names for a + /// + public IEnumerable GetPropertyNameCollection() + { + var collection = new List(this.propertyTypeMap.Keys); + collection.AddRange(this.containmentTypeMap.Keys); + return collection; + } + + /// + /// Instantiates a + /// + /// + /// The instantiated + /// + public CDP4Common.DTO.Thing InstantiateDto(Guid guid, int revisionNumber) + { + return new CDP4Common.DTO.Attachment(guid, revisionNumber); + } + } +} diff --git a/CDP4Common/AutoGenMetaInfo/BehaviorMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/BehaviorMetaInfo.cs new file mode 100644 index 000000000..52926b2fa --- /dev/null +++ b/CDP4Common/AutoGenMetaInfo/BehaviorMetaInfo.cs @@ -0,0 +1,553 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.MetaInfo +{ + using System; + using System.Collections.Generic; + using System.Linq; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.Exceptions; + using CDP4Common.Helpers; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + using CDP4Common.Validation; + + /// + /// This a class that holds meta info for . + /// + public partial class BehaviorMetaInfo : IBehaviorMetaInfo + { + /// + /// The containment property value map. + /// + private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> + { + { "Alias", behavior => behavior.Alias }, + { "Attachment", behavior => behavior.Attachment }, + { "BehavioralParameter", behavior => behavior.BehavioralParameter }, + { "Definition", behavior => behavior.Definition }, + { "HyperLink", behavior => behavior.HyperLink }, + }; + + /// + /// The ordered containment property value map. + /// + private readonly Dictionary>> orderedContainmentPropertyValueMap = new Dictionary>>(); + + /// + /// The validation rules that should pass for an instance of . + /// + private readonly Dictionary> validationRules = new Dictionary> + { + { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'Behavior' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'Behavior' is mandatory and cannot be null.") }, + { "BehavioralParameter", new DtoValidationHelper(item => item.BehavioralParameter != null, "The 'BehavioralParameter' property of a 'Behavior' is mandatory and cannot be null.") }, + { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'Behavior' is mandatory and cannot be null.") }, + { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'Behavior' is mandatory and cannot be null.") }, + { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'Behavior' is mandatory and cannot be null.") }, + { "HyperLink", new DtoValidationHelper(item => item.HyperLink != null, "The 'HyperLink' property of a 'Behavior' is mandatory and cannot be null.") }, + { "Name", new DtoValidationHelper(item => !string.IsNullOrWhiteSpace(item.Name), "The 'Name' property of a 'Behavior' is mandatory and cannot be empty or null.") }, + { "ShortName", new DtoValidationHelper(item => !string.IsNullOrWhiteSpace(item.ShortName), "The 'ShortName' property of a 'Behavior' is mandatory and cannot be empty or null.") }, + }; + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// If any validation rule failed. + /// + public void Validate(CDP4Common.DTO.Thing behavior) + { + this.Validate(behavior, x => true); + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// The validate Property. + /// + /// + /// If any validation rule failed. + /// + public void Validate(CDP4Common.DTO.Thing behavior, Func validateProperty) + { + foreach (var applicableRule in this.validationRules.Where(x => validateProperty(x.Key))) + { + applicableRule.Value.Validate((CDP4Common.DTO.Behavior)behavior); + } + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// True if all validation rules have passed or if none are defined. + /// + public bool TryValidate(CDP4Common.DTO.Thing behavior) + { + return this.TryValidate(behavior, x => true); + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// The validate Property. + /// + /// + /// True if all validation rules have passed or if none are defined. + /// + public bool TryValidate(CDP4Common.DTO.Thing behavior, Func validateProperty) + { + var applicableValidationRules = this.validationRules.Where(x => validateProperty(x.Key)).Select(x => x.Value); + + return applicableValidationRules.All(applicableRule => applicableRule.TryValidate((CDP4Common.DTO.Behavior)behavior)); + } + + /// + /// Returns the containment property value for the supplied . + /// + /// + /// The for which to return the containment property value. + /// + /// + /// Name of the containment property for which to return the value. + /// + /// + /// A collection of containment . + /// + /// + /// If the property name is not supported for the . + /// + public IEnumerable GetContainmentIds(CDP4Common.DTO.Thing behavior, string propertyName) + { + if (!this.containmentPropertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'Behavior'", propertyName)); + } + + return this.containmentPropertyValueMap[propertyName]((CDP4Common.DTO.Behavior)behavior); + } + + /// + /// Returns the ordered containment property value for the supplied . + /// + /// + /// The for which to return the containment property value. + /// + /// + /// Name of the containment property for which to return the value. + /// + /// + /// A collection of ordered containment . + /// + /// + /// If the property name is not supported for the . + /// + public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing behavior, string propertyName) + { + if (!this.orderedContainmentPropertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'Behavior'", propertyName)); + } + + return this.orderedContainmentPropertyValueMap[propertyName]((CDP4Common.DTO.Behavior)behavior); + } + + /// + /// The CDP version property map. + /// + private readonly Dictionary cdpVersionedProperties = new Dictionary + { + { "ExcludedDomain", "1.1.0" }, + { "ExcludedPerson", "1.1.0" }, + { "ModifiedOn", "1.1.0" }, + { "ThingPreference", "1.2.0" }, + }; + + /// + /// The containment property to type name map. + /// + private readonly Dictionary containmentTypeMap = new Dictionary + { + { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "BehavioralParameter", new PropertyMetaInfo("BehavioralParameter", "BehavioralParameter", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + }; + + /// + /// Gets the for the class + /// + public IEnumerable Properties + { + get + { + foreach (var propertyMetaInfo in this.containmentTypeMap) + { + yield return propertyMetaInfo.Value; + } + + foreach (var propertyMetaInfo in this.propertyTypeMap) + { + yield return propertyMetaInfo.Value; + } + } + } + + /// + /// The property value map. + /// + private readonly Dictionary> propertyValueMap = new Dictionary> + { + { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, + { "BehavioralModelKind", thing => thing.BehavioralModelKind }, + { "BehavioralParameter", thing => thing.BehavioralParameter }, + { "ClassKind", thing => thing.ClassKind }, + { "Definition", thing => thing.Definition }, + { "ExcludedDomain", thing => thing.ExcludedDomain }, + { "ExcludedPerson", thing => thing.ExcludedPerson }, + { "HyperLink", thing => thing.HyperLink }, + { "Iid", thing => thing.Iid }, + { "ModifiedOn", thing => thing.ModifiedOn }, + { "Name", thing => thing.Name }, + { "RevisionNumber", thing => thing.RevisionNumber }, + { "Script", thing => thing.Script }, + { "ShortName", thing => thing.ShortName }, + { "ThingPreference", thing => thing.ThingPreference }, + }; + + /// + /// The property type map. + /// + /// + /// Contained properties are excluded for this map + /// + private readonly Dictionary propertyTypeMap = new Dictionary + { + { "BehavioralModelKind", new PropertyMetaInfo("BehavioralModelKind", "CDP4Common.EngineeringModelData.BehavioralModelKind", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ClassKind", new PropertyMetaInfo("ClassKind", "CDP4Common.CommonData.ClassKind", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ExcludedDomain", new PropertyMetaInfo("ExcludedDomain", "DomainOfExpertise", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, + { "ExcludedPerson", new PropertyMetaInfo("ExcludedPerson", "Person", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, + { "Iid", new PropertyMetaInfo("Iid", "Guid", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ModifiedOn", new PropertyMetaInfo("ModifiedOn", "DateTime", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "Name", new PropertyMetaInfo("Name", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "RevisionNumber", new PropertyMetaInfo("RevisionNumber", "int", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "Script", new PropertyMetaInfo("Script", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, + { "ShortName", new PropertyMetaInfo("ShortName", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ThingPreference", new PropertyMetaInfo("ThingPreference", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, + }; + + /// + /// The collection property value deserialization map. + /// + private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> + { + { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, + { "BehavioralParameter", (value) => (Guid)value }, + { "Definition", (value) => (Guid)value }, + { "ExcludedDomain", (value) => (Guid)value }, + { "ExcludedPerson", (value) => (Guid)value }, + { "HyperLink", (value) => (Guid)value }, + }; + + /// + /// The property value assignment map. + /// + private readonly Dictionary> propertyValueAssignmentMap = new Dictionary> + { + { "BehavioralModelKind", (behavior, value) => behavior.BehavioralModelKind = (BehavioralModelKind)value }, + { "Iid", (behavior, value) => behavior.Iid = (Guid)value }, + { "ModifiedOn", (behavior, value) => behavior.ModifiedOn = (DateTime)value }, + { "Name", (behavior, value) => behavior.Name = value.ToString() }, + { "Script", (behavior, value) => behavior.Script = value == null ? (string)null : value.ToString() }, + { "ShortName", (behavior, value) => behavior.ShortName = value.ToString() }, + { "ThingPreference", (behavior, value) => behavior.ThingPreference = value == null ? (string)null : value.ToString() }, + }; + + /// + /// The possible container property map. + /// + private readonly Dictionary possibleContainerProperties = new Dictionary + { + { "ElementDefinition", new PropertyMetaInfo("Behavior", "Behavior", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + }; + + /// + /// Gets a value indicating whether this type should be deprecated upon Delete. + /// + public bool IsDeprecatableThing + { + get + { + return false; + } + } + + /// + /// Gets a value indicating whether this type is a top container. + /// + public bool IsTopContainer + { + get + { + return false; + } + } + + /// + /// Gets the base type name of this class. + /// + public string BaseType + { + get { return "DefinedThing"; } + } + + /// + /// Gets the CDP class version. + /// + public string ClassVersion + { + get { return "1.3.0"; } + } + + /// + /// Get the data model version of the supplied property. + /// + /// + /// Name of the property for which to check if it is scalar. + /// + /// + /// The version number as specified property otherwise the default data model version. + /// + public string GetPropertyVersion(string propertyName) + { + return this.cdpVersionedProperties.ContainsKey(propertyName) ? this.cdpVersionedProperties[propertyName] : null; + } + + /// + /// Returns the containment property type from the supplied property name. + /// + /// + /// The containment property name. + /// + /// + /// The type name of the containment. + /// + /// + /// If the property name is not supported for the . + /// + public PropertyMetaInfo GetContainmentType(string propertyName) + { + if (!this.containmentTypeMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'Behavior'", propertyName)); + } + + return this.containmentTypeMap[propertyName]; + } + + /// + /// Returns the property type from the supplied property name. + /// + /// + /// The property name. + /// + /// + /// The or null if it does not exist. + /// + public PropertyMetaInfo GetPropertyMetaInfo(string propertyName) + { + if (this.containmentTypeMap.ContainsKey(propertyName)) + { + return this.containmentTypeMap[propertyName]; + } + + if (this.propertyTypeMap.ContainsKey(propertyName)) + { + return this.propertyTypeMap[propertyName]; + } + + return null; + } + + /// + /// Returns the container property for the supplied type name is a possible container for . + /// + /// + /// Name of the type for which to check if it is a container of . + /// + /// + /// Supplied container property info instance that will be set if the supplied type name is a container of . + /// + /// + /// True if the supplied typeName is a container for and sets the container property name. + /// + public bool TryGetContainerProperty(string typeName, out PropertyMetaInfo containerProperty) + { + var isContainer = this.possibleContainerProperties.ContainsKey(typeName); + containerProperty = isContainer ? this.possibleContainerProperties[typeName] : null; + + return isContainer; + } + + /// + /// Check if the supplied property name for is scalar. + /// + /// + /// Name of the property for which to check if it is scalar. + /// + /// + /// True if the supplied property name is a scalar property. + /// + public bool IsScalar(string propertyName) + { + if (this.propertyTypeMap.ContainsKey(propertyName)) + { + var propertyInfo = this.propertyTypeMap[propertyName]; + return propertyInfo.PropertyKind == PropertyKind.Scalar || propertyInfo.PropertyKind == PropertyKind.ValueArray; + } + + return false; + } + + /// + /// Apply the value update to the supplied property name of the updatable instance. + /// + /// + /// The instance to which to apply the property value update. + /// + /// + /// The property name of the to which to apply the value update. + /// + /// + /// The updated value to apply. + /// + /// + /// True if the value update was successfully applied. + /// + public bool ApplyPropertyUpdate(CDP4Common.DTO.Thing updatableThing, string propertyName, object value) + { + if (updatableThing == null || !this.IsScalar(propertyName)) + { + return false; + } + + this.propertyValueAssignmentMap[propertyName]((CDP4Common.DTO.Behavior)updatableThing, value); + + return true; + } + + /// + /// Returns a deserialized object from the supplied value string for the property name. + /// + /// + /// The property name. + /// + /// + /// The value to deserialize from its current string form. + /// + /// + /// A deserialized object from the supplied value. + /// + /// + /// If the property name is not supported for the . + /// + public object DeserializeCollectionValue(string propertyName, object value) + { + if (!this.collectionPropertyValueDeserializationMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid collection property of 'Behavior'", propertyName)); + } + + return this.collectionPropertyValueDeserializationMap[propertyName](value); + } + + /// + /// Returns the value of the property of a Thing + /// + /// + /// The property name. + /// + /// + /// The Thing object + /// + /// + /// The value of the property of a Thing + /// + /// + /// If the property name is not supported for the . + /// + public object GetValue(string propertyName, CDP4Common.DTO.Thing thing) + { + if (!this.propertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid collection property of 'Behavior'", propertyName)); + } + + return this.propertyValueMap[propertyName]((CDP4Common.DTO.Behavior)thing); + } + + /// + /// Gets the collection of property names for a + /// + public IEnumerable GetPropertyNameCollection() + { + var collection = new List(this.propertyTypeMap.Keys); + collection.AddRange(this.containmentTypeMap.Keys); + return collection; + } + + /// + /// Instantiates a + /// + /// + /// The instantiated + /// + public CDP4Common.DTO.Thing InstantiateDto(Guid guid, int revisionNumber) + { + return new CDP4Common.DTO.Behavior(guid, revisionNumber); + } + } +} diff --git a/CDP4Common/AutoGenMetaInfo/BehavioralParameterMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/BehavioralParameterMetaInfo.cs new file mode 100644 index 000000000..7f3026463 --- /dev/null +++ b/CDP4Common/AutoGenMetaInfo/BehavioralParameterMetaInfo.cs @@ -0,0 +1,520 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.MetaInfo +{ + using System; + using System.Collections.Generic; + using System.Linq; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.Exceptions; + using CDP4Common.Helpers; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + using CDP4Common.Validation; + + /// + /// This a class that holds meta info for . + /// + public partial class BehavioralParameterMetaInfo : IBehavioralParameterMetaInfo + { + /// + /// The containment property value map. + /// + private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>>(); + + /// + /// The ordered containment property value map. + /// + private readonly Dictionary>> orderedContainmentPropertyValueMap = new Dictionary>>(); + + /// + /// The validation rules that should pass for an instance of . + /// + private readonly Dictionary> validationRules = new Dictionary> + { + { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'BehavioralParameter' is mandatory and cannot be null.") }, + { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'BehavioralParameter' is mandatory and cannot be null.") }, + { "VariableName", new DtoValidationHelper(item => !string.IsNullOrWhiteSpace(item.VariableName), "The 'VariableName' property of a 'BehavioralParameter' is mandatory and cannot be empty or null.") }, + }; + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// If any validation rule failed. + /// + public void Validate(CDP4Common.DTO.Thing behavioralParameter) + { + this.Validate(behavioralParameter, x => true); + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// The validate Property. + /// + /// + /// If any validation rule failed. + /// + public void Validate(CDP4Common.DTO.Thing behavioralParameter, Func validateProperty) + { + foreach (var applicableRule in this.validationRules.Where(x => validateProperty(x.Key))) + { + applicableRule.Value.Validate((CDP4Common.DTO.BehavioralParameter)behavioralParameter); + } + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// True if all validation rules have passed or if none are defined. + /// + public bool TryValidate(CDP4Common.DTO.Thing behavioralParameter) + { + return this.TryValidate(behavioralParameter, x => true); + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// The validate Property. + /// + /// + /// True if all validation rules have passed or if none are defined. + /// + public bool TryValidate(CDP4Common.DTO.Thing behavioralParameter, Func validateProperty) + { + var applicableValidationRules = this.validationRules.Where(x => validateProperty(x.Key)).Select(x => x.Value); + + return applicableValidationRules.All(applicableRule => applicableRule.TryValidate((CDP4Common.DTO.BehavioralParameter)behavioralParameter)); + } + + /// + /// Returns the containment property value for the supplied . + /// + /// + /// The for which to return the containment property value. + /// + /// + /// Name of the containment property for which to return the value. + /// + /// + /// A collection of containment . + /// + /// + /// If the property name is not supported for the . + /// + public IEnumerable GetContainmentIds(CDP4Common.DTO.Thing behavioralParameter, string propertyName) + { + if (!this.containmentPropertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'BehavioralParameter'", propertyName)); + } + + return this.containmentPropertyValueMap[propertyName]((CDP4Common.DTO.BehavioralParameter)behavioralParameter); + } + + /// + /// Returns the ordered containment property value for the supplied . + /// + /// + /// The for which to return the containment property value. + /// + /// + /// Name of the containment property for which to return the value. + /// + /// + /// A collection of ordered containment . + /// + /// + /// If the property name is not supported for the . + /// + public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing behavioralParameter, string propertyName) + { + if (!this.orderedContainmentPropertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'BehavioralParameter'", propertyName)); + } + + return this.orderedContainmentPropertyValueMap[propertyName]((CDP4Common.DTO.BehavioralParameter)behavioralParameter); + } + + /// + /// The CDP version property map. + /// + private readonly Dictionary cdpVersionedProperties = new Dictionary + { + { "ExcludedDomain", "1.1.0" }, + { "ExcludedPerson", "1.1.0" }, + { "ModifiedOn", "1.1.0" }, + { "ThingPreference", "1.2.0" }, + }; + + /// + /// The containment property to type name map. + /// + private readonly Dictionary containmentTypeMap = new Dictionary(); + + /// + /// Gets the for the class + /// + public IEnumerable Properties + { + get + { + foreach (var propertyMetaInfo in this.containmentTypeMap) + { + yield return propertyMetaInfo.Value; + } + + foreach (var propertyMetaInfo in this.propertyTypeMap) + { + yield return propertyMetaInfo.Value; + } + } + } + + /// + /// The property value map. + /// + private readonly Dictionary> propertyValueMap = new Dictionary> + { + { "BehavioralParameterKind", thing => thing.BehavioralParameterKind }, + { "ClassKind", thing => thing.ClassKind }, + { "ExcludedDomain", thing => thing.ExcludedDomain }, + { "ExcludedPerson", thing => thing.ExcludedPerson }, + { "Iid", thing => thing.Iid }, + { "ModifiedOn", thing => thing.ModifiedOn }, + { "Parameter", thing => thing.Parameter }, + { "RevisionNumber", thing => thing.RevisionNumber }, + { "ThingPreference", thing => thing.ThingPreference }, + { "VariableName", thing => thing.VariableName }, + }; + + /// + /// The property type map. + /// + /// + /// Contained properties are excluded for this map + /// + private readonly Dictionary propertyTypeMap = new Dictionary + { + { "BehavioralParameterKind", new PropertyMetaInfo("BehavioralParameterKind", "CDP4Common.EngineeringModelData.BehavioralParameterKind", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ClassKind", new PropertyMetaInfo("ClassKind", "CDP4Common.CommonData.ClassKind", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ExcludedDomain", new PropertyMetaInfo("ExcludedDomain", "DomainOfExpertise", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, + { "ExcludedPerson", new PropertyMetaInfo("ExcludedPerson", "Person", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, + { "Iid", new PropertyMetaInfo("Iid", "Guid", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ModifiedOn", new PropertyMetaInfo("ModifiedOn", "DateTime", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "Parameter", new PropertyMetaInfo("Parameter", "Parameter", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "RevisionNumber", new PropertyMetaInfo("RevisionNumber", "int", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ThingPreference", new PropertyMetaInfo("ThingPreference", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, + { "VariableName", new PropertyMetaInfo("VariableName", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + }; + + /// + /// The collection property value deserialization map. + /// + private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> + { + { "ExcludedDomain", (value) => (Guid)value }, + { "ExcludedPerson", (value) => (Guid)value }, + }; + + /// + /// The property value assignment map. + /// + private readonly Dictionary> propertyValueAssignmentMap = new Dictionary> + { + { "BehavioralParameterKind", (behavioralParameter, value) => behavioralParameter.BehavioralParameterKind = (BehavioralParameterKind)value }, + { "Iid", (behavioralParameter, value) => behavioralParameter.Iid = (Guid)value }, + { "ModifiedOn", (behavioralParameter, value) => behavioralParameter.ModifiedOn = (DateTime)value }, + { "Parameter", (behavioralParameter, value) => behavioralParameter.Parameter = (Guid)value }, + { "ThingPreference", (behavioralParameter, value) => behavioralParameter.ThingPreference = value == null ? (string)null : value.ToString() }, + { "VariableName", (behavioralParameter, value) => behavioralParameter.VariableName = value.ToString() }, + }; + + /// + /// The possible container property map. + /// + private readonly Dictionary possibleContainerProperties = new Dictionary + { + { "Behavior", new PropertyMetaInfo("BehavioralParameter", "BehavioralParameter", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + }; + + /// + /// Gets a value indicating whether this type should be deprecated upon Delete. + /// + public bool IsDeprecatableThing + { + get + { + return false; + } + } + + /// + /// Gets a value indicating whether this type is a top container. + /// + public bool IsTopContainer + { + get + { + return false; + } + } + + /// + /// Gets the base type name of this class. + /// + public string BaseType + { + get { return "Thing"; } + } + + /// + /// Gets the CDP class version. + /// + public string ClassVersion + { + get { return "1.3.0"; } + } + + /// + /// Get the data model version of the supplied property. + /// + /// + /// Name of the property for which to check if it is scalar. + /// + /// + /// The version number as specified property otherwise the default data model version. + /// + public string GetPropertyVersion(string propertyName) + { + return this.cdpVersionedProperties.ContainsKey(propertyName) ? this.cdpVersionedProperties[propertyName] : null; + } + + /// + /// Returns the containment property type from the supplied property name. + /// + /// + /// The containment property name. + /// + /// + /// The type name of the containment. + /// + /// + /// If the property name is not supported for the . + /// + public PropertyMetaInfo GetContainmentType(string propertyName) + { + if (!this.containmentTypeMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'BehavioralParameter'", propertyName)); + } + + return this.containmentTypeMap[propertyName]; + } + + /// + /// Returns the property type from the supplied property name. + /// + /// + /// The property name. + /// + /// + /// The or null if it does not exist. + /// + public PropertyMetaInfo GetPropertyMetaInfo(string propertyName) + { + if (this.containmentTypeMap.ContainsKey(propertyName)) + { + return this.containmentTypeMap[propertyName]; + } + + if (this.propertyTypeMap.ContainsKey(propertyName)) + { + return this.propertyTypeMap[propertyName]; + } + + return null; + } + + /// + /// Returns the container property for the supplied type name is a possible container for . + /// + /// + /// Name of the type for which to check if it is a container of . + /// + /// + /// Supplied container property info instance that will be set if the supplied type name is a container of . + /// + /// + /// True if the supplied typeName is a container for and sets the container property name. + /// + public bool TryGetContainerProperty(string typeName, out PropertyMetaInfo containerProperty) + { + var isContainer = this.possibleContainerProperties.ContainsKey(typeName); + containerProperty = isContainer ? this.possibleContainerProperties[typeName] : null; + + return isContainer; + } + + /// + /// Check if the supplied property name for is scalar. + /// + /// + /// Name of the property for which to check if it is scalar. + /// + /// + /// True if the supplied property name is a scalar property. + /// + public bool IsScalar(string propertyName) + { + if (this.propertyTypeMap.ContainsKey(propertyName)) + { + var propertyInfo = this.propertyTypeMap[propertyName]; + return propertyInfo.PropertyKind == PropertyKind.Scalar || propertyInfo.PropertyKind == PropertyKind.ValueArray; + } + + return false; + } + + /// + /// Apply the value update to the supplied property name of the updatable instance. + /// + /// + /// The instance to which to apply the property value update. + /// + /// + /// The property name of the to which to apply the value update. + /// + /// + /// The updated value to apply. + /// + /// + /// True if the value update was successfully applied. + /// + public bool ApplyPropertyUpdate(CDP4Common.DTO.Thing updatableThing, string propertyName, object value) + { + if (updatableThing == null || !this.IsScalar(propertyName)) + { + return false; + } + + this.propertyValueAssignmentMap[propertyName]((CDP4Common.DTO.BehavioralParameter)updatableThing, value); + + return true; + } + + /// + /// Returns a deserialized object from the supplied value string for the property name. + /// + /// + /// The property name. + /// + /// + /// The value to deserialize from its current string form. + /// + /// + /// A deserialized object from the supplied value. + /// + /// + /// If the property name is not supported for the . + /// + public object DeserializeCollectionValue(string propertyName, object value) + { + if (!this.collectionPropertyValueDeserializationMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid collection property of 'BehavioralParameter'", propertyName)); + } + + return this.collectionPropertyValueDeserializationMap[propertyName](value); + } + + /// + /// Returns the value of the property of a Thing + /// + /// + /// The property name. + /// + /// + /// The Thing object + /// + /// + /// The value of the property of a Thing + /// + /// + /// If the property name is not supported for the . + /// + public object GetValue(string propertyName, CDP4Common.DTO.Thing thing) + { + if (!this.propertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid collection property of 'BehavioralParameter'", propertyName)); + } + + return this.propertyValueMap[propertyName]((CDP4Common.DTO.BehavioralParameter)thing); + } + + /// + /// Gets the collection of property names for a + /// + public IEnumerable GetPropertyNameCollection() + { + var collection = new List(this.propertyTypeMap.Keys); + collection.AddRange(this.containmentTypeMap.Keys); + return collection; + } + + /// + /// Instantiates a + /// + /// + /// The instantiated + /// + public CDP4Common.DTO.Thing InstantiateDto(Guid guid, int revisionNumber) + { + return new CDP4Common.DTO.BehavioralParameter(guid, revisionNumber); + } + } +} diff --git a/CDP4Common/AutoGenMetaInfo/BinaryRelationshipRuleMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/BinaryRelationshipRuleMetaInfo.cs index c37072fa6..333e0723d 100644 --- a/CDP4Common/AutoGenMetaInfo/BinaryRelationshipRuleMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/BinaryRelationshipRuleMetaInfo.cs @@ -48,6 +48,7 @@ public partial class BinaryRelationshipRuleMetaInfo : IBinaryRelationshipRuleMet private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", binaryRelationshipRule => binaryRelationshipRule.Alias }, + { "Attachment", binaryRelationshipRule => binaryRelationshipRule.Attachment }, { "Definition", binaryRelationshipRule => binaryRelationshipRule.Definition }, { "HyperLink", binaryRelationshipRule => binaryRelationshipRule.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class BinaryRelationshipRuleMetaInfo : IBinaryRelationshipRuleMet private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'BinaryRelationshipRule' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'BinaryRelationshipRule' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'BinaryRelationshipRule' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'BinaryRelationshipRule' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'BinaryRelationshipRule' is mandatory and cannot be null.") }, @@ -207,6 +209,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing bi private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -236,6 +239,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -286,6 +290,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/BooleanParameterTypeMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/BooleanParameterTypeMetaInfo.cs index 40ba6af28..7f7531ed5 100644 --- a/CDP4Common/AutoGenMetaInfo/BooleanParameterTypeMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/BooleanParameterTypeMetaInfo.cs @@ -48,6 +48,7 @@ public partial class BooleanParameterTypeMetaInfo : IBooleanParameterTypeMetaInf private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", booleanParameterType => booleanParameterType.Alias }, + { "Attachment", booleanParameterType => booleanParameterType.Attachment }, { "Definition", booleanParameterType => booleanParameterType.Definition }, { "HyperLink", booleanParameterType => booleanParameterType.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class BooleanParameterTypeMetaInfo : IBooleanParameterTypeMetaInf private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'BooleanParameterType' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'BooleanParameterType' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'BooleanParameterType' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'BooleanParameterType' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'BooleanParameterType' is mandatory and cannot be null.") }, @@ -207,6 +209,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing bo private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -236,6 +239,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -281,6 +285,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/BoundsMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/BoundsMetaInfo.cs index 011541858..3688411e0 100644 --- a/CDP4Common/AutoGenMetaInfo/BoundsMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/BoundsMetaInfo.cs @@ -284,9 +284,13 @@ public IEnumerable Properties /// private readonly Dictionary possibleContainerProperties = new Dictionary { + { "ArchitectureDiagram", new PropertyMetaInfo("Bounds", "Bounds", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, + { "ArchitectureElement", new PropertyMetaInfo("Bounds", "Bounds", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, { "DiagramCanvas", new PropertyMetaInfo("Bounds", "Bounds", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, { "DiagramEdge", new PropertyMetaInfo("Bounds", "Bounds", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, + { "DiagramFrame", new PropertyMetaInfo("Bounds", "Bounds", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, { "DiagramObject", new PropertyMetaInfo("Bounds", "Bounds", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, + { "DiagramPort", new PropertyMetaInfo("Bounds", "Bounds", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, }; /// diff --git a/CDP4Common/AutoGenMetaInfo/CategoryMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/CategoryMetaInfo.cs index afc63db7b..779ef616f 100644 --- a/CDP4Common/AutoGenMetaInfo/CategoryMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/CategoryMetaInfo.cs @@ -48,6 +48,7 @@ public partial class CategoryMetaInfo : ICategoryMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", category => category.Alias }, + { "Attachment", category => category.Attachment }, { "Definition", category => category.Definition }, { "HyperLink", category => category.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class CategoryMetaInfo : ICategoryMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'Category' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'Category' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'Category' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'Category' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'Category' is mandatory and cannot be null.") }, @@ -207,6 +209,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing ca private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -236,6 +239,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -282,6 +286,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/CompoundParameterTypeMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/CompoundParameterTypeMetaInfo.cs index 0e126ae91..c98ca1a15 100644 --- a/CDP4Common/AutoGenMetaInfo/CompoundParameterTypeMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/CompoundParameterTypeMetaInfo.cs @@ -48,6 +48,7 @@ public partial class CompoundParameterTypeMetaInfo : ICompoundParameterTypeMetaI private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", compoundParameterType => compoundParameterType.Alias }, + { "Attachment", compoundParameterType => compoundParameterType.Attachment }, { "Component", compoundParameterType => compoundParameterType.Component.ToIdList() }, { "Definition", compoundParameterType => compoundParameterType.Definition }, { "HyperLink", compoundParameterType => compoundParameterType.HyperLink }, @@ -67,6 +68,7 @@ public partial class CompoundParameterTypeMetaInfo : ICompoundParameterTypeMetaI private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'CompoundParameterType' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'CompoundParameterType' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'CompoundParameterType' is mandatory and cannot be null.") }, { "Component", new DtoValidationHelper(item => item.Component != null && item.Component.Any(), "The 'Component' property of a 'CompoundParameterType' is mandatory and must have at least one entry.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'CompoundParameterType' is mandatory and cannot be null.") }, @@ -212,6 +214,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing co private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Component", new PropertyMetaInfo("Component", "ParameterTypeComponent", PropertyKind.OrderedList, AggregationKind.Composite, false, true, true, 1, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -242,6 +245,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Component", thing => thing.Component }, @@ -290,6 +294,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Component", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/ConstantMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ConstantMetaInfo.cs index f22434350..36d9c97bb 100644 --- a/CDP4Common/AutoGenMetaInfo/ConstantMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ConstantMetaInfo.cs @@ -48,6 +48,7 @@ public partial class ConstantMetaInfo : IConstantMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", constant => constant.Alias }, + { "Attachment", constant => constant.Attachment }, { "Definition", constant => constant.Definition }, { "HyperLink", constant => constant.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class ConstantMetaInfo : IConstantMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'Constant' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'Constant' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'Constant' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'Constant' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'Constant' is mandatory and cannot be null.") }, @@ -207,6 +209,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing co private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -236,6 +239,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -284,6 +288,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/ConversionBasedUnitMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ConversionBasedUnitMetaInfo.cs index 9549472f8..d766bd24e 100644 --- a/CDP4Common/AutoGenMetaInfo/ConversionBasedUnitMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ConversionBasedUnitMetaInfo.cs @@ -48,6 +48,7 @@ public partial class ConversionBasedUnitMetaInfo : IConversionBasedUnitMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", conversionBasedUnit => conversionBasedUnit.Alias }, + { "Attachment", conversionBasedUnit => conversionBasedUnit.Attachment }, { "Definition", conversionBasedUnit => conversionBasedUnit.Definition }, { "HyperLink", conversionBasedUnit => conversionBasedUnit.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class ConversionBasedUnitMetaInfo : IConversionBasedUnitMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'ConversionBasedUnit' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'ConversionBasedUnit' is mandatory and cannot be null.") }, { "ConversionFactor", new DtoValidationHelper(item => !string.IsNullOrWhiteSpace(item.ConversionFactor), "The 'ConversionFactor' property of a 'ConversionBasedUnit' is mandatory and cannot be empty or null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'ConversionBasedUnit' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'ConversionBasedUnit' is mandatory and cannot be null.") }, @@ -206,6 +208,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing co private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -235,6 +238,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "ConversionFactor", thing => thing.ConversionFactor }, { "Definition", thing => thing.Definition }, @@ -279,6 +283,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/CyclicRatioScaleMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/CyclicRatioScaleMetaInfo.cs index 9a72846b0..6812aceca 100644 --- a/CDP4Common/AutoGenMetaInfo/CyclicRatioScaleMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/CyclicRatioScaleMetaInfo.cs @@ -48,6 +48,7 @@ public partial class CyclicRatioScaleMetaInfo : ICyclicRatioScaleMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", cyclicRatioScale => cyclicRatioScale.Alias }, + { "Attachment", cyclicRatioScale => cyclicRatioScale.Attachment }, { "Definition", cyclicRatioScale => cyclicRatioScale.Definition }, { "HyperLink", cyclicRatioScale => cyclicRatioScale.HyperLink }, { "MappingToReferenceScale", cyclicRatioScale => cyclicRatioScale.MappingToReferenceScale }, @@ -65,6 +66,7 @@ public partial class CyclicRatioScaleMetaInfo : ICyclicRatioScaleMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'CyclicRatioScale' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'CyclicRatioScale' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'CyclicRatioScale' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'CyclicRatioScale' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'CyclicRatioScale' is mandatory and cannot be null.") }, @@ -210,6 +212,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing cy private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "MappingToReferenceScale", new PropertyMetaInfo("MappingToReferenceScale", "MappingToReferenceScale", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -241,6 +244,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -301,6 +305,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/DateParameterTypeMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DateParameterTypeMetaInfo.cs index d15becb1a..6cddb8589 100644 --- a/CDP4Common/AutoGenMetaInfo/DateParameterTypeMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/DateParameterTypeMetaInfo.cs @@ -48,6 +48,7 @@ public partial class DateParameterTypeMetaInfo : IDateParameterTypeMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", dateParameterType => dateParameterType.Alias }, + { "Attachment", dateParameterType => dateParameterType.Attachment }, { "Definition", dateParameterType => dateParameterType.Definition }, { "HyperLink", dateParameterType => dateParameterType.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class DateParameterTypeMetaInfo : IDateParameterTypeMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'DateParameterType' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'DateParameterType' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'DateParameterType' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'DateParameterType' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'DateParameterType' is mandatory and cannot be null.") }, @@ -207,6 +209,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing da private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -236,6 +239,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -281,6 +285,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/DateTimeParameterTypeMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DateTimeParameterTypeMetaInfo.cs index 0eabb3f13..f363d3ba6 100644 --- a/CDP4Common/AutoGenMetaInfo/DateTimeParameterTypeMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/DateTimeParameterTypeMetaInfo.cs @@ -48,6 +48,7 @@ public partial class DateTimeParameterTypeMetaInfo : IDateTimeParameterTypeMetaI private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", dateTimeParameterType => dateTimeParameterType.Alias }, + { "Attachment", dateTimeParameterType => dateTimeParameterType.Attachment }, { "Definition", dateTimeParameterType => dateTimeParameterType.Definition }, { "HyperLink", dateTimeParameterType => dateTimeParameterType.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class DateTimeParameterTypeMetaInfo : IDateTimeParameterTypeMetaI private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'DateTimeParameterType' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'DateTimeParameterType' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'DateTimeParameterType' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'DateTimeParameterType' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'DateTimeParameterType' is mandatory and cannot be null.") }, @@ -207,6 +209,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing da private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -236,6 +239,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -281,6 +285,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/DecompositionRuleMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DecompositionRuleMetaInfo.cs index bb7889202..fca1e3b83 100644 --- a/CDP4Common/AutoGenMetaInfo/DecompositionRuleMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/DecompositionRuleMetaInfo.cs @@ -48,6 +48,7 @@ public partial class DecompositionRuleMetaInfo : IDecompositionRuleMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", decompositionRule => decompositionRule.Alias }, + { "Attachment", decompositionRule => decompositionRule.Attachment }, { "Definition", decompositionRule => decompositionRule.Definition }, { "HyperLink", decompositionRule => decompositionRule.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class DecompositionRuleMetaInfo : IDecompositionRuleMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'DecompositionRule' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'DecompositionRule' is mandatory and cannot be null.") }, { "ContainedCategory", new DtoValidationHelper(item => item.ContainedCategory != null && item.ContainedCategory.Any(), "The 'ContainedCategory' property of a 'DecompositionRule' is mandatory and must have at least one entry.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'DecompositionRule' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'DecompositionRule' is mandatory and cannot be null.") }, @@ -206,6 +208,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing de private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -235,6 +238,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "ContainedCategory", thing => thing.ContainedCategory }, { "ContainingCategory", thing => thing.ContainingCategory }, @@ -283,6 +287,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "ContainedCategory", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/DefinedThingMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DefinedThingMetaInfo.cs index fe25ebb16..c288f0cdd 100644 --- a/CDP4Common/AutoGenMetaInfo/DefinedThingMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/DefinedThingMetaInfo.cs @@ -48,6 +48,7 @@ public partial class DefinedThingMetaInfo : IDefinedThingMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", definedThing => definedThing.Alias }, + { "Attachment", definedThing => definedThing.Attachment }, { "Definition", definedThing => definedThing.Definition }, { "HyperLink", definedThing => definedThing.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class DefinedThingMetaInfo : IDefinedThingMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'DefinedThing' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'DefinedThing' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'DefinedThing' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'DefinedThing' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'DefinedThing' is mandatory and cannot be null.") }, @@ -205,6 +207,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing de private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -234,6 +237,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -272,6 +276,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/DefinitionMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DefinitionMetaInfo.cs index 4286320cb..15c267563 100644 --- a/CDP4Common/AutoGenMetaInfo/DefinitionMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/DefinitionMetaInfo.cs @@ -294,6 +294,7 @@ public IEnumerable Properties private readonly Dictionary possibleContainerProperties = new Dictionary { { "ArrayParameterType", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Behavior", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "BinaryRelationshipRule", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "BooleanParameterType", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Category", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, diff --git a/CDP4Common/AutoGenMetaInfo/DerivedQuantityKindMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DerivedQuantityKindMetaInfo.cs index b4c90c26d..59ab3b9dd 100644 --- a/CDP4Common/AutoGenMetaInfo/DerivedQuantityKindMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/DerivedQuantityKindMetaInfo.cs @@ -48,6 +48,7 @@ public partial class DerivedQuantityKindMetaInfo : IDerivedQuantityKindMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", derivedQuantityKind => derivedQuantityKind.Alias }, + { "Attachment", derivedQuantityKind => derivedQuantityKind.Attachment }, { "Definition", derivedQuantityKind => derivedQuantityKind.Definition }, { "HyperLink", derivedQuantityKind => derivedQuantityKind.HyperLink }, { "QuantityKindFactor", derivedQuantityKind => derivedQuantityKind.QuantityKindFactor.ToIdList() }, @@ -67,6 +68,7 @@ public partial class DerivedQuantityKindMetaInfo : IDerivedQuantityKindMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'DerivedQuantityKind' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'DerivedQuantityKind' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'DerivedQuantityKind' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'DerivedQuantityKind' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'DerivedQuantityKind' is mandatory and cannot be null.") }, @@ -213,6 +215,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing de private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "QuantityKindFactor", new PropertyMetaInfo("QuantityKindFactor", "QuantityKindFactor", PropertyKind.OrderedList, AggregationKind.Composite, false, true, true, 1, "*", true) }, @@ -243,6 +246,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "DefaultScale", thing => thing.DefaultScale }, @@ -298,6 +302,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/DerivedUnitMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DerivedUnitMetaInfo.cs index a77fd7cd7..f71855bb8 100644 --- a/CDP4Common/AutoGenMetaInfo/DerivedUnitMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/DerivedUnitMetaInfo.cs @@ -48,6 +48,7 @@ public partial class DerivedUnitMetaInfo : IDerivedUnitMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", derivedUnit => derivedUnit.Alias }, + { "Attachment", derivedUnit => derivedUnit.Attachment }, { "Definition", derivedUnit => derivedUnit.Definition }, { "HyperLink", derivedUnit => derivedUnit.HyperLink }, { "UnitFactor", derivedUnit => derivedUnit.UnitFactor.ToIdList() }, @@ -67,6 +68,7 @@ public partial class DerivedUnitMetaInfo : IDerivedUnitMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'DerivedUnit' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'DerivedUnit' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'DerivedUnit' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'DerivedUnit' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'DerivedUnit' is mandatory and cannot be null.") }, @@ -210,6 +212,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing de private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "UnitFactor", new PropertyMetaInfo("UnitFactor", "UnitFactor", PropertyKind.OrderedList, AggregationKind.Composite, false, true, true, 1, "*", true) }, @@ -240,6 +243,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -281,6 +285,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/DiagramCanvasMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DiagramCanvasMetaInfo.cs index 2cc02ed5d..587203947 100644 --- a/CDP4Common/AutoGenMetaInfo/DiagramCanvasMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/DiagramCanvasMetaInfo.cs @@ -62,6 +62,7 @@ public partial class DiagramCanvasMetaInfo : IDiagramCanvasMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Bounds", new DtoValidationHelper(item => item.Bounds != null, "The 'Bounds' property of a 'DiagramCanvas' is mandatory and cannot be null.") }, + { "Description", new DtoValidationHelper(item => !string.IsNullOrWhiteSpace(item.Description), "The 'Description' property of a 'DiagramCanvas' is mandatory and cannot be empty or null.") }, { "DiagramElement", new DtoValidationHelper(item => item.DiagramElement != null, "The 'DiagramElement' property of a 'DiagramCanvas' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'DiagramCanvas' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'DiagramCanvas' is mandatory and cannot be null.") }, @@ -232,12 +233,14 @@ public IEnumerable Properties { "Bounds", thing => thing.Bounds }, { "ClassKind", thing => thing.ClassKind }, { "CreatedOn", thing => thing.CreatedOn }, + { "Description", thing => thing.Description }, { "DiagramElement", thing => thing.DiagramElement }, { "ExcludedDomain", thing => thing.ExcludedDomain }, { "ExcludedPerson", thing => thing.ExcludedPerson }, { "Iid", thing => thing.Iid }, { "ModifiedOn", thing => thing.ModifiedOn }, { "Name", thing => thing.Name }, + { "PublicationState", thing => thing.PublicationState }, { "RevisionNumber", thing => thing.RevisionNumber }, { "ThingPreference", thing => thing.ThingPreference }, }; @@ -252,11 +255,13 @@ public IEnumerable Properties { { "ClassKind", new PropertyMetaInfo("ClassKind", "CDP4Common.CommonData.ClassKind", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, { "CreatedOn", new PropertyMetaInfo("CreatedOn", "DateTime", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "Description", new PropertyMetaInfo("Description", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, { "ExcludedDomain", new PropertyMetaInfo("ExcludedDomain", "DomainOfExpertise", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, { "ExcludedPerson", new PropertyMetaInfo("ExcludedPerson", "Person", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, { "Iid", new PropertyMetaInfo("Iid", "Guid", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, { "ModifiedOn", new PropertyMetaInfo("ModifiedOn", "DateTime", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, { "Name", new PropertyMetaInfo("Name", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "PublicationState", new PropertyMetaInfo("PublicationState", "CDP4Common.DiagramData.PublicationState", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, { "RevisionNumber", new PropertyMetaInfo("RevisionNumber", "int", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, { "ThingPreference", new PropertyMetaInfo("ThingPreference", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, }; @@ -278,9 +283,11 @@ public IEnumerable Properties private readonly Dictionary> propertyValueAssignmentMap = new Dictionary> { { "CreatedOn", (diagramCanvas, value) => diagramCanvas.CreatedOn = (DateTime)value }, + { "Description", (diagramCanvas, value) => diagramCanvas.Description = value.ToString() }, { "Iid", (diagramCanvas, value) => diagramCanvas.Iid = (Guid)value }, { "ModifiedOn", (diagramCanvas, value) => diagramCanvas.ModifiedOn = (DateTime)value }, { "Name", (diagramCanvas, value) => diagramCanvas.Name = value.ToString() }, + { "PublicationState", (diagramCanvas, value) => diagramCanvas.PublicationState = (PublicationState)value }, { "ThingPreference", (diagramCanvas, value) => diagramCanvas.ThingPreference = value == null ? (string)null : value.ToString() }, }; diff --git a/CDP4Common/AutoGenMetaInfo/DiagramEdgeMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DiagramEdgeMetaInfo.cs index 2d3be2435..1bcf4f09d 100644 --- a/CDP4Common/AutoGenMetaInfo/DiagramEdgeMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/DiagramEdgeMetaInfo.cs @@ -311,9 +311,13 @@ public IEnumerable Properties /// private readonly Dictionary possibleContainerProperties = new Dictionary { + { "ArchitectureDiagram", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ArchitectureElement", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DiagramCanvas", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DiagramEdge", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramFrame", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DiagramObject", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramPort", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; /// diff --git a/CDP4Common/AutoGenMetaInfo/DiagramElementThingMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DiagramElementThingMetaInfo.cs index 4ef07b499..b2f7a2d50 100644 --- a/CDP4Common/AutoGenMetaInfo/DiagramElementThingMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/DiagramElementThingMetaInfo.cs @@ -297,9 +297,13 @@ public IEnumerable Properties /// private readonly Dictionary possibleContainerProperties = new Dictionary { + { "ArchitectureDiagram", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ArchitectureElement", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DiagramCanvas", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DiagramEdge", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramFrame", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DiagramObject", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramPort", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; /// diff --git a/CDP4Common/AutoGenMetaInfo/DiagramFrameMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DiagramFrameMetaInfo.cs new file mode 100644 index 000000000..6b7321281 --- /dev/null +++ b/CDP4Common/AutoGenMetaInfo/DiagramFrameMetaInfo.cs @@ -0,0 +1,545 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.MetaInfo +{ + using System; + using System.Collections.Generic; + using System.Linq; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.Exceptions; + using CDP4Common.Helpers; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + using CDP4Common.Validation; + + /// + /// This a class that holds meta info for . + /// + public partial class DiagramFrameMetaInfo : IDiagramFrameMetaInfo + { + /// + /// The containment property value map. + /// + private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> + { + { "Bounds", diagramFrame => diagramFrame.Bounds }, + { "DiagramElement", diagramFrame => diagramFrame.DiagramElement }, + { "LocalStyle", diagramFrame => diagramFrame.LocalStyle }, + }; + + /// + /// The ordered containment property value map. + /// + private readonly Dictionary>> orderedContainmentPropertyValueMap = new Dictionary>>(); + + /// + /// The validation rules that should pass for an instance of . + /// + private readonly Dictionary> validationRules = new Dictionary> + { + { "Bounds", new DtoValidationHelper(item => item.Bounds != null, "The 'Bounds' property of a 'DiagramFrame' is mandatory and cannot be null.") }, + { "DiagramElement", new DtoValidationHelper(item => item.DiagramElement != null, "The 'DiagramElement' property of a 'DiagramFrame' is mandatory and cannot be null.") }, + { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'DiagramFrame' is mandatory and cannot be null.") }, + { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'DiagramFrame' is mandatory and cannot be null.") }, + { "LocalStyle", new DtoValidationHelper(item => item.LocalStyle != null, "The 'LocalStyle' property of a 'DiagramFrame' is mandatory and cannot be null.") }, + { "Name", new DtoValidationHelper(item => !string.IsNullOrWhiteSpace(item.Name), "The 'Name' property of a 'DiagramFrame' is mandatory and cannot be empty or null.") }, + }; + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// If any validation rule failed. + /// + public void Validate(CDP4Common.DTO.Thing diagramFrame) + { + this.Validate(diagramFrame, x => true); + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// The validate Property. + /// + /// + /// If any validation rule failed. + /// + public void Validate(CDP4Common.DTO.Thing diagramFrame, Func validateProperty) + { + foreach (var applicableRule in this.validationRules.Where(x => validateProperty(x.Key))) + { + applicableRule.Value.Validate((CDP4Common.DTO.DiagramFrame)diagramFrame); + } + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// True if all validation rules have passed or if none are defined. + /// + public bool TryValidate(CDP4Common.DTO.Thing diagramFrame) + { + return this.TryValidate(diagramFrame, x => true); + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// The validate Property. + /// + /// + /// True if all validation rules have passed or if none are defined. + /// + public bool TryValidate(CDP4Common.DTO.Thing diagramFrame, Func validateProperty) + { + var applicableValidationRules = this.validationRules.Where(x => validateProperty(x.Key)).Select(x => x.Value); + + return applicableValidationRules.All(applicableRule => applicableRule.TryValidate((CDP4Common.DTO.DiagramFrame)diagramFrame)); + } + + /// + /// Returns the containment property value for the supplied . + /// + /// + /// The for which to return the containment property value. + /// + /// + /// Name of the containment property for which to return the value. + /// + /// + /// A collection of containment . + /// + /// + /// If the property name is not supported for the . + /// + public IEnumerable GetContainmentIds(CDP4Common.DTO.Thing diagramFrame, string propertyName) + { + if (!this.containmentPropertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'DiagramFrame'", propertyName)); + } + + return this.containmentPropertyValueMap[propertyName]((CDP4Common.DTO.DiagramFrame)diagramFrame); + } + + /// + /// Returns the ordered containment property value for the supplied . + /// + /// + /// The for which to return the containment property value. + /// + /// + /// Name of the containment property for which to return the value. + /// + /// + /// A collection of ordered containment . + /// + /// + /// If the property name is not supported for the . + /// + public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing diagramFrame, string propertyName) + { + if (!this.orderedContainmentPropertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'DiagramFrame'", propertyName)); + } + + return this.orderedContainmentPropertyValueMap[propertyName]((CDP4Common.DTO.DiagramFrame)diagramFrame); + } + + /// + /// The CDP version property map. + /// + private readonly Dictionary cdpVersionedProperties = new Dictionary + { + { "ExcludedDomain", "1.1.0" }, + { "ExcludedPerson", "1.1.0" }, + { "ModifiedOn", "1.1.0" }, + { "ThingPreference", "1.2.0" }, + }; + + /// + /// The containment property to type name map. + /// + private readonly Dictionary containmentTypeMap = new Dictionary + { + { "Bounds", new PropertyMetaInfo("Bounds", "Bounds", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, + { "DiagramElement", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "LocalStyle", new PropertyMetaInfo("LocalStyle", "OwnedStyle", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, + }; + + /// + /// Gets the for the class + /// + public IEnumerable Properties + { + get + { + foreach (var propertyMetaInfo in this.containmentTypeMap) + { + yield return propertyMetaInfo.Value; + } + + foreach (var propertyMetaInfo in this.propertyTypeMap) + { + yield return propertyMetaInfo.Value; + } + } + } + + /// + /// The property value map. + /// + private readonly Dictionary> propertyValueMap = new Dictionary> + { + { "Bounds", thing => thing.Bounds }, + { "ClassKind", thing => thing.ClassKind }, + { "DepictedThing", thing => thing.DepictedThing }, + { "DiagramElement", thing => thing.DiagramElement }, + { "ExcludedDomain", thing => thing.ExcludedDomain }, + { "ExcludedPerson", thing => thing.ExcludedPerson }, + { "Iid", thing => thing.Iid }, + { "LocalStyle", thing => thing.LocalStyle }, + { "ModifiedOn", thing => thing.ModifiedOn }, + { "Name", thing => thing.Name }, + { "RevisionNumber", thing => thing.RevisionNumber }, + { "SharedStyle", thing => thing.SharedStyle }, + { "ThingPreference", thing => thing.ThingPreference }, + }; + + /// + /// The property type map. + /// + /// + /// Contained properties are excluded for this map + /// + private readonly Dictionary propertyTypeMap = new Dictionary + { + { "ClassKind", new PropertyMetaInfo("ClassKind", "CDP4Common.CommonData.ClassKind", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "DepictedThing", new PropertyMetaInfo("DepictedThing", "Thing", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, + { "ExcludedDomain", new PropertyMetaInfo("ExcludedDomain", "DomainOfExpertise", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, + { "ExcludedPerson", new PropertyMetaInfo("ExcludedPerson", "Person", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, + { "Iid", new PropertyMetaInfo("Iid", "Guid", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ModifiedOn", new PropertyMetaInfo("ModifiedOn", "DateTime", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "Name", new PropertyMetaInfo("Name", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "RevisionNumber", new PropertyMetaInfo("RevisionNumber", "int", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "SharedStyle", new PropertyMetaInfo("SharedStyle", "SharedStyle", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, + { "ThingPreference", new PropertyMetaInfo("ThingPreference", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, + }; + + /// + /// The collection property value deserialization map. + /// + private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> + { + { "Bounds", (value) => (Guid)value }, + { "DiagramElement", (value) => (Guid)value }, + { "ExcludedDomain", (value) => (Guid)value }, + { "ExcludedPerson", (value) => (Guid)value }, + { "LocalStyle", (value) => (Guid)value }, + }; + + /// + /// The property value assignment map. + /// + private readonly Dictionary> propertyValueAssignmentMap = new Dictionary> + { + { "DepictedThing", (diagramFrame, value) => diagramFrame.DepictedThing = value == null ? (Guid?)null : (Guid)value }, + { "Iid", (diagramFrame, value) => diagramFrame.Iid = (Guid)value }, + { "ModifiedOn", (diagramFrame, value) => diagramFrame.ModifiedOn = (DateTime)value }, + { "Name", (diagramFrame, value) => diagramFrame.Name = value.ToString() }, + { "SharedStyle", (diagramFrame, value) => diagramFrame.SharedStyle = value == null ? (Guid?)null : (Guid)value }, + { "ThingPreference", (diagramFrame, value) => diagramFrame.ThingPreference = value == null ? (string)null : value.ToString() }, + }; + + /// + /// The possible container property map. + /// + private readonly Dictionary possibleContainerProperties = new Dictionary + { + { "ArchitectureDiagram", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ArchitectureElement", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramCanvas", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramEdge", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramFrame", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramObject", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramPort", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + }; + + /// + /// Gets a value indicating whether this type should be deprecated upon Delete. + /// + public bool IsDeprecatableThing + { + get + { + return false; + } + } + + /// + /// Gets a value indicating whether this type is a top container. + /// + public bool IsTopContainer + { + get + { + return false; + } + } + + /// + /// Gets the base type name of this class. + /// + public string BaseType + { + get { return "DiagramShape"; } + } + + /// + /// Gets the CDP class version. + /// + public string ClassVersion + { + get { return "1.3.0"; } + } + + /// + /// Get the data model version of the supplied property. + /// + /// + /// Name of the property for which to check if it is scalar. + /// + /// + /// The version number as specified property otherwise the default data model version. + /// + public string GetPropertyVersion(string propertyName) + { + return this.cdpVersionedProperties.ContainsKey(propertyName) ? this.cdpVersionedProperties[propertyName] : null; + } + + /// + /// Returns the containment property type from the supplied property name. + /// + /// + /// The containment property name. + /// + /// + /// The type name of the containment. + /// + /// + /// If the property name is not supported for the . + /// + public PropertyMetaInfo GetContainmentType(string propertyName) + { + if (!this.containmentTypeMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'DiagramFrame'", propertyName)); + } + + return this.containmentTypeMap[propertyName]; + } + + /// + /// Returns the property type from the supplied property name. + /// + /// + /// The property name. + /// + /// + /// The or null if it does not exist. + /// + public PropertyMetaInfo GetPropertyMetaInfo(string propertyName) + { + if (this.containmentTypeMap.ContainsKey(propertyName)) + { + return this.containmentTypeMap[propertyName]; + } + + if (this.propertyTypeMap.ContainsKey(propertyName)) + { + return this.propertyTypeMap[propertyName]; + } + + return null; + } + + /// + /// Returns the container property for the supplied type name is a possible container for . + /// + /// + /// Name of the type for which to check if it is a container of . + /// + /// + /// Supplied container property info instance that will be set if the supplied type name is a container of . + /// + /// + /// True if the supplied typeName is a container for and sets the container property name. + /// + public bool TryGetContainerProperty(string typeName, out PropertyMetaInfo containerProperty) + { + var isContainer = this.possibleContainerProperties.ContainsKey(typeName); + containerProperty = isContainer ? this.possibleContainerProperties[typeName] : null; + + return isContainer; + } + + /// + /// Check if the supplied property name for is scalar. + /// + /// + /// Name of the property for which to check if it is scalar. + /// + /// + /// True if the supplied property name is a scalar property. + /// + public bool IsScalar(string propertyName) + { + if (this.propertyTypeMap.ContainsKey(propertyName)) + { + var propertyInfo = this.propertyTypeMap[propertyName]; + return propertyInfo.PropertyKind == PropertyKind.Scalar || propertyInfo.PropertyKind == PropertyKind.ValueArray; + } + + return false; + } + + /// + /// Apply the value update to the supplied property name of the updatable instance. + /// + /// + /// The instance to which to apply the property value update. + /// + /// + /// The property name of the to which to apply the value update. + /// + /// + /// The updated value to apply. + /// + /// + /// True if the value update was successfully applied. + /// + public bool ApplyPropertyUpdate(CDP4Common.DTO.Thing updatableThing, string propertyName, object value) + { + if (updatableThing == null || !this.IsScalar(propertyName)) + { + return false; + } + + this.propertyValueAssignmentMap[propertyName]((CDP4Common.DTO.DiagramFrame)updatableThing, value); + + return true; + } + + /// + /// Returns a deserialized object from the supplied value string for the property name. + /// + /// + /// The property name. + /// + /// + /// The value to deserialize from its current string form. + /// + /// + /// A deserialized object from the supplied value. + /// + /// + /// If the property name is not supported for the . + /// + public object DeserializeCollectionValue(string propertyName, object value) + { + if (!this.collectionPropertyValueDeserializationMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid collection property of 'DiagramFrame'", propertyName)); + } + + return this.collectionPropertyValueDeserializationMap[propertyName](value); + } + + /// + /// Returns the value of the property of a Thing + /// + /// + /// The property name. + /// + /// + /// The Thing object + /// + /// + /// The value of the property of a Thing + /// + /// + /// If the property name is not supported for the . + /// + public object GetValue(string propertyName, CDP4Common.DTO.Thing thing) + { + if (!this.propertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid collection property of 'DiagramFrame'", propertyName)); + } + + return this.propertyValueMap[propertyName]((CDP4Common.DTO.DiagramFrame)thing); + } + + /// + /// Gets the collection of property names for a + /// + public IEnumerable GetPropertyNameCollection() + { + var collection = new List(this.propertyTypeMap.Keys); + collection.AddRange(this.containmentTypeMap.Keys); + return collection; + } + + /// + /// Instantiates a + /// + /// + /// The instantiated + /// + public CDP4Common.DTO.Thing InstantiateDto(Guid guid, int revisionNumber) + { + return new CDP4Common.DTO.DiagramFrame(guid, revisionNumber); + } + } +} diff --git a/CDP4Common/AutoGenMetaInfo/DiagramObjectMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DiagramObjectMetaInfo.cs index c3ad24199..74109c047 100644 --- a/CDP4Common/AutoGenMetaInfo/DiagramObjectMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/DiagramObjectMetaInfo.cs @@ -304,9 +304,13 @@ public IEnumerable Properties /// private readonly Dictionary possibleContainerProperties = new Dictionary { + { "ArchitectureDiagram", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ArchitectureElement", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DiagramCanvas", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DiagramEdge", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramFrame", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DiagramObject", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramPort", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; /// diff --git a/CDP4Common/AutoGenMetaInfo/DiagramPortMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DiagramPortMetaInfo.cs new file mode 100644 index 000000000..f4dd213f1 --- /dev/null +++ b/CDP4Common/AutoGenMetaInfo/DiagramPortMetaInfo.cs @@ -0,0 +1,545 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.MetaInfo +{ + using System; + using System.Collections.Generic; + using System.Linq; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.Exceptions; + using CDP4Common.Helpers; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + using CDP4Common.Validation; + + /// + /// This a class that holds meta info for . + /// + public partial class DiagramPortMetaInfo : IDiagramPortMetaInfo + { + /// + /// The containment property value map. + /// + private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> + { + { "Bounds", diagramPort => diagramPort.Bounds }, + { "DiagramElement", diagramPort => diagramPort.DiagramElement }, + { "LocalStyle", diagramPort => diagramPort.LocalStyle }, + }; + + /// + /// The ordered containment property value map. + /// + private readonly Dictionary>> orderedContainmentPropertyValueMap = new Dictionary>>(); + + /// + /// The validation rules that should pass for an instance of . + /// + private readonly Dictionary> validationRules = new Dictionary> + { + { "Bounds", new DtoValidationHelper(item => item.Bounds != null, "The 'Bounds' property of a 'DiagramPort' is mandatory and cannot be null.") }, + { "DiagramElement", new DtoValidationHelper(item => item.DiagramElement != null, "The 'DiagramElement' property of a 'DiagramPort' is mandatory and cannot be null.") }, + { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'DiagramPort' is mandatory and cannot be null.") }, + { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'DiagramPort' is mandatory and cannot be null.") }, + { "LocalStyle", new DtoValidationHelper(item => item.LocalStyle != null, "The 'LocalStyle' property of a 'DiagramPort' is mandatory and cannot be null.") }, + { "Name", new DtoValidationHelper(item => !string.IsNullOrWhiteSpace(item.Name), "The 'Name' property of a 'DiagramPort' is mandatory and cannot be empty or null.") }, + }; + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// If any validation rule failed. + /// + public void Validate(CDP4Common.DTO.Thing diagramPort) + { + this.Validate(diagramPort, x => true); + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// The validate Property. + /// + /// + /// If any validation rule failed. + /// + public void Validate(CDP4Common.DTO.Thing diagramPort, Func validateProperty) + { + foreach (var applicableRule in this.validationRules.Where(x => validateProperty(x.Key))) + { + applicableRule.Value.Validate((CDP4Common.DTO.DiagramPort)diagramPort); + } + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// True if all validation rules have passed or if none are defined. + /// + public bool TryValidate(CDP4Common.DTO.Thing diagramPort) + { + return this.TryValidate(diagramPort, x => true); + } + + /// + /// Validates the supplied by running the business validation rules as per its meta info definition class. + /// + /// + /// The for which to run the validation rules. + /// + /// + /// The validate Property. + /// + /// + /// True if all validation rules have passed or if none are defined. + /// + public bool TryValidate(CDP4Common.DTO.Thing diagramPort, Func validateProperty) + { + var applicableValidationRules = this.validationRules.Where(x => validateProperty(x.Key)).Select(x => x.Value); + + return applicableValidationRules.All(applicableRule => applicableRule.TryValidate((CDP4Common.DTO.DiagramPort)diagramPort)); + } + + /// + /// Returns the containment property value for the supplied . + /// + /// + /// The for which to return the containment property value. + /// + /// + /// Name of the containment property for which to return the value. + /// + /// + /// A collection of containment . + /// + /// + /// If the property name is not supported for the . + /// + public IEnumerable GetContainmentIds(CDP4Common.DTO.Thing diagramPort, string propertyName) + { + if (!this.containmentPropertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'DiagramPort'", propertyName)); + } + + return this.containmentPropertyValueMap[propertyName]((CDP4Common.DTO.DiagramPort)diagramPort); + } + + /// + /// Returns the ordered containment property value for the supplied . + /// + /// + /// The for which to return the containment property value. + /// + /// + /// Name of the containment property for which to return the value. + /// + /// + /// A collection of ordered containment . + /// + /// + /// If the property name is not supported for the . + /// + public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing diagramPort, string propertyName) + { + if (!this.orderedContainmentPropertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'DiagramPort'", propertyName)); + } + + return this.orderedContainmentPropertyValueMap[propertyName]((CDP4Common.DTO.DiagramPort)diagramPort); + } + + /// + /// The CDP version property map. + /// + private readonly Dictionary cdpVersionedProperties = new Dictionary + { + { "ExcludedDomain", "1.1.0" }, + { "ExcludedPerson", "1.1.0" }, + { "ModifiedOn", "1.1.0" }, + { "ThingPreference", "1.2.0" }, + }; + + /// + /// The containment property to type name map. + /// + private readonly Dictionary containmentTypeMap = new Dictionary + { + { "Bounds", new PropertyMetaInfo("Bounds", "Bounds", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, + { "DiagramElement", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "LocalStyle", new PropertyMetaInfo("LocalStyle", "OwnedStyle", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, + }; + + /// + /// Gets the for the class + /// + public IEnumerable Properties + { + get + { + foreach (var propertyMetaInfo in this.containmentTypeMap) + { + yield return propertyMetaInfo.Value; + } + + foreach (var propertyMetaInfo in this.propertyTypeMap) + { + yield return propertyMetaInfo.Value; + } + } + } + + /// + /// The property value map. + /// + private readonly Dictionary> propertyValueMap = new Dictionary> + { + { "Bounds", thing => thing.Bounds }, + { "ClassKind", thing => thing.ClassKind }, + { "DepictedThing", thing => thing.DepictedThing }, + { "DiagramElement", thing => thing.DiagramElement }, + { "ExcludedDomain", thing => thing.ExcludedDomain }, + { "ExcludedPerson", thing => thing.ExcludedPerson }, + { "Iid", thing => thing.Iid }, + { "LocalStyle", thing => thing.LocalStyle }, + { "ModifiedOn", thing => thing.ModifiedOn }, + { "Name", thing => thing.Name }, + { "RevisionNumber", thing => thing.RevisionNumber }, + { "SharedStyle", thing => thing.SharedStyle }, + { "ThingPreference", thing => thing.ThingPreference }, + }; + + /// + /// The property type map. + /// + /// + /// Contained properties are excluded for this map + /// + private readonly Dictionary propertyTypeMap = new Dictionary + { + { "ClassKind", new PropertyMetaInfo("ClassKind", "CDP4Common.CommonData.ClassKind", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "DepictedThing", new PropertyMetaInfo("DepictedThing", "Thing", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, + { "ExcludedDomain", new PropertyMetaInfo("ExcludedDomain", "DomainOfExpertise", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, + { "ExcludedPerson", new PropertyMetaInfo("ExcludedPerson", "Person", PropertyKind.List, AggregationKind.None, false, false, true, 0, "*", true) }, + { "Iid", new PropertyMetaInfo("Iid", "Guid", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "ModifiedOn", new PropertyMetaInfo("ModifiedOn", "DateTime", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "Name", new PropertyMetaInfo("Name", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "RevisionNumber", new PropertyMetaInfo("RevisionNumber", "int", PropertyKind.Scalar, AggregationKind.None, false, false, true, 1, "1", true) }, + { "SharedStyle", new PropertyMetaInfo("SharedStyle", "SharedStyle", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, + { "ThingPreference", new PropertyMetaInfo("ThingPreference", "string", PropertyKind.Scalar, AggregationKind.None, false, false, true, 0, "1", true) }, + }; + + /// + /// The collection property value deserialization map. + /// + private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> + { + { "Bounds", (value) => (Guid)value }, + { "DiagramElement", (value) => (Guid)value }, + { "ExcludedDomain", (value) => (Guid)value }, + { "ExcludedPerson", (value) => (Guid)value }, + { "LocalStyle", (value) => (Guid)value }, + }; + + /// + /// The property value assignment map. + /// + private readonly Dictionary> propertyValueAssignmentMap = new Dictionary> + { + { "DepictedThing", (diagramPort, value) => diagramPort.DepictedThing = value == null ? (Guid?)null : (Guid)value }, + { "Iid", (diagramPort, value) => diagramPort.Iid = (Guid)value }, + { "ModifiedOn", (diagramPort, value) => diagramPort.ModifiedOn = (DateTime)value }, + { "Name", (diagramPort, value) => diagramPort.Name = value.ToString() }, + { "SharedStyle", (diagramPort, value) => diagramPort.SharedStyle = value == null ? (Guid?)null : (Guid)value }, + { "ThingPreference", (diagramPort, value) => diagramPort.ThingPreference = value == null ? (string)null : value.ToString() }, + }; + + /// + /// The possible container property map. + /// + private readonly Dictionary possibleContainerProperties = new Dictionary + { + { "ArchitectureDiagram", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ArchitectureElement", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramCanvas", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramEdge", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramFrame", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramObject", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramPort", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + }; + + /// + /// Gets a value indicating whether this type should be deprecated upon Delete. + /// + public bool IsDeprecatableThing + { + get + { + return false; + } + } + + /// + /// Gets a value indicating whether this type is a top container. + /// + public bool IsTopContainer + { + get + { + return false; + } + } + + /// + /// Gets the base type name of this class. + /// + public string BaseType + { + get { return "DiagramShape"; } + } + + /// + /// Gets the CDP class version. + /// + public string ClassVersion + { + get { return "1.3.0"; } + } + + /// + /// Get the data model version of the supplied property. + /// + /// + /// Name of the property for which to check if it is scalar. + /// + /// + /// The version number as specified property otherwise the default data model version. + /// + public string GetPropertyVersion(string propertyName) + { + return this.cdpVersionedProperties.ContainsKey(propertyName) ? this.cdpVersionedProperties[propertyName] : null; + } + + /// + /// Returns the containment property type from the supplied property name. + /// + /// + /// The containment property name. + /// + /// + /// The type name of the containment. + /// + /// + /// If the property name is not supported for the . + /// + public PropertyMetaInfo GetContainmentType(string propertyName) + { + if (!this.containmentTypeMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid containment property of 'DiagramPort'", propertyName)); + } + + return this.containmentTypeMap[propertyName]; + } + + /// + /// Returns the property type from the supplied property name. + /// + /// + /// The property name. + /// + /// + /// The or null if it does not exist. + /// + public PropertyMetaInfo GetPropertyMetaInfo(string propertyName) + { + if (this.containmentTypeMap.ContainsKey(propertyName)) + { + return this.containmentTypeMap[propertyName]; + } + + if (this.propertyTypeMap.ContainsKey(propertyName)) + { + return this.propertyTypeMap[propertyName]; + } + + return null; + } + + /// + /// Returns the container property for the supplied type name is a possible container for . + /// + /// + /// Name of the type for which to check if it is a container of . + /// + /// + /// Supplied container property info instance that will be set if the supplied type name is a container of . + /// + /// + /// True if the supplied typeName is a container for and sets the container property name. + /// + public bool TryGetContainerProperty(string typeName, out PropertyMetaInfo containerProperty) + { + var isContainer = this.possibleContainerProperties.ContainsKey(typeName); + containerProperty = isContainer ? this.possibleContainerProperties[typeName] : null; + + return isContainer; + } + + /// + /// Check if the supplied property name for is scalar. + /// + /// + /// Name of the property for which to check if it is scalar. + /// + /// + /// True if the supplied property name is a scalar property. + /// + public bool IsScalar(string propertyName) + { + if (this.propertyTypeMap.ContainsKey(propertyName)) + { + var propertyInfo = this.propertyTypeMap[propertyName]; + return propertyInfo.PropertyKind == PropertyKind.Scalar || propertyInfo.PropertyKind == PropertyKind.ValueArray; + } + + return false; + } + + /// + /// Apply the value update to the supplied property name of the updatable instance. + /// + /// + /// The instance to which to apply the property value update. + /// + /// + /// The property name of the to which to apply the value update. + /// + /// + /// The updated value to apply. + /// + /// + /// True if the value update was successfully applied. + /// + public bool ApplyPropertyUpdate(CDP4Common.DTO.Thing updatableThing, string propertyName, object value) + { + if (updatableThing == null || !this.IsScalar(propertyName)) + { + return false; + } + + this.propertyValueAssignmentMap[propertyName]((CDP4Common.DTO.DiagramPort)updatableThing, value); + + return true; + } + + /// + /// Returns a deserialized object from the supplied value string for the property name. + /// + /// + /// The property name. + /// + /// + /// The value to deserialize from its current string form. + /// + /// + /// A deserialized object from the supplied value. + /// + /// + /// If the property name is not supported for the . + /// + public object DeserializeCollectionValue(string propertyName, object value) + { + if (!this.collectionPropertyValueDeserializationMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid collection property of 'DiagramPort'", propertyName)); + } + + return this.collectionPropertyValueDeserializationMap[propertyName](value); + } + + /// + /// Returns the value of the property of a Thing + /// + /// + /// The property name. + /// + /// + /// The Thing object + /// + /// + /// The value of the property of a Thing + /// + /// + /// If the property name is not supported for the . + /// + public object GetValue(string propertyName, CDP4Common.DTO.Thing thing) + { + if (!this.propertyValueMap.ContainsKey(propertyName)) + { + throw new ArgumentException(string.Format("'{0}' is not a valid collection property of 'DiagramPort'", propertyName)); + } + + return this.propertyValueMap[propertyName]((CDP4Common.DTO.DiagramPort)thing); + } + + /// + /// Gets the collection of property names for a + /// + public IEnumerable GetPropertyNameCollection() + { + var collection = new List(this.propertyTypeMap.Keys); + collection.AddRange(this.containmentTypeMap.Keys); + return collection; + } + + /// + /// Instantiates a + /// + /// + /// The instantiated + /// + public CDP4Common.DTO.Thing InstantiateDto(Guid guid, int revisionNumber) + { + return new CDP4Common.DTO.DiagramPort(guid, revisionNumber); + } + } +} diff --git a/CDP4Common/AutoGenMetaInfo/DiagramShapeMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DiagramShapeMetaInfo.cs index 3260fd55f..0e997507c 100644 --- a/CDP4Common/AutoGenMetaInfo/DiagramShapeMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/DiagramShapeMetaInfo.cs @@ -297,9 +297,13 @@ public IEnumerable Properties /// private readonly Dictionary possibleContainerProperties = new Dictionary { + { "ArchitectureDiagram", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "ArchitectureElement", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DiagramCanvas", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DiagramEdge", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramFrame", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DiagramObject", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "DiagramPort", new PropertyMetaInfo("DiagramElement", "DiagramElementThing", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; /// diff --git a/CDP4Common/AutoGenMetaInfo/DomainOfExpertiseGroupMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DomainOfExpertiseGroupMetaInfo.cs index 957f89515..64329d10c 100644 --- a/CDP4Common/AutoGenMetaInfo/DomainOfExpertiseGroupMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/DomainOfExpertiseGroupMetaInfo.cs @@ -48,6 +48,7 @@ public partial class DomainOfExpertiseGroupMetaInfo : IDomainOfExpertiseGroupMet private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", domainOfExpertiseGroup => domainOfExpertiseGroup.Alias }, + { "Attachment", domainOfExpertiseGroup => domainOfExpertiseGroup.Attachment }, { "Definition", domainOfExpertiseGroup => domainOfExpertiseGroup.Definition }, { "HyperLink", domainOfExpertiseGroup => domainOfExpertiseGroup.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class DomainOfExpertiseGroupMetaInfo : IDomainOfExpertiseGroupMet private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'DomainOfExpertiseGroup' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'DomainOfExpertiseGroup' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'DomainOfExpertiseGroup' is mandatory and cannot be null.") }, { "Domain", new DtoValidationHelper(item => item.Domain != null, "The 'Domain' property of a 'DomainOfExpertiseGroup' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'DomainOfExpertiseGroup' is mandatory and cannot be null.") }, @@ -206,6 +208,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing do private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -235,6 +238,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "Domain", thing => thing.Domain }, @@ -277,6 +281,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "Domain", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/DomainOfExpertiseMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/DomainOfExpertiseMetaInfo.cs index 7c3c1fbcc..c7ee7c15f 100644 --- a/CDP4Common/AutoGenMetaInfo/DomainOfExpertiseMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/DomainOfExpertiseMetaInfo.cs @@ -48,6 +48,7 @@ public partial class DomainOfExpertiseMetaInfo : IDomainOfExpertiseMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", domainOfExpertise => domainOfExpertise.Alias }, + { "Attachment", domainOfExpertise => domainOfExpertise.Attachment }, { "Definition", domainOfExpertise => domainOfExpertise.Definition }, { "HyperLink", domainOfExpertise => domainOfExpertise.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class DomainOfExpertiseMetaInfo : IDomainOfExpertiseMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'DomainOfExpertise' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'DomainOfExpertise' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'DomainOfExpertise' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'DomainOfExpertise' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'DomainOfExpertise' is mandatory and cannot be null.") }, @@ -206,6 +208,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing do private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -235,6 +238,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -277,6 +281,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/ElementBaseMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ElementBaseMetaInfo.cs index 6ab2be905..152a02418 100644 --- a/CDP4Common/AutoGenMetaInfo/ElementBaseMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ElementBaseMetaInfo.cs @@ -48,6 +48,7 @@ public partial class ElementBaseMetaInfo : IElementBaseMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", elementBase => elementBase.Alias }, + { "Attachment", elementBase => elementBase.Attachment }, { "Definition", elementBase => elementBase.Definition }, { "HyperLink", elementBase => elementBase.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class ElementBaseMetaInfo : IElementBaseMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'ElementBase' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'ElementBase' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'ElementBase' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'ElementBase' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'ElementBase' is mandatory and cannot be null.") }, @@ -206,6 +208,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing el private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -235,6 +238,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -277,6 +281,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/ElementDefinitionMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ElementDefinitionMetaInfo.cs index b6bf52d1b..65ff1491d 100644 --- a/CDP4Common/AutoGenMetaInfo/ElementDefinitionMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ElementDefinitionMetaInfo.cs @@ -48,6 +48,8 @@ public partial class ElementDefinitionMetaInfo : IElementDefinitionMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", elementDefinition => elementDefinition.Alias }, + { "Attachment", elementDefinition => elementDefinition.Attachment }, + { "Behavior", elementDefinition => elementDefinition.Behavior }, { "ContainedElement", elementDefinition => elementDefinition.ContainedElement }, { "Definition", elementDefinition => elementDefinition.Definition }, { "HyperLink", elementDefinition => elementDefinition.HyperLink }, @@ -66,6 +68,8 @@ public partial class ElementDefinitionMetaInfo : IElementDefinitionMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'ElementDefinition' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'ElementDefinition' is mandatory and cannot be null.") }, + { "Behavior", new DtoValidationHelper(item => item.Behavior != null, "The 'Behavior' property of a 'ElementDefinition' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'ElementDefinition' is mandatory and cannot be null.") }, { "ContainedElement", new DtoValidationHelper(item => item.ContainedElement != null, "The 'ContainedElement' property of a 'ElementDefinition' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'ElementDefinition' is mandatory and cannot be null.") }, @@ -202,6 +206,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing el /// private readonly Dictionary cdpVersionedProperties = new Dictionary { + { "Behavior", "1.3.0" }, { "ExcludedDomain", "1.1.0" }, { "ExcludedPerson", "1.1.0" }, { "ModifiedOn", "1.1.0" }, @@ -215,6 +220,8 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing el private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Behavior", new PropertyMetaInfo("Behavior", "Behavior", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "ContainedElement", new PropertyMetaInfo("ContainedElement", "ElementUsage", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -247,6 +254,8 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, + { "Behavior", thing => thing.Behavior }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "ContainedElement", thing => thing.ContainedElement }, @@ -296,6 +305,8 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, + { "Behavior", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "ContainedElement", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/ElementUsageMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ElementUsageMetaInfo.cs index 98741ad53..071c2be22 100644 --- a/CDP4Common/AutoGenMetaInfo/ElementUsageMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ElementUsageMetaInfo.cs @@ -48,6 +48,7 @@ public partial class ElementUsageMetaInfo : IElementUsageMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", elementUsage => elementUsage.Alias }, + { "Attachment", elementUsage => elementUsage.Attachment }, { "Definition", elementUsage => elementUsage.Definition }, { "HyperLink", elementUsage => elementUsage.HyperLink }, { "ParameterOverride", elementUsage => elementUsage.ParameterOverride }, @@ -64,6 +65,7 @@ public partial class ElementUsageMetaInfo : IElementUsageMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'ElementUsage' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'ElementUsage' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'ElementUsage' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'ElementUsage' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'ElementUsage' is mandatory and cannot be null.") }, @@ -209,6 +211,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing el private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "ParameterOverride", new PropertyMetaInfo("ParameterOverride", "ParameterOverride", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -239,6 +242,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -288,6 +292,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/EngineeringModelSetupMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/EngineeringModelSetupMetaInfo.cs index 993390430..c934e26a8 100644 --- a/CDP4Common/AutoGenMetaInfo/EngineeringModelSetupMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/EngineeringModelSetupMetaInfo.cs @@ -48,6 +48,7 @@ public partial class EngineeringModelSetupMetaInfo : IEngineeringModelSetupMetaI private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", engineeringModelSetup => engineeringModelSetup.Alias }, + { "Attachment", engineeringModelSetup => engineeringModelSetup.Attachment }, { "Definition", engineeringModelSetup => engineeringModelSetup.Definition }, { "HyperLink", engineeringModelSetup => engineeringModelSetup.HyperLink }, { "IterationSetup", engineeringModelSetup => engineeringModelSetup.IterationSetup }, @@ -68,6 +69,7 @@ public partial class EngineeringModelSetupMetaInfo : IEngineeringModelSetupMetaI { { "ActiveDomain", new DtoValidationHelper(item => item.ActiveDomain != null && item.ActiveDomain.Any(), "The 'ActiveDomain' property of a 'EngineeringModelSetup' is mandatory and must have at least one entry.") }, { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'EngineeringModelSetup' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'EngineeringModelSetup' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'EngineeringModelSetup' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'EngineeringModelSetup' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'EngineeringModelSetup' is mandatory and cannot be null.") }, @@ -216,6 +218,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing en private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "IterationSetup", new PropertyMetaInfo("IterationSetup", "IterationSetup", PropertyKind.List, AggregationKind.Composite, false, false, true, 1, "*", true) }, @@ -250,6 +253,7 @@ public IEnumerable Properties { { "ActiveDomain", thing => thing.ActiveDomain }, { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "DefaultOrganizationalParticipant", thing => thing.DefaultOrganizationalParticipant }, { "Definition", thing => thing.Definition }, @@ -304,6 +308,7 @@ public IEnumerable Properties { { "ActiveDomain", (value) => (Guid)value }, { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/EnumerationParameterTypeMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/EnumerationParameterTypeMetaInfo.cs index 7e56be3f4..47cbbb2a1 100644 --- a/CDP4Common/AutoGenMetaInfo/EnumerationParameterTypeMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/EnumerationParameterTypeMetaInfo.cs @@ -48,6 +48,7 @@ public partial class EnumerationParameterTypeMetaInfo : IEnumerationParameterTyp private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", enumerationParameterType => enumerationParameterType.Alias }, + { "Attachment", enumerationParameterType => enumerationParameterType.Attachment }, { "Definition", enumerationParameterType => enumerationParameterType.Definition }, { "HyperLink", enumerationParameterType => enumerationParameterType.HyperLink }, { "ValueDefinition", enumerationParameterType => enumerationParameterType.ValueDefinition.ToIdList() }, @@ -67,6 +68,7 @@ public partial class EnumerationParameterTypeMetaInfo : IEnumerationParameterTyp private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'EnumerationParameterType' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'EnumerationParameterType' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'EnumerationParameterType' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'EnumerationParameterType' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'EnumerationParameterType' is mandatory and cannot be null.") }, @@ -212,6 +214,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing en private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "ValueDefinition", new PropertyMetaInfo("ValueDefinition", "EnumerationValueDefinition", PropertyKind.OrderedList, AggregationKind.Composite, false, true, true, 1, "*", true) }, @@ -243,6 +246,7 @@ public IEnumerable Properties { { "Alias", thing => thing.Alias }, { "AllowMultiSelect", thing => thing.AllowMultiSelect }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -290,6 +294,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/EnumerationValueDefinitionMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/EnumerationValueDefinitionMetaInfo.cs index 28ca242f8..8c86dc8e8 100644 --- a/CDP4Common/AutoGenMetaInfo/EnumerationValueDefinitionMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/EnumerationValueDefinitionMetaInfo.cs @@ -48,6 +48,7 @@ public partial class EnumerationValueDefinitionMetaInfo : IEnumerationValueDefin private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", enumerationValueDefinition => enumerationValueDefinition.Alias }, + { "Attachment", enumerationValueDefinition => enumerationValueDefinition.Attachment }, { "Definition", enumerationValueDefinition => enumerationValueDefinition.Definition }, { "HyperLink", enumerationValueDefinition => enumerationValueDefinition.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class EnumerationValueDefinitionMetaInfo : IEnumerationValueDefin private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'EnumerationValueDefinition' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'EnumerationValueDefinition' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'EnumerationValueDefinition' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'EnumerationValueDefinition' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'EnumerationValueDefinition' is mandatory and cannot be null.") }, @@ -205,6 +207,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing en private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -234,6 +237,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -272,6 +276,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/FileTypeMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/FileTypeMetaInfo.cs index 021f499aa..d2d005cb7 100644 --- a/CDP4Common/AutoGenMetaInfo/FileTypeMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/FileTypeMetaInfo.cs @@ -48,6 +48,7 @@ public partial class FileTypeMetaInfo : IFileTypeMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", fileType => fileType.Alias }, + { "Attachment", fileType => fileType.Attachment }, { "Definition", fileType => fileType.Definition }, { "HyperLink", fileType => fileType.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class FileTypeMetaInfo : IFileTypeMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'FileType' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'FileType' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'FileType' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'FileType' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'FileType' is mandatory and cannot be null.") }, @@ -207,6 +209,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing fi private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -236,6 +239,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -280,6 +284,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/GlossaryMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/GlossaryMetaInfo.cs index 886e4be3b..2e4a79de5 100644 --- a/CDP4Common/AutoGenMetaInfo/GlossaryMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/GlossaryMetaInfo.cs @@ -48,6 +48,7 @@ public partial class GlossaryMetaInfo : IGlossaryMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", glossary => glossary.Alias }, + { "Attachment", glossary => glossary.Attachment }, { "Definition", glossary => glossary.Definition }, { "HyperLink", glossary => glossary.HyperLink }, { "Term", glossary => glossary.Term }, @@ -64,6 +65,7 @@ public partial class GlossaryMetaInfo : IGlossaryMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'Glossary' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'Glossary' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'Glossary' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'Glossary' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'Glossary' is mandatory and cannot be null.") }, @@ -208,6 +210,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing gl private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Term", new PropertyMetaInfo("Term", "Term", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -238,6 +241,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -281,6 +285,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/GoalMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/GoalMetaInfo.cs index 719d17a86..ec0f8a52e 100644 --- a/CDP4Common/AutoGenMetaInfo/GoalMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/GoalMetaInfo.cs @@ -48,6 +48,7 @@ public partial class GoalMetaInfo : IGoalMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", goal => goal.Alias }, + { "Attachment", goal => goal.Attachment }, { "Definition", goal => goal.Definition }, { "HyperLink", goal => goal.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class GoalMetaInfo : IGoalMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'Goal' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'Goal' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'Goal' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'Goal' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'Goal' is mandatory and cannot be null.") }, @@ -206,6 +208,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing go private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -235,6 +238,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -275,6 +279,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/HyperLinkMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/HyperLinkMetaInfo.cs index 84ea6f623..4f11a5d4a 100644 --- a/CDP4Common/AutoGenMetaInfo/HyperLinkMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/HyperLinkMetaInfo.cs @@ -281,6 +281,7 @@ public IEnumerable Properties private readonly Dictionary possibleContainerProperties = new Dictionary { { "ArrayParameterType", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Behavior", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "BinaryRelationshipRule", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "BooleanParameterType", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Category", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, diff --git a/CDP4Common/AutoGenMetaInfo/IArchitectureDiagramMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/IArchitectureDiagramMetaInfo.cs new file mode 100644 index 000000000..c9fe89067 --- /dev/null +++ b/CDP4Common/AutoGenMetaInfo/IArchitectureDiagramMetaInfo.cs @@ -0,0 +1,33 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.MetaInfo +{ + /// + /// The interface for the . + /// + public interface IArchitectureDiagramMetaInfo : IMetaInfo + { + } +} diff --git a/CDP4Common/AutoGenMetaInfo/IArchitectureElementMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/IArchitectureElementMetaInfo.cs new file mode 100644 index 000000000..a6bdf1c7a --- /dev/null +++ b/CDP4Common/AutoGenMetaInfo/IArchitectureElementMetaInfo.cs @@ -0,0 +1,33 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.MetaInfo +{ + /// + /// The interface for the . + /// + public interface IArchitectureElementMetaInfo : IMetaInfo + { + } +} diff --git a/CDP4Common/AutoGenMetaInfo/IAttachmentMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/IAttachmentMetaInfo.cs new file mode 100644 index 000000000..f642a4464 --- /dev/null +++ b/CDP4Common/AutoGenMetaInfo/IAttachmentMetaInfo.cs @@ -0,0 +1,33 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.MetaInfo +{ + /// + /// The interface for the . + /// + public interface IAttachmentMetaInfo : IMetaInfo + { + } +} diff --git a/CDP4Common/AutoGenMetaInfo/IBehaviorMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/IBehaviorMetaInfo.cs new file mode 100644 index 000000000..f29679b20 --- /dev/null +++ b/CDP4Common/AutoGenMetaInfo/IBehaviorMetaInfo.cs @@ -0,0 +1,33 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.MetaInfo +{ + /// + /// The interface for the . + /// + public interface IBehaviorMetaInfo : IMetaInfo + { + } +} diff --git a/CDP4Common/AutoGenMetaInfo/IBehavioralParameterMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/IBehavioralParameterMetaInfo.cs new file mode 100644 index 000000000..e0493a9a9 --- /dev/null +++ b/CDP4Common/AutoGenMetaInfo/IBehavioralParameterMetaInfo.cs @@ -0,0 +1,33 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.MetaInfo +{ + /// + /// The interface for the . + /// + public interface IBehavioralParameterMetaInfo : IMetaInfo + { + } +} diff --git a/CDP4Common/AutoGenMetaInfo/IDiagramFrameMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/IDiagramFrameMetaInfo.cs new file mode 100644 index 000000000..e67b9ada2 --- /dev/null +++ b/CDP4Common/AutoGenMetaInfo/IDiagramFrameMetaInfo.cs @@ -0,0 +1,33 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.MetaInfo +{ + /// + /// The interface for the . + /// + public interface IDiagramFrameMetaInfo : IMetaInfo + { + } +} diff --git a/CDP4Common/AutoGenMetaInfo/IDiagramPortMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/IDiagramPortMetaInfo.cs new file mode 100644 index 000000000..dc75bd4d1 --- /dev/null +++ b/CDP4Common/AutoGenMetaInfo/IDiagramPortMetaInfo.cs @@ -0,0 +1,33 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.MetaInfo +{ + /// + /// The interface for the . + /// + public interface IDiagramPortMetaInfo : IMetaInfo + { + } +} diff --git a/CDP4Common/AutoGenMetaInfo/IntervalScaleMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/IntervalScaleMetaInfo.cs index 662bc44ba..2347ba7da 100644 --- a/CDP4Common/AutoGenMetaInfo/IntervalScaleMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/IntervalScaleMetaInfo.cs @@ -48,6 +48,7 @@ public partial class IntervalScaleMetaInfo : IIntervalScaleMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", intervalScale => intervalScale.Alias }, + { "Attachment", intervalScale => intervalScale.Attachment }, { "Definition", intervalScale => intervalScale.Definition }, { "HyperLink", intervalScale => intervalScale.HyperLink }, { "MappingToReferenceScale", intervalScale => intervalScale.MappingToReferenceScale }, @@ -65,6 +66,7 @@ public partial class IntervalScaleMetaInfo : IIntervalScaleMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'IntervalScale' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'IntervalScale' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'IntervalScale' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'IntervalScale' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'IntervalScale' is mandatory and cannot be null.") }, @@ -209,6 +211,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing in private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "MappingToReferenceScale", new PropertyMetaInfo("MappingToReferenceScale", "MappingToReferenceScale", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -240,6 +243,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -298,6 +302,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/LinearConversionUnitMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/LinearConversionUnitMetaInfo.cs index 981d768f3..3a1532cdc 100644 --- a/CDP4Common/AutoGenMetaInfo/LinearConversionUnitMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/LinearConversionUnitMetaInfo.cs @@ -48,6 +48,7 @@ public partial class LinearConversionUnitMetaInfo : ILinearConversionUnitMetaInf private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", linearConversionUnit => linearConversionUnit.Alias }, + { "Attachment", linearConversionUnit => linearConversionUnit.Attachment }, { "Definition", linearConversionUnit => linearConversionUnit.Definition }, { "HyperLink", linearConversionUnit => linearConversionUnit.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class LinearConversionUnitMetaInfo : ILinearConversionUnitMetaInf private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'LinearConversionUnit' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'LinearConversionUnit' is mandatory and cannot be null.") }, { "ConversionFactor", new DtoValidationHelper(item => !string.IsNullOrWhiteSpace(item.ConversionFactor), "The 'ConversionFactor' property of a 'LinearConversionUnit' is mandatory and cannot be empty or null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'LinearConversionUnit' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'LinearConversionUnit' is mandatory and cannot be null.") }, @@ -206,6 +208,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing li private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -235,6 +238,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "ConversionFactor", thing => thing.ConversionFactor }, { "Definition", thing => thing.Definition }, @@ -279,6 +283,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/LogarithmicScaleMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/LogarithmicScaleMetaInfo.cs index 2957c31c7..7451b5dc2 100644 --- a/CDP4Common/AutoGenMetaInfo/LogarithmicScaleMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/LogarithmicScaleMetaInfo.cs @@ -48,6 +48,7 @@ public partial class LogarithmicScaleMetaInfo : ILogarithmicScaleMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", logarithmicScale => logarithmicScale.Alias }, + { "Attachment", logarithmicScale => logarithmicScale.Attachment }, { "Definition", logarithmicScale => logarithmicScale.Definition }, { "HyperLink", logarithmicScale => logarithmicScale.HyperLink }, { "MappingToReferenceScale", logarithmicScale => logarithmicScale.MappingToReferenceScale }, @@ -66,6 +67,7 @@ public partial class LogarithmicScaleMetaInfo : ILogarithmicScaleMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'LogarithmicScale' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'LogarithmicScale' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'LogarithmicScale' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'LogarithmicScale' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'LogarithmicScale' is mandatory and cannot be null.") }, @@ -213,6 +215,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing lo private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "MappingToReferenceScale", new PropertyMetaInfo("MappingToReferenceScale", "MappingToReferenceScale", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -245,6 +248,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -312,6 +316,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/MeasurementScaleMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/MeasurementScaleMetaInfo.cs index afe8325ed..703beb900 100644 --- a/CDP4Common/AutoGenMetaInfo/MeasurementScaleMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/MeasurementScaleMetaInfo.cs @@ -48,6 +48,7 @@ public partial class MeasurementScaleMetaInfo : IMeasurementScaleMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", measurementScale => measurementScale.Alias }, + { "Attachment", measurementScale => measurementScale.Attachment }, { "Definition", measurementScale => measurementScale.Definition }, { "HyperLink", measurementScale => measurementScale.HyperLink }, { "MappingToReferenceScale", measurementScale => measurementScale.MappingToReferenceScale }, @@ -65,6 +66,7 @@ public partial class MeasurementScaleMetaInfo : IMeasurementScaleMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'MeasurementScale' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'MeasurementScale' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'MeasurementScale' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'MeasurementScale' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'MeasurementScale' is mandatory and cannot be null.") }, @@ -209,6 +211,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing me private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "MappingToReferenceScale", new PropertyMetaInfo("MappingToReferenceScale", "MappingToReferenceScale", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -240,6 +243,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -298,6 +302,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/MeasurementUnitMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/MeasurementUnitMetaInfo.cs index 1d7303f4f..500644350 100644 --- a/CDP4Common/AutoGenMetaInfo/MeasurementUnitMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/MeasurementUnitMetaInfo.cs @@ -48,6 +48,7 @@ public partial class MeasurementUnitMetaInfo : IMeasurementUnitMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", measurementUnit => measurementUnit.Alias }, + { "Attachment", measurementUnit => measurementUnit.Attachment }, { "Definition", measurementUnit => measurementUnit.Definition }, { "HyperLink", measurementUnit => measurementUnit.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class MeasurementUnitMetaInfo : IMeasurementUnitMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'MeasurementUnit' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'MeasurementUnit' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'MeasurementUnit' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'MeasurementUnit' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'MeasurementUnit' is mandatory and cannot be null.") }, @@ -205,6 +207,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing me private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -234,6 +237,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -274,6 +278,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/MetaDataProvider.cs b/CDP4Common/AutoGenMetaInfo/MetaDataProvider.cs index 15faf8262..01a4bb572 100644 --- a/CDP4Common/AutoGenMetaInfo/MetaDataProvider.cs +++ b/CDP4Common/AutoGenMetaInfo/MetaDataProvider.cs @@ -48,7 +48,12 @@ public class MetaDataProvider : IMetaDataProvider { "Alias", new AliasMetaInfo() }, { "AndExpression", new AndExpressionMetaInfo() }, { "Approval", new ApprovalMetaInfo() }, + { "ArchitectureDiagram", new ArchitectureDiagramMetaInfo() }, + { "ArchitectureElement", new ArchitectureElementMetaInfo() }, { "ArrayParameterType", new ArrayParameterTypeMetaInfo() }, + { "Attachment", new AttachmentMetaInfo() }, + { "Behavior", new BehaviorMetaInfo() }, + { "BehavioralParameter", new BehavioralParameterMetaInfo() }, { "BinaryNote", new BinaryNoteMetaInfo() }, { "BinaryRelationship", new BinaryRelationshipMetaInfo() }, { "BinaryRelationshipRule", new BinaryRelationshipRuleMetaInfo() }, @@ -81,8 +86,10 @@ public class MetaDataProvider : IMetaDataProvider { "DiagramEdge", new DiagramEdgeMetaInfo() }, { "DiagramElementContainer", new DiagramElementContainerMetaInfo() }, { "DiagramElementThing", new DiagramElementThingMetaInfo() }, + { "DiagramFrame", new DiagramFrameMetaInfo() }, { "DiagrammingStyle", new DiagrammingStyleMetaInfo() }, { "DiagramObject", new DiagramObjectMetaInfo() }, + { "DiagramPort", new DiagramPortMetaInfo() }, { "DiagramShape", new DiagramShapeMetaInfo() }, { "DiagramThingBase", new DiagramThingBaseMetaInfo() }, { "DiscussionItem", new DiscussionItemMetaInfo() }, diff --git a/CDP4Common/AutoGenMetaInfo/ModelReferenceDataLibraryMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ModelReferenceDataLibraryMetaInfo.cs index f134d98b7..51b2fabb4 100644 --- a/CDP4Common/AutoGenMetaInfo/ModelReferenceDataLibraryMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ModelReferenceDataLibraryMetaInfo.cs @@ -48,6 +48,7 @@ public partial class ModelReferenceDataLibraryMetaInfo : IModelReferenceDataLibr private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", modelReferenceDataLibrary => modelReferenceDataLibrary.Alias }, + { "Attachment", modelReferenceDataLibrary => modelReferenceDataLibrary.Attachment }, { "Constant", modelReferenceDataLibrary => modelReferenceDataLibrary.Constant }, { "DefinedCategory", modelReferenceDataLibrary => modelReferenceDataLibrary.DefinedCategory }, { "Definition", modelReferenceDataLibrary => modelReferenceDataLibrary.Definition }, @@ -73,6 +74,7 @@ public partial class ModelReferenceDataLibraryMetaInfo : IModelReferenceDataLibr private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'ModelReferenceDataLibrary' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'ModelReferenceDataLibrary' is mandatory and cannot be null.") }, { "BaseQuantityKind", new DtoValidationHelper(item => item.BaseQuantityKind != null, "The 'BaseQuantityKind' property of a 'ModelReferenceDataLibrary' is mandatory and cannot be null.") }, { "BaseUnit", new DtoValidationHelper(item => item.BaseUnit != null, "The 'BaseUnit' property of a 'ModelReferenceDataLibrary' is mandatory and cannot be null.") }, { "Constant", new DtoValidationHelper(item => item.Constant != null, "The 'Constant' property of a 'ModelReferenceDataLibrary' is mandatory and cannot be null.") }, @@ -227,6 +229,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing mo private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Constant", new PropertyMetaInfo("Constant", "Constant", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DefinedCategory", new PropertyMetaInfo("DefinedCategory", "Category", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -266,6 +269,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "BaseQuantityKind", thing => thing.BaseQuantityKind }, { "BaseUnit", thing => thing.BaseUnit }, { "ClassKind", thing => thing.ClassKind }, @@ -320,6 +324,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "BaseQuantityKind", (value) => (Guid)value }, { "BaseUnit", (value) => (Guid)value }, { "Constant", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/MultiRelationshipRuleMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/MultiRelationshipRuleMetaInfo.cs index 588ab634d..64947c131 100644 --- a/CDP4Common/AutoGenMetaInfo/MultiRelationshipRuleMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/MultiRelationshipRuleMetaInfo.cs @@ -48,6 +48,7 @@ public partial class MultiRelationshipRuleMetaInfo : IMultiRelationshipRuleMetaI private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", multiRelationshipRule => multiRelationshipRule.Alias }, + { "Attachment", multiRelationshipRule => multiRelationshipRule.Attachment }, { "Definition", multiRelationshipRule => multiRelationshipRule.Definition }, { "HyperLink", multiRelationshipRule => multiRelationshipRule.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class MultiRelationshipRuleMetaInfo : IMultiRelationshipRuleMetaI private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'MultiRelationshipRule' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'MultiRelationshipRule' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'MultiRelationshipRule' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'MultiRelationshipRule' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'MultiRelationshipRule' is mandatory and cannot be null.") }, @@ -206,6 +208,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing mu private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -235,6 +238,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -283,6 +287,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/OptionMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/OptionMetaInfo.cs index be92923c4..855fa536a 100644 --- a/CDP4Common/AutoGenMetaInfo/OptionMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/OptionMetaInfo.cs @@ -48,6 +48,7 @@ public partial class OptionMetaInfo : IOptionMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", option => option.Alias }, + { "Attachment", option => option.Attachment }, { "Definition", option => option.Definition }, { "HyperLink", option => option.HyperLink }, { "NestedElement", option => option.NestedElement }, @@ -64,6 +65,7 @@ public partial class OptionMetaInfo : IOptionMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'Option' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'Option' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'Option' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'Option' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'Option' is mandatory and cannot be null.") }, @@ -208,6 +210,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing op private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "NestedElement", new PropertyMetaInfo("NestedElement", "NestedElement", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -238,6 +241,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -279,6 +283,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/OrdinalScaleMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/OrdinalScaleMetaInfo.cs index feabc3c8c..4439c1425 100644 --- a/CDP4Common/AutoGenMetaInfo/OrdinalScaleMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/OrdinalScaleMetaInfo.cs @@ -48,6 +48,7 @@ public partial class OrdinalScaleMetaInfo : IOrdinalScaleMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", ordinalScale => ordinalScale.Alias }, + { "Attachment", ordinalScale => ordinalScale.Attachment }, { "Definition", ordinalScale => ordinalScale.Definition }, { "HyperLink", ordinalScale => ordinalScale.HyperLink }, { "MappingToReferenceScale", ordinalScale => ordinalScale.MappingToReferenceScale }, @@ -65,6 +66,7 @@ public partial class OrdinalScaleMetaInfo : IOrdinalScaleMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'OrdinalScale' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'OrdinalScale' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'OrdinalScale' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'OrdinalScale' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'OrdinalScale' is mandatory and cannot be null.") }, @@ -209,6 +211,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing or private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "MappingToReferenceScale", new PropertyMetaInfo("MappingToReferenceScale", "MappingToReferenceScale", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -240,6 +243,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -300,6 +304,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/OwnedStyleMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/OwnedStyleMetaInfo.cs index 7c7e2d5b8..d58370dda 100644 --- a/CDP4Common/AutoGenMetaInfo/OwnedStyleMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/OwnedStyleMetaInfo.cs @@ -317,8 +317,11 @@ public IEnumerable Properties /// private readonly Dictionary possibleContainerProperties = new Dictionary { + { "ArchitectureElement", new PropertyMetaInfo("LocalStyle", "OwnedStyle", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, { "DiagramEdge", new PropertyMetaInfo("LocalStyle", "OwnedStyle", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, + { "DiagramFrame", new PropertyMetaInfo("LocalStyle", "OwnedStyle", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, { "DiagramObject", new PropertyMetaInfo("LocalStyle", "OwnedStyle", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, + { "DiagramPort", new PropertyMetaInfo("LocalStyle", "OwnedStyle", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "1", true) }, }; /// diff --git a/CDP4Common/AutoGenMetaInfo/ParameterTypeMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ParameterTypeMetaInfo.cs index 8249c5619..24259a63a 100644 --- a/CDP4Common/AutoGenMetaInfo/ParameterTypeMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ParameterTypeMetaInfo.cs @@ -48,6 +48,7 @@ public partial class ParameterTypeMetaInfo : IParameterTypeMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", parameterType => parameterType.Alias }, + { "Attachment", parameterType => parameterType.Attachment }, { "Definition", parameterType => parameterType.Definition }, { "HyperLink", parameterType => parameterType.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class ParameterTypeMetaInfo : IParameterTypeMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'ParameterType' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'ParameterType' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'ParameterType' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'ParameterType' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'ParameterType' is mandatory and cannot be null.") }, @@ -207,6 +209,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing pa private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -236,6 +239,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -281,6 +285,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/ParameterizedCategoryRuleMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ParameterizedCategoryRuleMetaInfo.cs index 6bcdf98de..2b4773882 100644 --- a/CDP4Common/AutoGenMetaInfo/ParameterizedCategoryRuleMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ParameterizedCategoryRuleMetaInfo.cs @@ -48,6 +48,7 @@ public partial class ParameterizedCategoryRuleMetaInfo : IParameterizedCategoryR private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", parameterizedCategoryRule => parameterizedCategoryRule.Alias }, + { "Attachment", parameterizedCategoryRule => parameterizedCategoryRule.Attachment }, { "Definition", parameterizedCategoryRule => parameterizedCategoryRule.Definition }, { "HyperLink", parameterizedCategoryRule => parameterizedCategoryRule.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class ParameterizedCategoryRuleMetaInfo : IParameterizedCategoryR private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'ParameterizedCategoryRule' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'ParameterizedCategoryRule' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'ParameterizedCategoryRule' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'ParameterizedCategoryRule' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'ParameterizedCategoryRule' is mandatory and cannot be null.") }, @@ -206,6 +208,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing pa private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -235,6 +238,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -279,6 +283,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/ParticipantRoleMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ParticipantRoleMetaInfo.cs index 0d7737eac..12279622b 100644 --- a/CDP4Common/AutoGenMetaInfo/ParticipantRoleMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ParticipantRoleMetaInfo.cs @@ -48,6 +48,7 @@ public partial class ParticipantRoleMetaInfo : IParticipantRoleMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", participantRole => participantRole.Alias }, + { "Attachment", participantRole => participantRole.Attachment }, { "Definition", participantRole => participantRole.Definition }, { "HyperLink", participantRole => participantRole.HyperLink }, { "ParticipantPermission", participantRole => participantRole.ParticipantPermission }, @@ -64,6 +65,7 @@ public partial class ParticipantRoleMetaInfo : IParticipantRoleMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'ParticipantRole' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'ParticipantRole' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'ParticipantRole' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'ParticipantRole' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'ParticipantRole' is mandatory and cannot be null.") }, @@ -207,6 +209,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing pa private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "ParticipantPermission", new PropertyMetaInfo("ParticipantPermission", "ParticipantPermission", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -237,6 +240,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -278,6 +282,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/PersonRoleMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/PersonRoleMetaInfo.cs index 836dfa1fb..35cbca3f5 100644 --- a/CDP4Common/AutoGenMetaInfo/PersonRoleMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/PersonRoleMetaInfo.cs @@ -48,6 +48,7 @@ public partial class PersonRoleMetaInfo : IPersonRoleMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", personRole => personRole.Alias }, + { "Attachment", personRole => personRole.Attachment }, { "Definition", personRole => personRole.Definition }, { "HyperLink", personRole => personRole.HyperLink }, { "PersonPermission", personRole => personRole.PersonPermission }, @@ -64,6 +65,7 @@ public partial class PersonRoleMetaInfo : IPersonRoleMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'PersonRole' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'PersonRole' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'PersonRole' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'PersonRole' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'PersonRole' is mandatory and cannot be null.") }, @@ -207,6 +209,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing pe private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "PersonPermission", new PropertyMetaInfo("PersonPermission", "PersonPermission", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -237,6 +240,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -278,6 +282,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/PossibleFiniteStateListMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/PossibleFiniteStateListMetaInfo.cs index eb9988a5d..74f8eefe1 100644 --- a/CDP4Common/AutoGenMetaInfo/PossibleFiniteStateListMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/PossibleFiniteStateListMetaInfo.cs @@ -48,6 +48,7 @@ public partial class PossibleFiniteStateListMetaInfo : IPossibleFiniteStateListM private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", possibleFiniteStateList => possibleFiniteStateList.Alias }, + { "Attachment", possibleFiniteStateList => possibleFiniteStateList.Attachment }, { "Definition", possibleFiniteStateList => possibleFiniteStateList.Definition }, { "HyperLink", possibleFiniteStateList => possibleFiniteStateList.HyperLink }, { "PossibleState", possibleFiniteStateList => possibleFiniteStateList.PossibleState.ToIdList() }, @@ -67,6 +68,7 @@ public partial class PossibleFiniteStateListMetaInfo : IPossibleFiniteStateListM private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'PossibleFiniteStateList' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'PossibleFiniteStateList' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'PossibleFiniteStateList' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'PossibleFiniteStateList' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'PossibleFiniteStateList' is mandatory and cannot be null.") }, @@ -211,6 +213,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing po private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "PossibleState", new PropertyMetaInfo("PossibleState", "PossibleFiniteState", PropertyKind.OrderedList, AggregationKind.Composite, false, true, true, 1, "*", true) }, @@ -241,6 +244,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "DefaultState", thing => thing.DefaultState }, @@ -286,6 +290,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/PossibleFiniteStateMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/PossibleFiniteStateMetaInfo.cs index ac470ad8d..af506244e 100644 --- a/CDP4Common/AutoGenMetaInfo/PossibleFiniteStateMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/PossibleFiniteStateMetaInfo.cs @@ -48,6 +48,7 @@ public partial class PossibleFiniteStateMetaInfo : IPossibleFiniteStateMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", possibleFiniteState => possibleFiniteState.Alias }, + { "Attachment", possibleFiniteState => possibleFiniteState.Attachment }, { "Definition", possibleFiniteState => possibleFiniteState.Definition }, { "HyperLink", possibleFiniteState => possibleFiniteState.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class PossibleFiniteStateMetaInfo : IPossibleFiniteStateMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'PossibleFiniteState' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'PossibleFiniteState' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'PossibleFiniteState' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'PossibleFiniteState' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'PossibleFiniteState' is mandatory and cannot be null.") }, @@ -205,6 +207,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing po private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -234,6 +237,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -273,6 +277,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/PrefixedUnitMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/PrefixedUnitMetaInfo.cs index 345a5814a..82ee8eb0b 100644 --- a/CDP4Common/AutoGenMetaInfo/PrefixedUnitMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/PrefixedUnitMetaInfo.cs @@ -48,6 +48,7 @@ public partial class PrefixedUnitMetaInfo : IPrefixedUnitMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", prefixedUnit => prefixedUnit.Alias }, + { "Attachment", prefixedUnit => prefixedUnit.Attachment }, { "Definition", prefixedUnit => prefixedUnit.Definition }, { "HyperLink", prefixedUnit => prefixedUnit.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class PrefixedUnitMetaInfo : IPrefixedUnitMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'PrefixedUnit' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'PrefixedUnit' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'PrefixedUnit' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'PrefixedUnit' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'PrefixedUnit' is mandatory and cannot be null.") }, @@ -203,6 +205,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing pr private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -232,6 +235,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -275,6 +279,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/QuantityKindMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/QuantityKindMetaInfo.cs index 96a68bf5a..b644a3c4a 100644 --- a/CDP4Common/AutoGenMetaInfo/QuantityKindMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/QuantityKindMetaInfo.cs @@ -48,6 +48,7 @@ public partial class QuantityKindMetaInfo : IQuantityKindMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", quantityKind => quantityKind.Alias }, + { "Attachment", quantityKind => quantityKind.Attachment }, { "Definition", quantityKind => quantityKind.Definition }, { "HyperLink", quantityKind => quantityKind.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class QuantityKindMetaInfo : IQuantityKindMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'QuantityKind' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'QuantityKind' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'QuantityKind' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'QuantityKind' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'QuantityKind' is mandatory and cannot be null.") }, @@ -208,6 +210,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing qu private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -237,6 +240,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "DefaultScale", thing => thing.DefaultScale }, @@ -291,6 +295,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/RatioScaleMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/RatioScaleMetaInfo.cs index 55c1e63ac..140bcc832 100644 --- a/CDP4Common/AutoGenMetaInfo/RatioScaleMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/RatioScaleMetaInfo.cs @@ -48,6 +48,7 @@ public partial class RatioScaleMetaInfo : IRatioScaleMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", ratioScale => ratioScale.Alias }, + { "Attachment", ratioScale => ratioScale.Attachment }, { "Definition", ratioScale => ratioScale.Definition }, { "HyperLink", ratioScale => ratioScale.HyperLink }, { "MappingToReferenceScale", ratioScale => ratioScale.MappingToReferenceScale }, @@ -65,6 +66,7 @@ public partial class RatioScaleMetaInfo : IRatioScaleMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'RatioScale' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'RatioScale' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'RatioScale' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'RatioScale' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'RatioScale' is mandatory and cannot be null.") }, @@ -209,6 +211,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing ra private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "MappingToReferenceScale", new PropertyMetaInfo("MappingToReferenceScale", "MappingToReferenceScale", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -240,6 +243,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -298,6 +302,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/ReferenceDataLibraryMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ReferenceDataLibraryMetaInfo.cs index 9860d9537..ea4677d05 100644 --- a/CDP4Common/AutoGenMetaInfo/ReferenceDataLibraryMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ReferenceDataLibraryMetaInfo.cs @@ -48,6 +48,7 @@ public partial class ReferenceDataLibraryMetaInfo : IReferenceDataLibraryMetaInf private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", referenceDataLibrary => referenceDataLibrary.Alias }, + { "Attachment", referenceDataLibrary => referenceDataLibrary.Attachment }, { "Constant", referenceDataLibrary => referenceDataLibrary.Constant }, { "DefinedCategory", referenceDataLibrary => referenceDataLibrary.DefinedCategory }, { "Definition", referenceDataLibrary => referenceDataLibrary.Definition }, @@ -73,6 +74,7 @@ public partial class ReferenceDataLibraryMetaInfo : IReferenceDataLibraryMetaInf private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'ReferenceDataLibrary' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'ReferenceDataLibrary' is mandatory and cannot be null.") }, { "BaseQuantityKind", new DtoValidationHelper(item => item.BaseQuantityKind != null, "The 'BaseQuantityKind' property of a 'ReferenceDataLibrary' is mandatory and cannot be null.") }, { "BaseUnit", new DtoValidationHelper(item => item.BaseUnit != null, "The 'BaseUnit' property of a 'ReferenceDataLibrary' is mandatory and cannot be null.") }, { "Constant", new DtoValidationHelper(item => item.Constant != null, "The 'Constant' property of a 'ReferenceDataLibrary' is mandatory and cannot be null.") }, @@ -227,6 +229,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing re private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Constant", new PropertyMetaInfo("Constant", "Constant", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DefinedCategory", new PropertyMetaInfo("DefinedCategory", "Category", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -266,6 +269,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "BaseQuantityKind", thing => thing.BaseQuantityKind }, { "BaseUnit", thing => thing.BaseUnit }, { "ClassKind", thing => thing.ClassKind }, @@ -320,6 +324,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "BaseQuantityKind", (value) => (Guid)value }, { "BaseUnit", (value) => (Guid)value }, { "Constant", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/ReferenceSourceMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ReferenceSourceMetaInfo.cs index f7cdf1283..fb8997df2 100644 --- a/CDP4Common/AutoGenMetaInfo/ReferenceSourceMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ReferenceSourceMetaInfo.cs @@ -48,6 +48,7 @@ public partial class ReferenceSourceMetaInfo : IReferenceSourceMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", referenceSource => referenceSource.Alias }, + { "Attachment", referenceSource => referenceSource.Attachment }, { "Definition", referenceSource => referenceSource.Definition }, { "HyperLink", referenceSource => referenceSource.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class ReferenceSourceMetaInfo : IReferenceSourceMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'ReferenceSource' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'ReferenceSource' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'ReferenceSource' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'ReferenceSource' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'ReferenceSource' is mandatory and cannot be null.") }, @@ -206,6 +208,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing re private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -235,6 +238,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Author", thing => thing.Author }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, @@ -291,6 +295,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/ReferencerRuleMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ReferencerRuleMetaInfo.cs index 3cb2d15a3..55897b838 100644 --- a/CDP4Common/AutoGenMetaInfo/ReferencerRuleMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ReferencerRuleMetaInfo.cs @@ -48,6 +48,7 @@ public partial class ReferencerRuleMetaInfo : IReferencerRuleMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", referencerRule => referencerRule.Alias }, + { "Attachment", referencerRule => referencerRule.Attachment }, { "Definition", referencerRule => referencerRule.Definition }, { "HyperLink", referencerRule => referencerRule.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class ReferencerRuleMetaInfo : IReferencerRuleMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'ReferencerRule' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'ReferencerRule' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'ReferencerRule' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'ReferencerRule' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'ReferencerRule' is mandatory and cannot be null.") }, @@ -206,6 +208,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing re private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -235,6 +238,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -283,6 +287,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/RequirementMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/RequirementMetaInfo.cs index 37a295f37..4af228588 100644 --- a/CDP4Common/AutoGenMetaInfo/RequirementMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/RequirementMetaInfo.cs @@ -48,6 +48,7 @@ public partial class RequirementMetaInfo : IRequirementMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", requirement => requirement.Alias }, + { "Attachment", requirement => requirement.Attachment }, { "Definition", requirement => requirement.Definition }, { "HyperLink", requirement => requirement.HyperLink }, { "ParameterValue", requirement => requirement.ParameterValue }, @@ -68,6 +69,7 @@ public partial class RequirementMetaInfo : IRequirementMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'Requirement' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'Requirement' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'Requirement' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'Requirement' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'Requirement' is mandatory and cannot be null.") }, @@ -213,6 +215,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing re private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "ParameterValue", new PropertyMetaInfo("ParameterValue", "SimpleParameterValue", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -244,6 +247,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -292,6 +296,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/RequirementsContainerMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/RequirementsContainerMetaInfo.cs index 071060bf0..874f1d20b 100644 --- a/CDP4Common/AutoGenMetaInfo/RequirementsContainerMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/RequirementsContainerMetaInfo.cs @@ -48,6 +48,7 @@ public partial class RequirementsContainerMetaInfo : IRequirementsContainerMetaI private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", requirementsContainer => requirementsContainer.Alias }, + { "Attachment", requirementsContainer => requirementsContainer.Attachment }, { "Definition", requirementsContainer => requirementsContainer.Definition }, { "Group", requirementsContainer => requirementsContainer.Group }, { "HyperLink", requirementsContainer => requirementsContainer.HyperLink }, @@ -65,6 +66,7 @@ public partial class RequirementsContainerMetaInfo : IRequirementsContainerMetaI private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'RequirementsContainer' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'RequirementsContainer' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'RequirementsContainer' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'RequirementsContainer' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'RequirementsContainer' is mandatory and cannot be null.") }, @@ -212,6 +214,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing re private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Group", new PropertyMetaInfo("Group", "RequirementsGroup", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -243,6 +246,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -287,6 +291,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/RequirementsGroupMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/RequirementsGroupMetaInfo.cs index c138e6304..f94f89821 100644 --- a/CDP4Common/AutoGenMetaInfo/RequirementsGroupMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/RequirementsGroupMetaInfo.cs @@ -48,6 +48,7 @@ public partial class RequirementsGroupMetaInfo : IRequirementsGroupMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", requirementsGroup => requirementsGroup.Alias }, + { "Attachment", requirementsGroup => requirementsGroup.Attachment }, { "Definition", requirementsGroup => requirementsGroup.Definition }, { "Group", requirementsGroup => requirementsGroup.Group }, { "HyperLink", requirementsGroup => requirementsGroup.HyperLink }, @@ -65,6 +66,7 @@ public partial class RequirementsGroupMetaInfo : IRequirementsGroupMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'RequirementsGroup' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'RequirementsGroup' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'RequirementsGroup' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'RequirementsGroup' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'RequirementsGroup' is mandatory and cannot be null.") }, @@ -212,6 +214,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing re private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Group", new PropertyMetaInfo("Group", "RequirementsGroup", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -243,6 +246,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -287,6 +291,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/RequirementsSpecificationMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/RequirementsSpecificationMetaInfo.cs index cf13a0fea..5e846a2f8 100644 --- a/CDP4Common/AutoGenMetaInfo/RequirementsSpecificationMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/RequirementsSpecificationMetaInfo.cs @@ -48,6 +48,7 @@ public partial class RequirementsSpecificationMetaInfo : IRequirementsSpecificat private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", requirementsSpecification => requirementsSpecification.Alias }, + { "Attachment", requirementsSpecification => requirementsSpecification.Attachment }, { "Definition", requirementsSpecification => requirementsSpecification.Definition }, { "Group", requirementsSpecification => requirementsSpecification.Group }, { "HyperLink", requirementsSpecification => requirementsSpecification.HyperLink }, @@ -66,6 +67,7 @@ public partial class RequirementsSpecificationMetaInfo : IRequirementsSpecificat private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'RequirementsSpecification' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'RequirementsSpecification' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'RequirementsSpecification' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'RequirementsSpecification' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'RequirementsSpecification' is mandatory and cannot be null.") }, @@ -214,6 +216,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing re private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Group", new PropertyMetaInfo("Group", "RequirementsGroup", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -246,6 +249,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -293,6 +297,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/RuleMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/RuleMetaInfo.cs index 37b9ea61d..ae520ccf1 100644 --- a/CDP4Common/AutoGenMetaInfo/RuleMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/RuleMetaInfo.cs @@ -48,6 +48,7 @@ public partial class RuleMetaInfo : IRuleMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", rule => rule.Alias }, + { "Attachment", rule => rule.Attachment }, { "Definition", rule => rule.Definition }, { "HyperLink", rule => rule.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class RuleMetaInfo : IRuleMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'Rule' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'Rule' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'Rule' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'Rule' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'Rule' is mandatory and cannot be null.") }, @@ -205,6 +207,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing ru private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -234,6 +237,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -274,6 +278,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/RuleVerificationListMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/RuleVerificationListMetaInfo.cs index f24beacfd..c8bbf1ace 100644 --- a/CDP4Common/AutoGenMetaInfo/RuleVerificationListMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/RuleVerificationListMetaInfo.cs @@ -48,6 +48,7 @@ public partial class RuleVerificationListMetaInfo : IRuleVerificationListMetaInf private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", ruleVerificationList => ruleVerificationList.Alias }, + { "Attachment", ruleVerificationList => ruleVerificationList.Attachment }, { "Definition", ruleVerificationList => ruleVerificationList.Definition }, { "HyperLink", ruleVerificationList => ruleVerificationList.HyperLink }, { "RuleVerification", ruleVerificationList => ruleVerificationList.RuleVerification.ToIdList() }, @@ -67,6 +68,7 @@ public partial class RuleVerificationListMetaInfo : IRuleVerificationListMetaInf private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'RuleVerificationList' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'RuleVerificationList' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'RuleVerificationList' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'RuleVerificationList' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'RuleVerificationList' is mandatory and cannot be null.") }, @@ -210,6 +212,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing ru private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "RuleVerification", new PropertyMetaInfo("RuleVerification", "RuleVerification", PropertyKind.OrderedList, AggregationKind.Composite, false, true, true, 0, "*", true) }, @@ -240,6 +243,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -281,6 +285,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/SampledFunctionParameterTypeMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/SampledFunctionParameterTypeMetaInfo.cs index c3366f3de..1e783fafb 100644 --- a/CDP4Common/AutoGenMetaInfo/SampledFunctionParameterTypeMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/SampledFunctionParameterTypeMetaInfo.cs @@ -48,6 +48,7 @@ public partial class SampledFunctionParameterTypeMetaInfo : ISampledFunctionPara private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", sampledFunctionParameterType => sampledFunctionParameterType.Alias }, + { "Attachment", sampledFunctionParameterType => sampledFunctionParameterType.Attachment }, { "Definition", sampledFunctionParameterType => sampledFunctionParameterType.Definition }, { "DependentParameterType", sampledFunctionParameterType => sampledFunctionParameterType.DependentParameterType.ToIdList() }, { "HyperLink", sampledFunctionParameterType => sampledFunctionParameterType.HyperLink }, @@ -69,6 +70,7 @@ public partial class SampledFunctionParameterTypeMetaInfo : ISampledFunctionPara private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'SampledFunctionParameterType' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'SampledFunctionParameterType' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'SampledFunctionParameterType' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'SampledFunctionParameterType' is mandatory and cannot be null.") }, { "DependentParameterType", new DtoValidationHelper(item => item.DependentParameterType != null && item.DependentParameterType.Any(), "The 'DependentParameterType' property of a 'SampledFunctionParameterType' is mandatory and must have at least one entry.") }, @@ -216,6 +218,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing sa private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DependentParameterType", new PropertyMetaInfo("DependentParameterType", "DependentParameterTypeAssignment", PropertyKind.OrderedList, AggregationKind.Composite, false, true, true, 1, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -247,6 +250,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -298,6 +302,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "DependentParameterType", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/ScalarParameterTypeMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ScalarParameterTypeMetaInfo.cs index 20535fe0c..2c018c39d 100644 --- a/CDP4Common/AutoGenMetaInfo/ScalarParameterTypeMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ScalarParameterTypeMetaInfo.cs @@ -48,6 +48,7 @@ public partial class ScalarParameterTypeMetaInfo : IScalarParameterTypeMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", scalarParameterType => scalarParameterType.Alias }, + { "Attachment", scalarParameterType => scalarParameterType.Attachment }, { "Definition", scalarParameterType => scalarParameterType.Definition }, { "HyperLink", scalarParameterType => scalarParameterType.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class ScalarParameterTypeMetaInfo : IScalarParameterTypeMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'ScalarParameterType' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'ScalarParameterType' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'ScalarParameterType' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'ScalarParameterType' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'ScalarParameterType' is mandatory and cannot be null.") }, @@ -207,6 +209,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing sc private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -236,6 +239,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -281,6 +285,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/ScaleValueDefinitionMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ScaleValueDefinitionMetaInfo.cs index 34e2b6bc7..ca3f54769 100644 --- a/CDP4Common/AutoGenMetaInfo/ScaleValueDefinitionMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ScaleValueDefinitionMetaInfo.cs @@ -48,6 +48,7 @@ public partial class ScaleValueDefinitionMetaInfo : IScaleValueDefinitionMetaInf private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", scaleValueDefinition => scaleValueDefinition.Alias }, + { "Attachment", scaleValueDefinition => scaleValueDefinition.Attachment }, { "Definition", scaleValueDefinition => scaleValueDefinition.Definition }, { "HyperLink", scaleValueDefinition => scaleValueDefinition.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class ScaleValueDefinitionMetaInfo : IScaleValueDefinitionMetaInf private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'ScaleValueDefinition' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'ScaleValueDefinition' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'ScaleValueDefinition' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'ScaleValueDefinition' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'ScaleValueDefinition' is mandatory and cannot be null.") }, @@ -206,6 +208,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing sc private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -235,6 +238,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -275,6 +279,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/SimpleParameterizableThingMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/SimpleParameterizableThingMetaInfo.cs index 8f5c696ed..024ff05dc 100644 --- a/CDP4Common/AutoGenMetaInfo/SimpleParameterizableThingMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/SimpleParameterizableThingMetaInfo.cs @@ -48,6 +48,7 @@ public partial class SimpleParameterizableThingMetaInfo : ISimpleParameterizable private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", simpleParameterizableThing => simpleParameterizableThing.Alias }, + { "Attachment", simpleParameterizableThing => simpleParameterizableThing.Attachment }, { "Definition", simpleParameterizableThing => simpleParameterizableThing.Definition }, { "HyperLink", simpleParameterizableThing => simpleParameterizableThing.HyperLink }, { "ParameterValue", simpleParameterizableThing => simpleParameterizableThing.ParameterValue }, @@ -64,6 +65,7 @@ public partial class SimpleParameterizableThingMetaInfo : ISimpleParameterizable private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'SimpleParameterizableThing' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'SimpleParameterizableThing' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'SimpleParameterizableThing' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'SimpleParameterizableThing' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'SimpleParameterizableThing' is mandatory and cannot be null.") }, @@ -207,6 +209,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing si private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "ParameterValue", new PropertyMetaInfo("ParameterValue", "SimpleParameterValue", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -237,6 +240,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -278,6 +282,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/SimpleQuantityKindMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/SimpleQuantityKindMetaInfo.cs index 2567eb184..9882cad40 100644 --- a/CDP4Common/AutoGenMetaInfo/SimpleQuantityKindMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/SimpleQuantityKindMetaInfo.cs @@ -48,6 +48,7 @@ public partial class SimpleQuantityKindMetaInfo : ISimpleQuantityKindMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", simpleQuantityKind => simpleQuantityKind.Alias }, + { "Attachment", simpleQuantityKind => simpleQuantityKind.Attachment }, { "Definition", simpleQuantityKind => simpleQuantityKind.Definition }, { "HyperLink", simpleQuantityKind => simpleQuantityKind.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class SimpleQuantityKindMetaInfo : ISimpleQuantityKindMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'SimpleQuantityKind' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'SimpleQuantityKind' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'SimpleQuantityKind' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'SimpleQuantityKind' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'SimpleQuantityKind' is mandatory and cannot be null.") }, @@ -208,6 +210,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing si private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -237,6 +240,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "DefaultScale", thing => thing.DefaultScale }, @@ -291,6 +295,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/SimpleUnitMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/SimpleUnitMetaInfo.cs index 0eb5ea774..bb3d54f2b 100644 --- a/CDP4Common/AutoGenMetaInfo/SimpleUnitMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/SimpleUnitMetaInfo.cs @@ -48,6 +48,7 @@ public partial class SimpleUnitMetaInfo : ISimpleUnitMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", simpleUnit => simpleUnit.Alias }, + { "Attachment", simpleUnit => simpleUnit.Attachment }, { "Definition", simpleUnit => simpleUnit.Definition }, { "HyperLink", simpleUnit => simpleUnit.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class SimpleUnitMetaInfo : ISimpleUnitMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'SimpleUnit' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'SimpleUnit' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'SimpleUnit' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'SimpleUnit' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'SimpleUnit' is mandatory and cannot be null.") }, @@ -205,6 +207,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing si private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -234,6 +237,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -274,6 +278,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/SiteReferenceDataLibraryMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/SiteReferenceDataLibraryMetaInfo.cs index 33f13f3e5..1eb446030 100644 --- a/CDP4Common/AutoGenMetaInfo/SiteReferenceDataLibraryMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/SiteReferenceDataLibraryMetaInfo.cs @@ -48,6 +48,7 @@ public partial class SiteReferenceDataLibraryMetaInfo : ISiteReferenceDataLibrar private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", siteReferenceDataLibrary => siteReferenceDataLibrary.Alias }, + { "Attachment", siteReferenceDataLibrary => siteReferenceDataLibrary.Attachment }, { "Constant", siteReferenceDataLibrary => siteReferenceDataLibrary.Constant }, { "DefinedCategory", siteReferenceDataLibrary => siteReferenceDataLibrary.DefinedCategory }, { "Definition", siteReferenceDataLibrary => siteReferenceDataLibrary.Definition }, @@ -73,6 +74,7 @@ public partial class SiteReferenceDataLibraryMetaInfo : ISiteReferenceDataLibrar private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'SiteReferenceDataLibrary' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'SiteReferenceDataLibrary' is mandatory and cannot be null.") }, { "BaseQuantityKind", new DtoValidationHelper(item => item.BaseQuantityKind != null, "The 'BaseQuantityKind' property of a 'SiteReferenceDataLibrary' is mandatory and cannot be null.") }, { "BaseUnit", new DtoValidationHelper(item => item.BaseUnit != null, "The 'BaseUnit' property of a 'SiteReferenceDataLibrary' is mandatory and cannot be null.") }, { "Constant", new DtoValidationHelper(item => item.Constant != null, "The 'Constant' property of a 'SiteReferenceDataLibrary' is mandatory and cannot be null.") }, @@ -227,6 +229,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing si private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Constant", new PropertyMetaInfo("Constant", "Constant", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "DefinedCategory", new PropertyMetaInfo("DefinedCategory", "Category", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, @@ -266,6 +269,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "BaseQuantityKind", thing => thing.BaseQuantityKind }, { "BaseUnit", thing => thing.BaseUnit }, { "ClassKind", thing => thing.ClassKind }, @@ -322,6 +326,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "BaseQuantityKind", (value) => (Guid)value }, { "BaseUnit", (value) => (Guid)value }, { "Constant", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/SpecializedQuantityKindMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/SpecializedQuantityKindMetaInfo.cs index 2a6544f5c..0ae433297 100644 --- a/CDP4Common/AutoGenMetaInfo/SpecializedQuantityKindMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/SpecializedQuantityKindMetaInfo.cs @@ -48,6 +48,7 @@ public partial class SpecializedQuantityKindMetaInfo : ISpecializedQuantityKindM private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", specializedQuantityKind => specializedQuantityKind.Alias }, + { "Attachment", specializedQuantityKind => specializedQuantityKind.Attachment }, { "Definition", specializedQuantityKind => specializedQuantityKind.Definition }, { "HyperLink", specializedQuantityKind => specializedQuantityKind.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class SpecializedQuantityKindMetaInfo : ISpecializedQuantityKindM private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'SpecializedQuantityKind' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'SpecializedQuantityKind' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'SpecializedQuantityKind' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'SpecializedQuantityKind' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'SpecializedQuantityKind' is mandatory and cannot be null.") }, @@ -208,6 +210,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing sp private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -237,6 +240,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "DefaultScale", thing => thing.DefaultScale }, @@ -293,6 +297,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/StakeHolderValueMapMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/StakeHolderValueMapMetaInfo.cs index c22d24b76..5dcd9a039 100644 --- a/CDP4Common/AutoGenMetaInfo/StakeHolderValueMapMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/StakeHolderValueMapMetaInfo.cs @@ -48,6 +48,7 @@ public partial class StakeHolderValueMapMetaInfo : IStakeHolderValueMapMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", stakeHolderValueMap => stakeHolderValueMap.Alias }, + { "Attachment", stakeHolderValueMap => stakeHolderValueMap.Attachment }, { "Definition", stakeHolderValueMap => stakeHolderValueMap.Definition }, { "HyperLink", stakeHolderValueMap => stakeHolderValueMap.HyperLink }, { "Settings", stakeHolderValueMap => stakeHolderValueMap.Settings }, @@ -64,6 +65,7 @@ public partial class StakeHolderValueMapMetaInfo : IStakeHolderValueMapMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'StakeHolderValueMap' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'StakeHolderValueMap' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'StakeHolderValueMap' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'StakeHolderValueMap' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'StakeHolderValueMap' is mandatory and cannot be null.") }, @@ -212,6 +214,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing st private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Settings", new PropertyMetaInfo("Settings", "StakeHolderValueMapSettings", PropertyKind.List, AggregationKind.Composite, false, false, true, 1, "1", true) }, @@ -242,6 +245,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -291,6 +295,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/StakeholderMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/StakeholderMetaInfo.cs index 6432c7e54..227d40576 100644 --- a/CDP4Common/AutoGenMetaInfo/StakeholderMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/StakeholderMetaInfo.cs @@ -48,6 +48,7 @@ public partial class StakeholderMetaInfo : IStakeholderMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", stakeholder => stakeholder.Alias }, + { "Attachment", stakeholder => stakeholder.Attachment }, { "Definition", stakeholder => stakeholder.Definition }, { "HyperLink", stakeholder => stakeholder.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class StakeholderMetaInfo : IStakeholderMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'Stakeholder' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'Stakeholder' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'Stakeholder' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'Stakeholder' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'Stakeholder' is mandatory and cannot be null.") }, @@ -207,6 +209,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing st private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -236,6 +239,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -278,6 +282,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/StakeholderValueMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/StakeholderValueMetaInfo.cs index 712cb1143..5db380b41 100644 --- a/CDP4Common/AutoGenMetaInfo/StakeholderValueMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/StakeholderValueMetaInfo.cs @@ -48,6 +48,7 @@ public partial class StakeholderValueMetaInfo : IStakeholderValueMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", stakeholderValue => stakeholderValue.Alias }, + { "Attachment", stakeholderValue => stakeholderValue.Attachment }, { "Definition", stakeholderValue => stakeholderValue.Definition }, { "HyperLink", stakeholderValue => stakeholderValue.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class StakeholderValueMetaInfo : IStakeholderValueMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'StakeholderValue' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'StakeholderValue' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'StakeholderValue' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'StakeholderValue' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'StakeholderValue' is mandatory and cannot be null.") }, @@ -206,6 +208,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing st private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -235,6 +238,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -275,6 +279,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/TermMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/TermMetaInfo.cs index 3bc01106c..13b8b76ea 100644 --- a/CDP4Common/AutoGenMetaInfo/TermMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/TermMetaInfo.cs @@ -48,6 +48,7 @@ public partial class TermMetaInfo : ITermMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", term => term.Alias }, + { "Attachment", term => term.Attachment }, { "Definition", term => term.Definition }, { "HyperLink", term => term.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class TermMetaInfo : ITermMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'Term' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'Term' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'Term' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'Term' is mandatory and cannot be null.") }, { "ExcludedPerson", new DtoValidationHelper(item => item.ExcludedPerson != null, "The 'ExcludedPerson' property of a 'Term' is mandatory and cannot be null.") }, @@ -205,6 +207,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing te private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -234,6 +237,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, { "ExcludedDomain", thing => thing.ExcludedDomain }, @@ -274,6 +278,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/TextParameterTypeMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/TextParameterTypeMetaInfo.cs index 48b451795..d2961391f 100644 --- a/CDP4Common/AutoGenMetaInfo/TextParameterTypeMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/TextParameterTypeMetaInfo.cs @@ -48,6 +48,7 @@ public partial class TextParameterTypeMetaInfo : ITextParameterTypeMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", textParameterType => textParameterType.Alias }, + { "Attachment", textParameterType => textParameterType.Attachment }, { "Definition", textParameterType => textParameterType.Definition }, { "HyperLink", textParameterType => textParameterType.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class TextParameterTypeMetaInfo : ITextParameterTypeMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'TextParameterType' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'TextParameterType' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'TextParameterType' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'TextParameterType' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'TextParameterType' is mandatory and cannot be null.") }, @@ -207,6 +209,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing te private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -236,6 +239,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -281,6 +285,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/TimeOfDayParameterTypeMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/TimeOfDayParameterTypeMetaInfo.cs index ee49be82e..d6ef627ee 100644 --- a/CDP4Common/AutoGenMetaInfo/TimeOfDayParameterTypeMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/TimeOfDayParameterTypeMetaInfo.cs @@ -48,6 +48,7 @@ public partial class TimeOfDayParameterTypeMetaInfo : ITimeOfDayParameterTypeMet private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", timeOfDayParameterType => timeOfDayParameterType.Alias }, + { "Attachment", timeOfDayParameterType => timeOfDayParameterType.Attachment }, { "Definition", timeOfDayParameterType => timeOfDayParameterType.Definition }, { "HyperLink", timeOfDayParameterType => timeOfDayParameterType.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class TimeOfDayParameterTypeMetaInfo : ITimeOfDayParameterTypeMet private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'TimeOfDayParameterType' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'TimeOfDayParameterType' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'TimeOfDayParameterType' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'TimeOfDayParameterType' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'TimeOfDayParameterType' is mandatory and cannot be null.") }, @@ -207,6 +209,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing ti private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -236,6 +239,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -281,6 +285,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/UnitPrefixMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/UnitPrefixMetaInfo.cs index 119fa7ebe..5fb2377af 100644 --- a/CDP4Common/AutoGenMetaInfo/UnitPrefixMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/UnitPrefixMetaInfo.cs @@ -48,6 +48,7 @@ public partial class UnitPrefixMetaInfo : IUnitPrefixMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", unitPrefix => unitPrefix.Alias }, + { "Attachment", unitPrefix => unitPrefix.Attachment }, { "Definition", unitPrefix => unitPrefix.Definition }, { "HyperLink", unitPrefix => unitPrefix.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class UnitPrefixMetaInfo : IUnitPrefixMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'UnitPrefix' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'UnitPrefix' is mandatory and cannot be null.") }, { "ConversionFactor", new DtoValidationHelper(item => !string.IsNullOrWhiteSpace(item.ConversionFactor), "The 'ConversionFactor' property of a 'UnitPrefix' is mandatory and cannot be empty or null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'UnitPrefix' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'UnitPrefix' is mandatory and cannot be null.") }, @@ -206,6 +208,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing un private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -235,6 +238,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "ClassKind", thing => thing.ClassKind }, { "ConversionFactor", thing => thing.ConversionFactor }, { "Definition", thing => thing.Definition }, @@ -277,6 +281,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, { "ExcludedPerson", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenMetaInfo/ValueGroupMetaInfo.cs b/CDP4Common/AutoGenMetaInfo/ValueGroupMetaInfo.cs index 2f12f3273..d8ad78937 100644 --- a/CDP4Common/AutoGenMetaInfo/ValueGroupMetaInfo.cs +++ b/CDP4Common/AutoGenMetaInfo/ValueGroupMetaInfo.cs @@ -48,6 +48,7 @@ public partial class ValueGroupMetaInfo : IValueGroupMetaInfo private readonly Dictionary>> containmentPropertyValueMap = new Dictionary>> { { "Alias", valueGroup => valueGroup.Alias }, + { "Attachment", valueGroup => valueGroup.Attachment }, { "Definition", valueGroup => valueGroup.Definition }, { "HyperLink", valueGroup => valueGroup.HyperLink }, }; @@ -63,6 +64,7 @@ public partial class ValueGroupMetaInfo : IValueGroupMetaInfo private readonly Dictionary> validationRules = new Dictionary> { { "Alias", new DtoValidationHelper(item => item.Alias != null, "The 'Alias' property of a 'ValueGroup' is mandatory and cannot be null.") }, + { "Attachment", new DtoValidationHelper(item => item.Attachment != null, "The 'Attachment' property of a 'ValueGroup' is mandatory and cannot be null.") }, { "Category", new DtoValidationHelper(item => item.Category != null, "The 'Category' property of a 'ValueGroup' is mandatory and cannot be null.") }, { "Definition", new DtoValidationHelper(item => item.Definition != null, "The 'Definition' property of a 'ValueGroup' is mandatory and cannot be null.") }, { "ExcludedDomain", new DtoValidationHelper(item => item.ExcludedDomain != null, "The 'ExcludedDomain' property of a 'ValueGroup' is mandatory and cannot be null.") }, @@ -206,6 +208,7 @@ public IEnumerable GetOrderedContainmentIds(CDP4Common.DTO.Thing va private readonly Dictionary containmentTypeMap = new Dictionary { { "Alias", new PropertyMetaInfo("Alias", "Alias", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, + { "Attachment", new PropertyMetaInfo("Attachment", "Attachment", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "Definition", new PropertyMetaInfo("Definition", "Definition", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, { "HyperLink", new PropertyMetaInfo("HyperLink", "HyperLink", PropertyKind.List, AggregationKind.Composite, false, false, true, 0, "*", true) }, }; @@ -235,6 +238,7 @@ public IEnumerable Properties private readonly Dictionary> propertyValueMap = new Dictionary> { { "Alias", thing => thing.Alias }, + { "Attachment", thing => thing.Attachment }, { "Category", thing => thing.Category }, { "ClassKind", thing => thing.ClassKind }, { "Definition", thing => thing.Definition }, @@ -275,6 +279,7 @@ public IEnumerable Properties private readonly Dictionary> collectionPropertyValueDeserializationMap = new Dictionary> { { "Alias", (value) => (Guid)value }, + { "Attachment", (value) => (Guid)value }, { "Category", (value) => (Guid)value }, { "Definition", (value) => (Guid)value }, { "ExcludedDomain", (value) => (Guid)value }, diff --git a/CDP4Common/AutoGenPoco/ArchitectureDiagram.cs b/CDP4Common/AutoGenPoco/ArchitectureDiagram.cs new file mode 100644 index 000000000..63139b02a --- /dev/null +++ b/CDP4Common/AutoGenPoco/ArchitectureDiagram.cs @@ -0,0 +1,251 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.DiagramData +{ + using System; + using System.Collections; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.ComponentModel; + using System.Linq; + using System.Runtime.Serialization; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.Helpers; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + + /// + /// Represents a complete Architecture Diagram that contains visual elements for ElementDefinitions, ElementUsages, Requirements and Relationships. + /// + [CDPVersion("1.3.0")] + [Container(typeof(Iteration), "DiagramCanvas")] + public sealed partial class ArchitectureDiagram : DiagramCanvas, IOwnedThing + { + /// + /// Representation of the default value for the accessRight property of a PersonPermission for the affected class + /// + public new const PersonAccessRightKind DefaultPersonAccess = PersonAccessRightKind.NOT_APPLICABLE; + + /// + /// Representation of the default value for the accessRight property of a PersonPermission for the affected class + /// + public new const ParticipantAccessRightKind DefaultParticipantAccess = ParticipantAccessRightKind.NONE; + + /// + /// Initializes a new instance of the class. + /// + public ArchitectureDiagram() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier. + /// + /// + /// The where the current thing is stored. + /// The is the key used to store this thing. + /// The key is a combination of this thing's identifier and the identifier of its container if applicable or null. + /// + /// + /// The of this thing + /// + public ArchitectureDiagram(Guid iid, ConcurrentDictionary> cache, Uri iDalUri) : base(iid, cache, iDalUri) + { + } + + /// + /// Gets or sets the Owner. + /// + /// + /// reference to a DomainOfExpertise that is the owner of this OwnedThing + /// Note: Ownership in this data model implies the responsibility for the presence and content of this OwnedThing. The owner is always a DomainOfExpertise. The Participant or Participants representing an owner DomainOfExpertise are thus responsible for (i.e. take ownership of) a coherent set of concerns in a concurrent engineering activity. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + public DomainOfExpertise Owner { get; set; } + + /// + /// Gets or sets the TopArchitectureElement. + /// + /// + /// The top ArchitectureElement that serves as the top Element of the architecture. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + public ArchitectureElement TopArchitectureElement { get; set; } + + /// + /// Queries the referenced s of the current + /// + /// + /// This does not include the contained s, the contained s + /// are exposed via the property + /// + /// + /// An + /// + public override IEnumerable QueryReferencedThings() + { + foreach (var thing in base.QueryReferencedThings()) + { + yield return thing; + } + + if (this.Owner != null) + { + yield return this.Owner; + } + + if (this.TopArchitectureElement != null) + { + yield return this.TopArchitectureElement; + } + } + + /// + /// Creates and returns a copy of this for edit purpose. + /// + /// A value that indicates whether the contained s should be cloned or not. + /// + /// A cloned instance of . + /// + protected override Thing GenericClone(bool cloneContainedThings) + { + var clone = (ArchitectureDiagram)this.MemberwiseClone(); + clone.Bounds = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Bounds, clone); + clone.DiagramElement = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.DiagramElement, clone); + clone.ExcludedDomain = new List(this.ExcludedDomain); + clone.ExcludedPerson = new List(this.ExcludedPerson); + + if (cloneContainedThings) + { + clone.Bounds.AddRange(this.Bounds.Select(x => x.Clone(true))); + clone.DiagramElement.AddRange(this.DiagramElement.Select(x => x.Clone(true))); + } + + clone.Original = this; + clone.ResetCacheId(); + return clone; + } + + /// + /// Creates and returns a copy of this for edit purpose. + /// + /// A value that indicates whether the contained s should be cloned or not. + /// + /// A cloned instance of . + /// + public new ArchitectureDiagram Clone(bool cloneContainedThings) + { + this.ChangeKind = ChangeKind.Update; + return (ArchitectureDiagram)this.GenericClone(cloneContainedThings); + } + + /// + /// Validates the cardinalities of the properties of this . + /// + /// + /// A list of potential errors. + /// + protected override IEnumerable ValidatePocoCardinality() + { + var errorList = new List(base.ValidatePocoCardinality()); + + if (this.Owner == null || this.Owner.Iid == Guid.Empty) + { + errorList.Add("The property Owner is null."); + this.Owner = SentinelThingProvider.GetSentinel(); + this.sentinelResetMap["Owner"] = () => this.Owner = null; + } + + return errorList; + } + + /// + /// Resolve the properties of the current from its counter-part + /// + /// The source + internal override void ResolveProperties(DTO.Thing dtoThing) + { + if (dtoThing == null) + { + throw new ArgumentNullException("dtoThing"); + } + + var dto = dtoThing as DTO.ArchitectureDiagram; + if (dto == null) + { + throw new InvalidOperationException(string.Format("The DTO type {0} does not match the type of the current ArchitectureDiagram POCO.", dtoThing.GetType())); + } + + this.Bounds.ResolveList(dto.Bounds, dto.IterationContainerId, this.Cache); + this.CreatedOn = dto.CreatedOn; + this.Description = dto.Description; + this.DiagramElement.ResolveList(dto.DiagramElement, dto.IterationContainerId, this.Cache); + this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); + this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); + this.ModifiedOn = dto.ModifiedOn; + this.Name = dto.Name; + this.Owner = this.Cache.Get(dto.Owner, dto.IterationContainerId) ?? SentinelThingProvider.GetSentinel(); + this.PublicationState = dto.PublicationState; + this.RevisionNumber = dto.RevisionNumber; + this.ThingPreference = dto.ThingPreference; + this.TopArchitectureElement = (dto.TopArchitectureElement.HasValue) ? this.Cache.Get(dto.TopArchitectureElement.Value, dto.IterationContainerId) : null; + + this.ResolveExtraProperties(); + } + + /// + /// Generates a from the current + /// + public override DTO.Thing ToDto() + { + var dto = new DTO.ArchitectureDiagram(this.Iid, this.RevisionNumber); + + dto.Bounds.AddRange(this.Bounds.Select(x => x.Iid)); + dto.CreatedOn = this.CreatedOn; + dto.Description = this.Description; + dto.DiagramElement.AddRange(this.DiagramElement.Select(x => x.Iid)); + dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); + dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); + dto.ModifiedOn = this.ModifiedOn; + dto.Name = this.Name; + dto.Owner = this.Owner != null ? this.Owner.Iid : Guid.Empty; + dto.PublicationState = this.PublicationState; + dto.RevisionNumber = this.RevisionNumber; + dto.ThingPreference = this.ThingPreference; + dto.TopArchitectureElement = this.TopArchitectureElement != null ? (Guid?)this.TopArchitectureElement.Iid : null; + + dto.IterationContainerId = this.CacheKey.Iteration; + dto.RegisterSourceThing(this); + this.BuildDtoPartialRoutes(dto); + return dto; + } + } +} diff --git a/CDP4Common/AutoGenPoco/ArchitectureElement.cs b/CDP4Common/AutoGenPoco/ArchitectureElement.cs new file mode 100644 index 000000000..941eb5706 --- /dev/null +++ b/CDP4Common/AutoGenPoco/ArchitectureElement.cs @@ -0,0 +1,199 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.DiagramData +{ + using System; + using System.Collections; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.ComponentModel; + using System.Linq; + using System.Runtime.Serialization; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.Helpers; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + + /// + /// ArchitectureElement is a graphical representation of an ElementDefinition, or ElementUsage in the context of an ArchitecturalDiagram. + /// + [CDPVersion("1.3.0")] + [Container(typeof(DiagramElementContainer), "DiagramElement")] + public sealed partial class ArchitectureElement : DiagramObject + { + /// + /// Representation of the default value for the accessRight property of a PersonPermission for the affected class + /// + public new const PersonAccessRightKind DefaultPersonAccess = PersonAccessRightKind.NOT_APPLICABLE; + + /// + /// Representation of the default value for the accessRight property of a PersonPermission for the affected class + /// + public new const ParticipantAccessRightKind DefaultParticipantAccess = ParticipantAccessRightKind.SAME_AS_SUPERCLASS; + + /// + /// Initializes a new instance of the class. + /// + public ArchitectureElement() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier. + /// + /// + /// The where the current thing is stored. + /// The is the key used to store this thing. + /// The key is a combination of this thing's identifier and the identifier of its container if applicable or null. + /// + /// + /// The of this thing + /// + public ArchitectureElement(Guid iid, ConcurrentDictionary> cache, Uri iDalUri) : base(iid, cache, iDalUri) + { + } + + /// + /// Creates and returns a copy of this for edit purpose. + /// + /// A value that indicates whether the contained s should be cloned or not. + /// + /// A cloned instance of . + /// + protected override Thing GenericClone(bool cloneContainedThings) + { + var clone = (ArchitectureElement)this.MemberwiseClone(); + clone.Bounds = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Bounds, clone); + clone.DiagramElement = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.DiagramElement, clone); + clone.ExcludedDomain = new List(this.ExcludedDomain); + clone.ExcludedPerson = new List(this.ExcludedPerson); + clone.LocalStyle = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.LocalStyle, clone); + + if (cloneContainedThings) + { + clone.Bounds.AddRange(this.Bounds.Select(x => x.Clone(true))); + clone.DiagramElement.AddRange(this.DiagramElement.Select(x => x.Clone(true))); + clone.LocalStyle.AddRange(this.LocalStyle.Select(x => x.Clone(true))); + } + + clone.Original = this; + clone.ResetCacheId(); + return clone; + } + + /// + /// Creates and returns a copy of this for edit purpose. + /// + /// A value that indicates whether the contained s should be cloned or not. + /// + /// A cloned instance of . + /// + public new ArchitectureElement Clone(bool cloneContainedThings) + { + this.ChangeKind = ChangeKind.Update; + return (ArchitectureElement)this.GenericClone(cloneContainedThings); + } + + /// + /// Validates the cardinalities of the properties of this . + /// + /// + /// A list of potential errors. + /// + protected override IEnumerable ValidatePocoCardinality() + { + var errorList = new List(base.ValidatePocoCardinality()); + + return errorList; + } + + /// + /// Resolve the properties of the current from its counter-part + /// + /// The source + internal override void ResolveProperties(DTO.Thing dtoThing) + { + if (dtoThing == null) + { + throw new ArgumentNullException("dtoThing"); + } + + var dto = dtoThing as DTO.ArchitectureElement; + if (dto == null) + { + throw new InvalidOperationException(string.Format("The DTO type {0} does not match the type of the current ArchitectureElement POCO.", dtoThing.GetType())); + } + + this.Bounds.ResolveList(dto.Bounds, dto.IterationContainerId, this.Cache); + this.DepictedThing = (dto.DepictedThing.HasValue) ? this.Cache.Get(dto.DepictedThing.Value, dto.IterationContainerId) : null; + this.DiagramElement.ResolveList(dto.DiagramElement, dto.IterationContainerId, this.Cache); + this.Documentation = dto.Documentation; + this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); + this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); + this.LocalStyle.ResolveList(dto.LocalStyle, dto.IterationContainerId, this.Cache); + this.ModifiedOn = dto.ModifiedOn; + this.Name = dto.Name; + this.Resolution = dto.Resolution; + this.RevisionNumber = dto.RevisionNumber; + this.SharedStyle = (dto.SharedStyle.HasValue) ? this.Cache.Get(dto.SharedStyle.Value, dto.IterationContainerId) : null; + this.ThingPreference = dto.ThingPreference; + + this.ResolveExtraProperties(); + } + + /// + /// Generates a from the current + /// + public override DTO.Thing ToDto() + { + var dto = new DTO.ArchitectureElement(this.Iid, this.RevisionNumber); + + dto.Bounds.AddRange(this.Bounds.Select(x => x.Iid)); + dto.DepictedThing = this.DepictedThing != null ? (Guid?)this.DepictedThing.Iid : null; + dto.DiagramElement.AddRange(this.DiagramElement.Select(x => x.Iid)); + dto.Documentation = this.Documentation; + dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); + dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); + dto.LocalStyle.AddRange(this.LocalStyle.Select(x => x.Iid)); + dto.ModifiedOn = this.ModifiedOn; + dto.Name = this.Name; + dto.Resolution = this.Resolution; + dto.RevisionNumber = this.RevisionNumber; + dto.SharedStyle = this.SharedStyle != null ? (Guid?)this.SharedStyle.Iid : null; + dto.ThingPreference = this.ThingPreference; + + dto.IterationContainerId = this.CacheKey.Iteration; + dto.RegisterSourceThing(this); + this.BuildDtoPartialRoutes(dto); + return dto; + } + } +} diff --git a/CDP4Common/AutoGenPoco/ArrayParameterType.cs b/CDP4Common/AutoGenPoco/ArrayParameterType.cs index fb9b81df0..7b96b166b 100644 --- a/CDP4Common/AutoGenPoco/ArrayParameterType.cs +++ b/CDP4Common/AutoGenPoco/ArrayParameterType.cs @@ -155,6 +155,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (ArrayParameterType)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Component = cloneContainedThings ? null : new OrderedItemList(this.Component, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); @@ -166,6 +167,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Component = this.Component.Clone(clone); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); @@ -220,6 +222,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Component.ResolveList(dto.Component, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); @@ -248,6 +251,7 @@ public override DTO.Thing ToDto() var dto = new DTO.ArrayParameterType(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Component.AddRange(this.Component.ToDtoOrderedItemList()); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/Attachment.cs b/CDP4Common/AutoGenPoco/Attachment.cs new file mode 100644 index 000000000..37c407b02 --- /dev/null +++ b/CDP4Common/AutoGenPoco/Attachment.cs @@ -0,0 +1,253 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.EngineeringModelData +{ + using System; + using System.Collections; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.ComponentModel; + using System.Linq; + using System.Runtime.Serialization; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.Helpers; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + + /// + /// An Attachment is used to link a file that is stored on a server to another class. + /// + [CDPVersion("1.3.0")] + [Container(typeof(DefinedThing), "Attachment")] + public sealed partial class Attachment : Thing + { + /// + /// Representation of the default value for the accessRight property of a PersonPermission for the affected class + /// + public new const PersonAccessRightKind DefaultPersonAccess = PersonAccessRightKind.SAME_AS_CONTAINER; + + /// + /// Representation of the default value for the accessRight property of a PersonPermission for the affected class + /// + public new const ParticipantAccessRightKind DefaultParticipantAccess = ParticipantAccessRightKind.SAME_AS_CONTAINER; + + /// + /// Initializes a new instance of the class. + /// + public Attachment() + { + this.FileType = new List(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier. + /// + /// + /// The where the current thing is stored. + /// The is the key used to store this thing. + /// The key is a combination of this thing's identifier and the identifier of its container if applicable or null. + /// + /// + /// The of this thing + /// + public Attachment(Guid iid, ConcurrentDictionary> cache, Uri iDalUri) : base(iid, cache, iDalUri) + { + this.FileType = new List(); + } + + /// + /// Gets or sets the ContentHash. + /// + /// + /// SHA-1 hash code of the content (byte stream) of this Attachment as described in http://en.wikipedia.org/wiki/SHA-1. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + public string ContentHash { get; set; } + + /// + /// Gets or sets the FileName. + /// + /// + /// The Attachment's file name. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + public string FileName { get; set; } + + /// + /// Gets or sets a list of FileType. + /// + /// + /// Reference to one or more FileTypes that define the type and format of this FileRevision. + /// Note: An attachment can have more than one FileType in order to support possible encryption and compression formats. The order in which the FileTypes are defined is the same as the order the formats were applied from the inside, i.e. the first FileType is the normal format of the content, e.g. text or Microsoft Excel, and the subsequent formats are the encryption and/or compression formats, e.g. public-key cryptography standard http://en.wikipedia.org/wiki/PKCS and zip. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + public List FileType { get; set; } + + /// + /// Queries the referenced s of the current + /// + /// + /// This does not include the contained s, the contained s + /// are exposed via the property + /// + /// + /// An + /// + public override IEnumerable QueryReferencedThings() + { + foreach (var thing in base.QueryReferencedThings()) + { + yield return thing; + } + + foreach (var thing in this.FileType) + { + yield return thing; + } + } + + /// + /// Creates and returns a copy of this for edit purpose. + /// + /// A value that indicates whether the contained s should be cloned or not. + /// + /// A cloned instance of . + /// + protected override Thing GenericClone(bool cloneContainedThings) + { + var clone = (Attachment)this.MemberwiseClone(); + clone.ExcludedDomain = new List(this.ExcludedDomain); + clone.ExcludedPerson = new List(this.ExcludedPerson); + clone.FileType = new List(this.FileType); + + if (cloneContainedThings) + { + } + + clone.Original = this; + clone.ResetCacheId(); + return clone; + } + + /// + /// Creates and returns a copy of this for edit purpose. + /// + /// A value that indicates whether the contained s should be cloned or not. + /// + /// A cloned instance of . + /// + public new Attachment Clone(bool cloneContainedThings) + { + this.ChangeKind = ChangeKind.Update; + return (Attachment)this.GenericClone(cloneContainedThings); + } + + /// + /// Validates the cardinalities of the properties of this . + /// + /// + /// A list of potential errors. + /// + protected override IEnumerable ValidatePocoCardinality() + { + var errorList = new List(base.ValidatePocoCardinality()); + + if (string.IsNullOrWhiteSpace(this.ContentHash)) + { + errorList.Add("The property ContentHash is null or empty."); + } + + if (string.IsNullOrWhiteSpace(this.FileName)) + { + errorList.Add("The property FileName is null or empty."); + } + + var fileTypeCount = this.FileType.Count(); + if (fileTypeCount < 1) + { + errorList.Add("The number of elements in the property FileType is wrong. It should be at least 1."); + } + + return errorList; + } + + /// + /// Resolve the properties of the current from its counter-part + /// + /// The source + internal override void ResolveProperties(DTO.Thing dtoThing) + { + if (dtoThing == null) + { + throw new ArgumentNullException("dtoThing"); + } + + var dto = dtoThing as DTO.Attachment; + if (dto == null) + { + throw new InvalidOperationException(string.Format("The DTO type {0} does not match the type of the current Attachment POCO.", dtoThing.GetType())); + } + + this.ContentHash = dto.ContentHash; + this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); + this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); + this.FileName = dto.FileName; + this.FileType.ResolveList(dto.FileType, dto.IterationContainerId, this.Cache); + this.ModifiedOn = dto.ModifiedOn; + this.RevisionNumber = dto.RevisionNumber; + this.ThingPreference = dto.ThingPreference; + + this.ResolveExtraProperties(); + } + + /// + /// Generates a from the current + /// + public override DTO.Thing ToDto() + { + var dto = new DTO.Attachment(this.Iid, this.RevisionNumber); + + dto.ContentHash = this.ContentHash; + dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); + dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); + dto.FileName = this.FileName; + dto.FileType.AddRange(this.FileType.Select(x => x.Iid)); + dto.ModifiedOn = this.ModifiedOn; + dto.RevisionNumber = this.RevisionNumber; + dto.ThingPreference = this.ThingPreference; + + dto.IterationContainerId = this.CacheKey.Iteration; + dto.RegisterSourceThing(this); + this.BuildDtoPartialRoutes(dto); + return dto; + } + } +} diff --git a/CDP4Common/AutoGenPoco/Behavior.cs b/CDP4Common/AutoGenPoco/Behavior.cs new file mode 100644 index 000000000..a9663b540 --- /dev/null +++ b/CDP4Common/AutoGenPoco/Behavior.cs @@ -0,0 +1,247 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.EngineeringModelData +{ + using System; + using System.Collections; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.ComponentModel; + using System.Linq; + using System.Runtime.Serialization; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.Helpers; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + + /// + /// A Behavior is a textual {script} description or a binary file link containing an external function that takes inputs and produces outputs. + /// + [CDPVersion("1.3.0")] + [Container(typeof(ElementDefinition), "Behavior")] + public sealed partial class Behavior : DefinedThing + { + /// + /// Representation of the default value for the accessRight property of a PersonPermission for the affected class + /// + public new const PersonAccessRightKind DefaultPersonAccess = PersonAccessRightKind.NOT_APPLICABLE; + + /// + /// Representation of the default value for the accessRight property of a PersonPermission for the affected class + /// + public new const ParticipantAccessRightKind DefaultParticipantAccess = ParticipantAccessRightKind.SAME_AS_CONTAINER; + + /// + /// Initializes a new instance of the class. + /// + public Behavior() + { + this.BehavioralParameter = new ContainerList(this); + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier. + /// + /// + /// The where the current thing is stored. + /// The is the key used to store this thing. + /// The key is a combination of this thing's identifier and the identifier of its container if applicable or null. + /// + /// + /// The of this thing + /// + public Behavior(Guid iid, ConcurrentDictionary> cache, Uri iDalUri) : base(iid, cache, iDalUri) + { + this.BehavioralParameter = new ContainerList(this); + } + + /// + /// Gets or sets the BehavioralModelKind. + /// + /// + /// The kind of behavioral model being represented by script or File. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + public BehavioralModelKind BehavioralModelKind { get; set; } + + /// + /// Gets or sets a list of contained BehavioralParameter. + /// + /// + /// A collection of BehavioralParameters. + /// + [UmlInformation(aggregation: AggregationKind.Composite, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + public ContainerList BehavioralParameter { get; protected set; } + + /// + /// Gets or sets the Script. + /// + /// + /// The string representation of the script defining the behavior. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + public string Script { get; set; } + + /// + /// Gets an that references the composite properties of the current . + /// + public override IEnumerable ContainerLists + { + get + { + var containers = new List(base.ContainerLists); + containers.Add(this.BehavioralParameter); + return containers; + } + } + + /// + /// Creates and returns a copy of this for edit purpose. + /// + /// A value that indicates whether the contained s should be cloned or not. + /// + /// A cloned instance of . + /// + protected override Thing GenericClone(bool cloneContainedThings) + { + var clone = (Behavior)this.MemberwiseClone(); + clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); + clone.BehavioralParameter = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.BehavioralParameter, clone); + clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); + clone.ExcludedDomain = new List(this.ExcludedDomain); + clone.ExcludedPerson = new List(this.ExcludedPerson); + clone.HyperLink = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.HyperLink, clone); + + if (cloneContainedThings) + { + clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); + clone.BehavioralParameter.AddRange(this.BehavioralParameter.Select(x => x.Clone(true))); + clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); + clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); + } + + clone.Original = this; + clone.ResetCacheId(); + return clone; + } + + /// + /// Creates and returns a copy of this for edit purpose. + /// + /// A value that indicates whether the contained s should be cloned or not. + /// + /// A cloned instance of . + /// + public new Behavior Clone(bool cloneContainedThings) + { + this.ChangeKind = ChangeKind.Update; + return (Behavior)this.GenericClone(cloneContainedThings); + } + + /// + /// Validates the cardinalities of the properties of this . + /// + /// + /// A list of potential errors. + /// + protected override IEnumerable ValidatePocoCardinality() + { + var errorList = new List(base.ValidatePocoCardinality()); + + return errorList; + } + + /// + /// Resolve the properties of the current from its counter-part + /// + /// The source + internal override void ResolveProperties(DTO.Thing dtoThing) + { + if (dtoThing == null) + { + throw new ArgumentNullException("dtoThing"); + } + + var dto = dtoThing as DTO.Behavior; + if (dto == null) + { + throw new InvalidOperationException(string.Format("The DTO type {0} does not match the type of the current Behavior POCO.", dtoThing.GetType())); + } + + this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); + this.BehavioralModelKind = dto.BehavioralModelKind; + this.BehavioralParameter.ResolveList(dto.BehavioralParameter, dto.IterationContainerId, this.Cache); + this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); + this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); + this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); + this.HyperLink.ResolveList(dto.HyperLink, dto.IterationContainerId, this.Cache); + this.ModifiedOn = dto.ModifiedOn; + this.Name = dto.Name; + this.RevisionNumber = dto.RevisionNumber; + this.Script = dto.Script; + this.ShortName = dto.ShortName; + this.ThingPreference = dto.ThingPreference; + + this.ResolveExtraProperties(); + } + + /// + /// Generates a from the current + /// + public override DTO.Thing ToDto() + { + var dto = new DTO.Behavior(this.Iid, this.RevisionNumber); + + dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); + dto.BehavioralModelKind = this.BehavioralModelKind; + dto.BehavioralParameter.AddRange(this.BehavioralParameter.Select(x => x.Iid)); + dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); + dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); + dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); + dto.HyperLink.AddRange(this.HyperLink.Select(x => x.Iid)); + dto.ModifiedOn = this.ModifiedOn; + dto.Name = this.Name; + dto.RevisionNumber = this.RevisionNumber; + dto.Script = this.Script; + dto.ShortName = this.ShortName; + dto.ThingPreference = this.ThingPreference; + + dto.IterationContainerId = this.CacheKey.Iteration; + dto.RegisterSourceThing(this); + this.BuildDtoPartialRoutes(dto); + return dto; + } + } +} diff --git a/CDP4Common/AutoGenPoco/BehavioralModelKind.cs b/CDP4Common/AutoGenPoco/BehavioralModelKind.cs new file mode 100644 index 000000000..2c4e96055 --- /dev/null +++ b/CDP4Common/AutoGenPoco/BehavioralModelKind.cs @@ -0,0 +1,57 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.EngineeringModelData +{ + /// + /// + /// + public enum BehavioralModelKind + { + /// + /// Specifies that a Behavior contains C# code. + /// + CSharp, + + /// + /// Specifies that a Behavior contains Python code. + /// + Python, + + /// + /// Specifies that a Behavior contains Lua code. + /// + Lua, + + /// + /// Specifies that a Behavior is a file contained in the DomainFileStore. + /// + File, + + /// + /// Specifies that the Behavior is defined in some other textual and non-executable format. + /// + Other, + } +} diff --git a/CDP4Common/AutoGenPoco/BehavioralParameter.cs b/CDP4Common/AutoGenPoco/BehavioralParameter.cs new file mode 100644 index 000000000..0d06b5237 --- /dev/null +++ b/CDP4Common/AutoGenPoco/BehavioralParameter.cs @@ -0,0 +1,245 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.EngineeringModelData +{ + using System; + using System.Collections; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.ComponentModel; + using System.Linq; + using System.Runtime.Serialization; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.Helpers; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + + /// + /// A description of a link between a Parameter or ParameterOverride and a input or an output of a Behavior. + /// + [CDPVersion("1.3.0")] + [Container(typeof(Behavior), "BehavioralParameter")] + public sealed partial class BehavioralParameter : Thing + { + /// + /// Representation of the default value for the accessRight property of a PersonPermission for the affected class + /// + public new const PersonAccessRightKind DefaultPersonAccess = PersonAccessRightKind.NOT_APPLICABLE; + + /// + /// Representation of the default value for the accessRight property of a PersonPermission for the affected class + /// + public new const ParticipantAccessRightKind DefaultParticipantAccess = ParticipantAccessRightKind.SAME_AS_CONTAINER; + + /// + /// Initializes a new instance of the class. + /// + public BehavioralParameter() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier. + /// + /// + /// The where the current thing is stored. + /// The is the key used to store this thing. + /// The key is a combination of this thing's identifier and the identifier of its container if applicable or null. + /// + /// + /// The of this thing + /// + public BehavioralParameter(Guid iid, ConcurrentDictionary> cache, Uri iDalUri) : base(iid, cache, iDalUri) + { + } + + /// + /// Gets or sets the BehavioralParameterKind. + /// + /// + /// The type of BehavioralParameter. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + public BehavioralParameterKind BehavioralParameterKind { get; set; } + + /// + /// Gets or sets the Parameter. + /// + /// + /// A ParameterOrOverrideBase that this BehavioralParameter maps to. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + public Parameter Parameter { get; set; } + + /// + /// Gets or sets the VariableName. + /// + /// + /// The name of the variable used in the Behavior script or file. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + public string VariableName { get; set; } + + /// + /// Queries the referenced s of the current + /// + /// + /// This does not include the contained s, the contained s + /// are exposed via the property + /// + /// + /// An + /// + public override IEnumerable QueryReferencedThings() + { + foreach (var thing in base.QueryReferencedThings()) + { + yield return thing; + } + + if (this.Parameter != null) + { + yield return this.Parameter; + } + } + + /// + /// Creates and returns a copy of this for edit purpose. + /// + /// A value that indicates whether the contained s should be cloned or not. + /// + /// A cloned instance of . + /// + protected override Thing GenericClone(bool cloneContainedThings) + { + var clone = (BehavioralParameter)this.MemberwiseClone(); + clone.ExcludedDomain = new List(this.ExcludedDomain); + clone.ExcludedPerson = new List(this.ExcludedPerson); + + if (cloneContainedThings) + { + } + + clone.Original = this; + clone.ResetCacheId(); + return clone; + } + + /// + /// Creates and returns a copy of this for edit purpose. + /// + /// A value that indicates whether the contained s should be cloned or not. + /// + /// A cloned instance of . + /// + public new BehavioralParameter Clone(bool cloneContainedThings) + { + this.ChangeKind = ChangeKind.Update; + return (BehavioralParameter)this.GenericClone(cloneContainedThings); + } + + /// + /// Validates the cardinalities of the properties of this . + /// + /// + /// A list of potential errors. + /// + protected override IEnumerable ValidatePocoCardinality() + { + var errorList = new List(base.ValidatePocoCardinality()); + + if (this.Parameter == null || this.Parameter.Iid == Guid.Empty) + { + errorList.Add("The property Parameter is null."); + this.Parameter = SentinelThingProvider.GetSentinel(); + this.sentinelResetMap["Parameter"] = () => this.Parameter = null; + } + + if (string.IsNullOrWhiteSpace(this.VariableName)) + { + errorList.Add("The property VariableName is null or empty."); + } + + return errorList; + } + + /// + /// Resolve the properties of the current from its counter-part + /// + /// The source + internal override void ResolveProperties(DTO.Thing dtoThing) + { + if (dtoThing == null) + { + throw new ArgumentNullException("dtoThing"); + } + + var dto = dtoThing as DTO.BehavioralParameter; + if (dto == null) + { + throw new InvalidOperationException(string.Format("The DTO type {0} does not match the type of the current BehavioralParameter POCO.", dtoThing.GetType())); + } + + this.BehavioralParameterKind = dto.BehavioralParameterKind; + this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); + this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); + this.ModifiedOn = dto.ModifiedOn; + this.Parameter = this.Cache.Get(dto.Parameter, dto.IterationContainerId) ?? SentinelThingProvider.GetSentinel(); + this.RevisionNumber = dto.RevisionNumber; + this.ThingPreference = dto.ThingPreference; + this.VariableName = dto.VariableName; + + this.ResolveExtraProperties(); + } + + /// + /// Generates a from the current + /// + public override DTO.Thing ToDto() + { + var dto = new DTO.BehavioralParameter(this.Iid, this.RevisionNumber); + + dto.BehavioralParameterKind = this.BehavioralParameterKind; + dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); + dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); + dto.ModifiedOn = this.ModifiedOn; + dto.Parameter = this.Parameter != null ? this.Parameter.Iid : Guid.Empty; + dto.RevisionNumber = this.RevisionNumber; + dto.ThingPreference = this.ThingPreference; + dto.VariableName = this.VariableName; + + dto.IterationContainerId = this.CacheKey.Iteration; + dto.RegisterSourceThing(this); + this.BuildDtoPartialRoutes(dto); + return dto; + } + } +} diff --git a/CDP4Common/AutoGenPoco/BehavioralParameterKind.cs b/CDP4Common/AutoGenPoco/BehavioralParameterKind.cs new file mode 100644 index 000000000..d1010fe88 --- /dev/null +++ b/CDP4Common/AutoGenPoco/BehavioralParameterKind.cs @@ -0,0 +1,42 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.EngineeringModelData +{ + /// + /// Specifies the type of BehavioralParameter. + /// + public enum BehavioralParameterKind + { + /// + /// Specifies that the BehavioralParameter is to be used as an Input. + /// + Input, + + /// + /// Specifies that the BehavioralParameter is to be used as an Output. + /// + Output, + } +} diff --git a/CDP4Common/AutoGenPoco/BinaryRelationshipRule.cs b/CDP4Common/AutoGenPoco/BinaryRelationshipRule.cs index 9bb95eb26..891194a48 100644 --- a/CDP4Common/AutoGenPoco/BinaryRelationshipRule.cs +++ b/CDP4Common/AutoGenPoco/BinaryRelationshipRule.cs @@ -173,6 +173,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (BinaryRelationshipRule)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -181,6 +182,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -265,6 +267,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -292,6 +295,7 @@ public override DTO.Thing ToDto() var dto = new DTO.BinaryRelationshipRule(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/BooleanParameterType.cs b/CDP4Common/AutoGenPoco/BooleanParameterType.cs index f7752a81b..f28f68edf 100644 --- a/CDP4Common/AutoGenPoco/BooleanParameterType.cs +++ b/CDP4Common/AutoGenPoco/BooleanParameterType.cs @@ -92,6 +92,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (BooleanParameterType)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -101,6 +102,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -154,6 +156,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -178,6 +181,7 @@ public override DTO.Thing ToDto() var dto = new DTO.BooleanParameterType(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/Category.cs b/CDP4Common/AutoGenPoco/Category.cs index cdc01b43d..11ff14005 100644 --- a/CDP4Common/AutoGenPoco/Category.cs +++ b/CDP4Common/AutoGenPoco/Category.cs @@ -170,6 +170,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (Category)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -180,6 +181,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -239,6 +241,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -264,6 +267,7 @@ public override DTO.Thing ToDto() var dto = new DTO.Category(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/ClassKind.cs b/CDP4Common/AutoGenPoco/ClassKind.cs index 771750a6c..160c004fb 100644 --- a/CDP4Common/AutoGenPoco/ClassKind.cs +++ b/CDP4Common/AutoGenPoco/ClassKind.cs @@ -62,11 +62,36 @@ public enum ClassKind /// Approval, + /// + /// Assertion that the Class is an instance of ArchitectureDiagram + /// + ArchitectureDiagram, + + /// + /// Assertion that the Class is an instance of ArchitectureElement + /// + ArchitectureElement, + /// /// Assertion that the Class is an instance of ArrayParameterType /// ArrayParameterType, + /// + /// Assertion that the Class is an instance of Attachment + /// + Attachment, + + /// + /// Assertion that the Class is an instance of Behavior + /// + Behavior, + + /// + /// Assertion that the Class is an instance of BehavioralParameter + /// + BehavioralParameter, + /// /// Assertion that the Class is an instance of BinaryNote /// @@ -227,6 +252,11 @@ public enum ClassKind /// DiagramElementThing, + /// + /// Assertion that the Class is an instance of DiagramFrame + /// + DiagramFrame, + /// /// Assertion that the Class is an instance of DiagrammingStyle /// @@ -237,6 +267,11 @@ public enum ClassKind /// DiagramObject, + /// + /// Assertion that the Class is an instance of DiagramPort + /// + DiagramPort, + /// /// Assertion that the Class is an instance of DiagramShape /// diff --git a/CDP4Common/AutoGenPoco/CompoundParameterType.cs b/CDP4Common/AutoGenPoco/CompoundParameterType.cs index a2149616f..e634cba40 100644 --- a/CDP4Common/AutoGenPoco/CompoundParameterType.cs +++ b/CDP4Common/AutoGenPoco/CompoundParameterType.cs @@ -129,6 +129,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (CompoundParameterType)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Component = cloneContainedThings ? null : new OrderedItemList(this.Component, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); @@ -139,6 +140,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Component = this.Component.Clone(clone); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); @@ -199,6 +201,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Component.ResolveList(dto.Component, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); @@ -225,6 +228,7 @@ public override DTO.Thing ToDto() var dto = new DTO.CompoundParameterType(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Component.AddRange(this.Component.ToDtoOrderedItemList()); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/Constant.cs b/CDP4Common/AutoGenPoco/Constant.cs index de290e196..a5f7262ad 100644 --- a/CDP4Common/AutoGenPoco/Constant.cs +++ b/CDP4Common/AutoGenPoco/Constant.cs @@ -174,6 +174,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (Constant)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -184,6 +185,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -250,6 +252,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -276,6 +279,7 @@ public override DTO.Thing ToDto() var dto = new DTO.Constant(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/CyclicRatioScale.cs b/CDP4Common/AutoGenPoco/CyclicRatioScale.cs index 7c6e06dae..cc7d59a0f 100644 --- a/CDP4Common/AutoGenPoco/CyclicRatioScale.cs +++ b/CDP4Common/AutoGenPoco/CyclicRatioScale.cs @@ -104,6 +104,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (CyclicRatioScale)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -114,6 +115,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.MappingToReferenceScale.AddRange(this.MappingToReferenceScale.Select(x => x.Clone(true))); @@ -174,6 +176,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -207,6 +210,7 @@ public override DTO.Thing ToDto() var dto = new DTO.CyclicRatioScale(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/DateParameterType.cs b/CDP4Common/AutoGenPoco/DateParameterType.cs index 080cb9819..93f5d0e47 100644 --- a/CDP4Common/AutoGenPoco/DateParameterType.cs +++ b/CDP4Common/AutoGenPoco/DateParameterType.cs @@ -92,6 +92,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (DateParameterType)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -101,6 +102,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -154,6 +156,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -178,6 +181,7 @@ public override DTO.Thing ToDto() var dto = new DTO.DateParameterType(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/DateTimeParameterType.cs b/CDP4Common/AutoGenPoco/DateTimeParameterType.cs index 6f53958d9..fe8908e60 100644 --- a/CDP4Common/AutoGenPoco/DateTimeParameterType.cs +++ b/CDP4Common/AutoGenPoco/DateTimeParameterType.cs @@ -92,6 +92,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (DateTimeParameterType)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -101,6 +102,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -154,6 +156,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -178,6 +181,7 @@ public override DTO.Thing ToDto() var dto = new DTO.DateTimeParameterType(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/DecompositionRule.cs b/CDP4Common/AutoGenPoco/DecompositionRule.cs index 70899cd1b..2f7a0c429 100644 --- a/CDP4Common/AutoGenPoco/DecompositionRule.cs +++ b/CDP4Common/AutoGenPoco/DecompositionRule.cs @@ -162,6 +162,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (DecompositionRule)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.ContainedCategory = new List(this.ContainedCategory); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -171,6 +172,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -237,6 +239,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.ContainedCategory.ResolveList(dto.ContainedCategory, dto.IterationContainerId, this.Cache); this.ContainingCategory = this.Cache.Get(dto.ContainingCategory, dto.IterationContainerId) ?? SentinelThingProvider.GetSentinel(); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); @@ -263,6 +266,7 @@ public override DTO.Thing ToDto() var dto = new DTO.DecompositionRule(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.ContainedCategory.AddRange(this.ContainedCategory.Select(x => x.Iid)); dto.ContainingCategory = this.ContainingCategory != null ? this.ContainingCategory.Iid : Guid.Empty; dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/DefinedThing.cs b/CDP4Common/AutoGenPoco/DefinedThing.cs index 833b5c7bf..bd09077f6 100644 --- a/CDP4Common/AutoGenPoco/DefinedThing.cs +++ b/CDP4Common/AutoGenPoco/DefinedThing.cs @@ -60,6 +60,7 @@ public abstract partial class DefinedThing : Thing, INamedThing, IShortNamedThin protected DefinedThing() { this.Alias = new ContainerList(this); + this.Attachment = new ContainerList(this); this.Definition = new ContainerList(this); this.HyperLink = new ContainerList(this); } @@ -81,6 +82,7 @@ protected DefinedThing() protected DefinedThing(Guid iid, ConcurrentDictionary> cache, Uri iDalUri) : base(iid, cache, iDalUri) { this.Alias = new ContainerList(this); + this.Attachment = new ContainerList(this); this.Definition = new ContainerList(this); this.HyperLink = new ContainerList(this); } @@ -95,6 +97,15 @@ protected DefinedThing(Guid iid, ConcurrentDictionary Alias { get; protected set; } + /// + /// Gets or sets a list of contained Attachment. + /// + /// + /// Reference to one or more Attachments that are linked to this DefinedThing + /// + [UmlInformation(aggregation: AggregationKind.Composite, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + public virtual ContainerList Attachment { get; protected set; } + /// /// Gets or sets a list of contained Definition. /// @@ -145,6 +156,7 @@ public override IEnumerable ContainerLists { var containers = new List(base.ContainerLists); containers.Add(this.Alias); + containers.Add(this.Attachment); containers.Add(this.Definition); containers.Add(this.HyperLink); return containers; diff --git a/CDP4Common/AutoGenPoco/DerivedQuantityKind.cs b/CDP4Common/AutoGenPoco/DerivedQuantityKind.cs index ee2252ebb..14a6b4121 100644 --- a/CDP4Common/AutoGenPoco/DerivedQuantityKind.cs +++ b/CDP4Common/AutoGenPoco/DerivedQuantityKind.cs @@ -118,6 +118,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (DerivedQuantityKind)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -129,6 +130,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.QuantityKindFactor = this.QuantityKindFactor.Clone(clone); @@ -189,6 +191,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.DefaultScale = this.Cache.Get(dto.DefaultScale, dto.IterationContainerId) ?? SentinelThingProvider.GetSentinel(); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); @@ -217,6 +220,7 @@ public override DTO.Thing ToDto() var dto = new DTO.DerivedQuantityKind(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.DefaultScale = this.DefaultScale != null ? this.DefaultScale.Iid : Guid.Empty; dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/DerivedUnit.cs b/CDP4Common/AutoGenPoco/DerivedUnit.cs index dbbaf53a8..12e1e9e20 100644 --- a/CDP4Common/AutoGenPoco/DerivedUnit.cs +++ b/CDP4Common/AutoGenPoco/DerivedUnit.cs @@ -123,6 +123,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (DerivedUnit)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -132,6 +133,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.UnitFactor = this.UnitFactor.Clone(clone); @@ -192,6 +194,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -215,6 +218,7 @@ public override DTO.Thing ToDto() var dto = new DTO.DerivedUnit(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/DiagramCanvas.cs b/CDP4Common/AutoGenPoco/DiagramCanvas.cs index 2a1c3cec5..3831570d1 100644 --- a/CDP4Common/AutoGenPoco/DiagramCanvas.cs +++ b/CDP4Common/AutoGenPoco/DiagramCanvas.cs @@ -44,7 +44,7 @@ namespace CDP4Common.DiagramData /// [CDPVersion("1.1.0")] [Container(typeof(Iteration), "DiagramCanvas")] - public sealed partial class DiagramCanvas : DiagramElementContainer, ITimeStampedThing + public partial class DiagramCanvas : DiagramElementContainer, ITimeStampedThing { /// /// Representation of the default value for the accessRight property of a PersonPermission for the affected class @@ -89,7 +89,24 @@ public DiagramCanvas(Guid iid, ConcurrentDictionary [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] - public DateTime CreatedOn { get; set; } + public virtual DateTime CreatedOn { get; set; } + + /// + /// Gets or sets the Description. + /// + /// + /// Textual description of a DiagramCanvas. + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + public virtual string Description { get; set; } + + /// + /// Gets or sets the PublicationState. + /// + /// + /// + [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + public virtual PublicationState PublicationState { get; set; } /// /// Creates and returns a copy of this for edit purpose. @@ -140,6 +157,11 @@ protected override IEnumerable ValidatePocoCardinality() { var errorList = new List(base.ValidatePocoCardinality()); + if (string.IsNullOrWhiteSpace(this.Description)) + { + errorList.Add("The property Description is null or empty."); + } + return errorList; } @@ -162,11 +184,13 @@ internal override void ResolveProperties(DTO.Thing dtoThing) this.Bounds.ResolveList(dto.Bounds, dto.IterationContainerId, this.Cache); this.CreatedOn = dto.CreatedOn; + this.Description = dto.Description; this.DiagramElement.ResolveList(dto.DiagramElement, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); this.ModifiedOn = dto.ModifiedOn; this.Name = dto.Name; + this.PublicationState = dto.PublicationState; this.RevisionNumber = dto.RevisionNumber; this.ThingPreference = dto.ThingPreference; @@ -182,11 +206,13 @@ public override DTO.Thing ToDto() dto.Bounds.AddRange(this.Bounds.Select(x => x.Iid)); dto.CreatedOn = this.CreatedOn; + dto.Description = this.Description; dto.DiagramElement.AddRange(this.DiagramElement.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); dto.ModifiedOn = this.ModifiedOn; dto.Name = this.Name; + dto.PublicationState = this.PublicationState; dto.RevisionNumber = this.RevisionNumber; dto.ThingPreference = this.ThingPreference; diff --git a/CDP4Common/AutoGenPoco/DiagramFrame.cs b/CDP4Common/AutoGenPoco/DiagramFrame.cs new file mode 100644 index 000000000..60198156c --- /dev/null +++ b/CDP4Common/AutoGenPoco/DiagramFrame.cs @@ -0,0 +1,195 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.DiagramData +{ + using System; + using System.Collections; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.ComponentModel; + using System.Linq; + using System.Runtime.Serialization; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.Helpers; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + + /// + /// Represents a drawing frame that can be used to visually group a number of other diagram shapes. + /// + [CDPVersion("1.3.0")] + [Container(typeof(DiagramElementContainer), "DiagramElement")] + public sealed partial class DiagramFrame : DiagramShape + { + /// + /// Representation of the default value for the accessRight property of a PersonPermission for the affected class + /// + public new const PersonAccessRightKind DefaultPersonAccess = PersonAccessRightKind.NOT_APPLICABLE; + + /// + /// Representation of the default value for the accessRight property of a PersonPermission for the affected class + /// + public new const ParticipantAccessRightKind DefaultParticipantAccess = ParticipantAccessRightKind.SAME_AS_SUPERCLASS; + + /// + /// Initializes a new instance of the class. + /// + public DiagramFrame() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier. + /// + /// + /// The where the current thing is stored. + /// The is the key used to store this thing. + /// The key is a combination of this thing's identifier and the identifier of its container if applicable or null. + /// + /// + /// The of this thing + /// + public DiagramFrame(Guid iid, ConcurrentDictionary> cache, Uri iDalUri) : base(iid, cache, iDalUri) + { + } + + /// + /// Creates and returns a copy of this for edit purpose. + /// + /// A value that indicates whether the contained s should be cloned or not. + /// + /// A cloned instance of . + /// + protected override Thing GenericClone(bool cloneContainedThings) + { + var clone = (DiagramFrame)this.MemberwiseClone(); + clone.Bounds = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Bounds, clone); + clone.DiagramElement = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.DiagramElement, clone); + clone.ExcludedDomain = new List(this.ExcludedDomain); + clone.ExcludedPerson = new List(this.ExcludedPerson); + clone.LocalStyle = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.LocalStyle, clone); + + if (cloneContainedThings) + { + clone.Bounds.AddRange(this.Bounds.Select(x => x.Clone(true))); + clone.DiagramElement.AddRange(this.DiagramElement.Select(x => x.Clone(true))); + clone.LocalStyle.AddRange(this.LocalStyle.Select(x => x.Clone(true))); + } + + clone.Original = this; + clone.ResetCacheId(); + return clone; + } + + /// + /// Creates and returns a copy of this for edit purpose. + /// + /// A value that indicates whether the contained s should be cloned or not. + /// + /// A cloned instance of . + /// + public new DiagramFrame Clone(bool cloneContainedThings) + { + this.ChangeKind = ChangeKind.Update; + return (DiagramFrame)this.GenericClone(cloneContainedThings); + } + + /// + /// Validates the cardinalities of the properties of this . + /// + /// + /// A list of potential errors. + /// + protected override IEnumerable ValidatePocoCardinality() + { + var errorList = new List(base.ValidatePocoCardinality()); + + return errorList; + } + + /// + /// Resolve the properties of the current from its counter-part + /// + /// The source + internal override void ResolveProperties(DTO.Thing dtoThing) + { + if (dtoThing == null) + { + throw new ArgumentNullException("dtoThing"); + } + + var dto = dtoThing as DTO.DiagramFrame; + if (dto == null) + { + throw new InvalidOperationException(string.Format("The DTO type {0} does not match the type of the current DiagramFrame POCO.", dtoThing.GetType())); + } + + this.Bounds.ResolveList(dto.Bounds, dto.IterationContainerId, this.Cache); + this.DepictedThing = (dto.DepictedThing.HasValue) ? this.Cache.Get(dto.DepictedThing.Value, dto.IterationContainerId) : null; + this.DiagramElement.ResolveList(dto.DiagramElement, dto.IterationContainerId, this.Cache); + this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); + this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); + this.LocalStyle.ResolveList(dto.LocalStyle, dto.IterationContainerId, this.Cache); + this.ModifiedOn = dto.ModifiedOn; + this.Name = dto.Name; + this.RevisionNumber = dto.RevisionNumber; + this.SharedStyle = (dto.SharedStyle.HasValue) ? this.Cache.Get(dto.SharedStyle.Value, dto.IterationContainerId) : null; + this.ThingPreference = dto.ThingPreference; + + this.ResolveExtraProperties(); + } + + /// + /// Generates a from the current + /// + public override DTO.Thing ToDto() + { + var dto = new DTO.DiagramFrame(this.Iid, this.RevisionNumber); + + dto.Bounds.AddRange(this.Bounds.Select(x => x.Iid)); + dto.DepictedThing = this.DepictedThing != null ? (Guid?)this.DepictedThing.Iid : null; + dto.DiagramElement.AddRange(this.DiagramElement.Select(x => x.Iid)); + dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); + dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); + dto.LocalStyle.AddRange(this.LocalStyle.Select(x => x.Iid)); + dto.ModifiedOn = this.ModifiedOn; + dto.Name = this.Name; + dto.RevisionNumber = this.RevisionNumber; + dto.SharedStyle = this.SharedStyle != null ? (Guid?)this.SharedStyle.Iid : null; + dto.ThingPreference = this.ThingPreference; + + dto.IterationContainerId = this.CacheKey.Iteration; + dto.RegisterSourceThing(this); + this.BuildDtoPartialRoutes(dto); + return dto; + } + } +} diff --git a/CDP4Common/AutoGenPoco/DiagramObject.cs b/CDP4Common/AutoGenPoco/DiagramObject.cs index 854259c13..55297937c 100644 --- a/CDP4Common/AutoGenPoco/DiagramObject.cs +++ b/CDP4Common/AutoGenPoco/DiagramObject.cs @@ -45,7 +45,7 @@ namespace CDP4Common.DiagramData /// [CDPVersion("1.1.0")] [Container(typeof(DiagramElementContainer), "DiagramElement")] - public sealed partial class DiagramObject : DiagramShape + public partial class DiagramObject : DiagramShape { /// /// Representation of the default value for the accessRight property of a PersonPermission for the affected class @@ -89,7 +89,7 @@ public DiagramObject(Guid iid, ConcurrentDictionary [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] - public string Documentation { get; set; } + public virtual string Documentation { get; set; } /// /// Gets or sets the Resolution. @@ -98,7 +98,7 @@ public DiagramObject(Guid iid, ConcurrentDictionary [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] - public float Resolution { get; set; } + public virtual float Resolution { get; set; } /// /// Creates and returns a copy of this for edit purpose. diff --git a/CDP4Common/AutoGenPoco/DiagramPort.cs b/CDP4Common/AutoGenPoco/DiagramPort.cs new file mode 100644 index 000000000..bda6e7dd4 --- /dev/null +++ b/CDP4Common/AutoGenPoco/DiagramPort.cs @@ -0,0 +1,195 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.DiagramData +{ + using System; + using System.Collections; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.ComponentModel; + using System.Linq; + using System.Runtime.Serialization; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.Helpers; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + + /// + /// DiagramPort is the representation of a connector's start- or endpoint on an ArchitectureElement. + /// + [CDPVersion("1.3.0")] + [Container(typeof(DiagramElementContainer), "DiagramElement")] + public sealed partial class DiagramPort : DiagramShape + { + /// + /// Representation of the default value for the accessRight property of a PersonPermission for the affected class + /// + public new const PersonAccessRightKind DefaultPersonAccess = PersonAccessRightKind.NOT_APPLICABLE; + + /// + /// Representation of the default value for the accessRight property of a PersonPermission for the affected class + /// + public new const ParticipantAccessRightKind DefaultParticipantAccess = ParticipantAccessRightKind.SAME_AS_SUPERCLASS; + + /// + /// Initializes a new instance of the class. + /// + public DiagramPort() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The unique identifier. + /// + /// + /// The where the current thing is stored. + /// The is the key used to store this thing. + /// The key is a combination of this thing's identifier and the identifier of its container if applicable or null. + /// + /// + /// The of this thing + /// + public DiagramPort(Guid iid, ConcurrentDictionary> cache, Uri iDalUri) : base(iid, cache, iDalUri) + { + } + + /// + /// Creates and returns a copy of this for edit purpose. + /// + /// A value that indicates whether the contained s should be cloned or not. + /// + /// A cloned instance of . + /// + protected override Thing GenericClone(bool cloneContainedThings) + { + var clone = (DiagramPort)this.MemberwiseClone(); + clone.Bounds = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Bounds, clone); + clone.DiagramElement = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.DiagramElement, clone); + clone.ExcludedDomain = new List(this.ExcludedDomain); + clone.ExcludedPerson = new List(this.ExcludedPerson); + clone.LocalStyle = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.LocalStyle, clone); + + if (cloneContainedThings) + { + clone.Bounds.AddRange(this.Bounds.Select(x => x.Clone(true))); + clone.DiagramElement.AddRange(this.DiagramElement.Select(x => x.Clone(true))); + clone.LocalStyle.AddRange(this.LocalStyle.Select(x => x.Clone(true))); + } + + clone.Original = this; + clone.ResetCacheId(); + return clone; + } + + /// + /// Creates and returns a copy of this for edit purpose. + /// + /// A value that indicates whether the contained s should be cloned or not. + /// + /// A cloned instance of . + /// + public new DiagramPort Clone(bool cloneContainedThings) + { + this.ChangeKind = ChangeKind.Update; + return (DiagramPort)this.GenericClone(cloneContainedThings); + } + + /// + /// Validates the cardinalities of the properties of this . + /// + /// + /// A list of potential errors. + /// + protected override IEnumerable ValidatePocoCardinality() + { + var errorList = new List(base.ValidatePocoCardinality()); + + return errorList; + } + + /// + /// Resolve the properties of the current from its counter-part + /// + /// The source + internal override void ResolveProperties(DTO.Thing dtoThing) + { + if (dtoThing == null) + { + throw new ArgumentNullException("dtoThing"); + } + + var dto = dtoThing as DTO.DiagramPort; + if (dto == null) + { + throw new InvalidOperationException(string.Format("The DTO type {0} does not match the type of the current DiagramPort POCO.", dtoThing.GetType())); + } + + this.Bounds.ResolveList(dto.Bounds, dto.IterationContainerId, this.Cache); + this.DepictedThing = (dto.DepictedThing.HasValue) ? this.Cache.Get(dto.DepictedThing.Value, dto.IterationContainerId) : null; + this.DiagramElement.ResolveList(dto.DiagramElement, dto.IterationContainerId, this.Cache); + this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); + this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); + this.LocalStyle.ResolveList(dto.LocalStyle, dto.IterationContainerId, this.Cache); + this.ModifiedOn = dto.ModifiedOn; + this.Name = dto.Name; + this.RevisionNumber = dto.RevisionNumber; + this.SharedStyle = (dto.SharedStyle.HasValue) ? this.Cache.Get(dto.SharedStyle.Value, dto.IterationContainerId) : null; + this.ThingPreference = dto.ThingPreference; + + this.ResolveExtraProperties(); + } + + /// + /// Generates a from the current + /// + public override DTO.Thing ToDto() + { + var dto = new DTO.DiagramPort(this.Iid, this.RevisionNumber); + + dto.Bounds.AddRange(this.Bounds.Select(x => x.Iid)); + dto.DepictedThing = this.DepictedThing != null ? (Guid?)this.DepictedThing.Iid : null; + dto.DiagramElement.AddRange(this.DiagramElement.Select(x => x.Iid)); + dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); + dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); + dto.LocalStyle.AddRange(this.LocalStyle.Select(x => x.Iid)); + dto.ModifiedOn = this.ModifiedOn; + dto.Name = this.Name; + dto.RevisionNumber = this.RevisionNumber; + dto.SharedStyle = this.SharedStyle != null ? (Guid?)this.SharedStyle.Iid : null; + dto.ThingPreference = this.ThingPreference; + + dto.IterationContainerId = this.CacheKey.Iteration; + dto.RegisterSourceThing(this); + this.BuildDtoPartialRoutes(dto); + return dto; + } + } +} diff --git a/CDP4Common/AutoGenPoco/DomainOfExpertise.cs b/CDP4Common/AutoGenPoco/DomainOfExpertise.cs index f8486af6d..5d2f7767a 100644 --- a/CDP4Common/AutoGenPoco/DomainOfExpertise.cs +++ b/CDP4Common/AutoGenPoco/DomainOfExpertise.cs @@ -136,6 +136,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (DomainOfExpertise)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -145,6 +146,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -198,6 +200,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -221,6 +224,7 @@ public override DTO.Thing ToDto() var dto = new DTO.DomainOfExpertise(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/DomainOfExpertiseGroup.cs b/CDP4Common/AutoGenPoco/DomainOfExpertiseGroup.cs index 8b24337c7..053888c5c 100644 --- a/CDP4Common/AutoGenPoco/DomainOfExpertiseGroup.cs +++ b/CDP4Common/AutoGenPoco/DomainOfExpertiseGroup.cs @@ -135,6 +135,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (DomainOfExpertiseGroup)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.Domain = new List(this.Domain); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -144,6 +145,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -197,6 +199,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.Domain.ResolveList(dto.Domain, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -220,6 +223,7 @@ public override DTO.Thing ToDto() var dto = new DTO.DomainOfExpertiseGroup(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.Domain.AddRange(this.Domain.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/ElementDefinition.cs b/CDP4Common/AutoGenPoco/ElementDefinition.cs index facbcc3c2..12616cfde 100644 --- a/CDP4Common/AutoGenPoco/ElementDefinition.cs +++ b/CDP4Common/AutoGenPoco/ElementDefinition.cs @@ -65,6 +65,7 @@ public sealed partial class ElementDefinition : ElementBase /// public ElementDefinition() { + this.Behavior = new ContainerList(this); this.ContainedElement = new ContainerList(this); this.OrganizationalParticipant = new List(); this.Parameter = new ContainerList(this); @@ -88,6 +89,7 @@ public ElementDefinition() /// public ElementDefinition(Guid iid, ConcurrentDictionary> cache, Uri iDalUri) : base(iid, cache, iDalUri) { + this.Behavior = new ContainerList(this); this.ContainedElement = new ContainerList(this); this.OrganizationalParticipant = new List(); this.Parameter = new ContainerList(this); @@ -95,6 +97,15 @@ public ElementDefinition(Guid iid, ConcurrentDictionary(); } + /// + /// Gets or sets a list of contained Behavior. + /// + /// + /// + [CDPVersion("1.3.0")] + [UmlInformation(aggregation: AggregationKind.Composite, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] + public ContainerList Behavior { get; protected set; } + /// /// Gets or sets a list of contained ElementUsage. /// @@ -159,6 +170,7 @@ public override IEnumerable ContainerLists get { var containers = new List(base.ContainerLists); + containers.Add(this.Behavior); containers.Add(this.ContainedElement); containers.Add(this.Parameter); containers.Add(this.ParameterGroup); @@ -205,6 +217,8 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (ElementDefinition)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); + clone.Behavior = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Behavior, clone); clone.Category = new List(this.Category); clone.ContainedElement = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.ContainedElement, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); @@ -219,6 +233,8 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); + clone.Behavior.AddRange(this.Behavior.Select(x => x.Clone(true))); clone.ContainedElement.AddRange(this.ContainedElement.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); @@ -275,6 +291,8 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); + this.Behavior.ResolveList(dto.Behavior, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.ContainedElement.ResolveList(dto.ContainedElement, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); @@ -303,6 +321,8 @@ public override DTO.Thing ToDto() var dto = new DTO.ElementDefinition(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); + dto.Behavior.AddRange(this.Behavior.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.ContainedElement.AddRange(this.ContainedElement.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/ElementUsage.cs b/CDP4Common/AutoGenPoco/ElementUsage.cs index 061729bf4..a49f83d7e 100644 --- a/CDP4Common/AutoGenPoco/ElementUsage.cs +++ b/CDP4Common/AutoGenPoco/ElementUsage.cs @@ -187,6 +187,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (ElementUsage)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -198,6 +199,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.ParameterOverride.AddRange(this.ParameterOverride.Select(x => x.Clone(true))); @@ -259,6 +261,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ElementDefinition = this.Cache.Get(dto.ElementDefinition, dto.IterationContainerId) ?? SentinelThingProvider.GetSentinel(); @@ -286,6 +289,7 @@ public override DTO.Thing ToDto() var dto = new DTO.ElementUsage(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ElementDefinition = this.ElementDefinition != null ? this.ElementDefinition.Iid : Guid.Empty; diff --git a/CDP4Common/AutoGenPoco/EngineeringModelSetup.cs b/CDP4Common/AutoGenPoco/EngineeringModelSetup.cs index 9ca475179..9ebc1050b 100644 --- a/CDP4Common/AutoGenPoco/EngineeringModelSetup.cs +++ b/CDP4Common/AutoGenPoco/EngineeringModelSetup.cs @@ -256,6 +256,7 @@ protected override Thing GenericClone(bool cloneContainedThings) var clone = (EngineeringModelSetup)this.MemberwiseClone(); clone.ActiveDomain = new List(this.ActiveDomain); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -268,6 +269,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.IterationSetup.AddRange(this.IterationSetup.Select(x => x.Clone(true))); @@ -350,6 +352,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) this.ActiveDomain.ResolveList(dto.ActiveDomain, dto.IterationContainerId, this.Cache); this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.DefaultOrganizationalParticipant = (dto.DefaultOrganizationalParticipant.HasValue) ? this.Cache.Get(dto.DefaultOrganizationalParticipant.Value, dto.IterationContainerId) : null; this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.EngineeringModelIid = dto.EngineeringModelIid; @@ -381,6 +384,7 @@ public override DTO.Thing ToDto() dto.ActiveDomain.AddRange(this.ActiveDomain.Select(x => x.Iid)); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.DefaultOrganizationalParticipant = this.DefaultOrganizationalParticipant != null ? (Guid?)this.DefaultOrganizationalParticipant.Iid : null; dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.EngineeringModelIid = this.EngineeringModelIid; diff --git a/CDP4Common/AutoGenPoco/EnumerationParameterType.cs b/CDP4Common/AutoGenPoco/EnumerationParameterType.cs index 6d84df628..72dd7bb4c 100644 --- a/CDP4Common/AutoGenPoco/EnumerationParameterType.cs +++ b/CDP4Common/AutoGenPoco/EnumerationParameterType.cs @@ -125,6 +125,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (EnumerationParameterType)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -135,6 +136,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.ValueDefinition = this.ValueDefinition.Clone(clone); @@ -196,6 +198,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); this.AllowMultiSelect = dto.AllowMultiSelect; + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -222,6 +225,7 @@ public override DTO.Thing ToDto() dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); dto.AllowMultiSelect = this.AllowMultiSelect; + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/EnumerationValueDefinition.cs b/CDP4Common/AutoGenPoco/EnumerationValueDefinition.cs index df3fbf8a8..24ac9d719 100644 --- a/CDP4Common/AutoGenPoco/EnumerationValueDefinition.cs +++ b/CDP4Common/AutoGenPoco/EnumerationValueDefinition.cs @@ -93,6 +93,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (EnumerationValueDefinition)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -101,6 +102,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -154,6 +156,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -175,6 +178,7 @@ public override DTO.Thing ToDto() var dto = new DTO.EnumerationValueDefinition(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/FileType.cs b/CDP4Common/AutoGenPoco/FileType.cs index f6dfc120f..28bbfc145 100644 --- a/CDP4Common/AutoGenPoco/FileType.cs +++ b/CDP4Common/AutoGenPoco/FileType.cs @@ -148,6 +148,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (FileType)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -157,6 +158,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -215,6 +217,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -239,6 +242,7 @@ public override DTO.Thing ToDto() var dto = new DTO.FileType(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/Glossary.cs b/CDP4Common/AutoGenPoco/Glossary.cs index a53661082..b194c8852 100644 --- a/CDP4Common/AutoGenPoco/Glossary.cs +++ b/CDP4Common/AutoGenPoco/Glossary.cs @@ -158,6 +158,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (Glossary)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -168,6 +169,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.Term.AddRange(this.Term.Select(x => x.Clone(true))); @@ -222,6 +224,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -246,6 +249,7 @@ public override DTO.Thing ToDto() var dto = new DTO.Glossary(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/Goal.cs b/CDP4Common/AutoGenPoco/Goal.cs index d0e20eeee..ac593da4a 100644 --- a/CDP4Common/AutoGenPoco/Goal.cs +++ b/CDP4Common/AutoGenPoco/Goal.cs @@ -126,6 +126,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (Goal)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -135,6 +136,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -188,6 +190,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -210,6 +213,7 @@ public override DTO.Thing ToDto() var dto = new DTO.Goal(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/IntervalScale.cs b/CDP4Common/AutoGenPoco/IntervalScale.cs index d00a5d14f..07861c062 100644 --- a/CDP4Common/AutoGenPoco/IntervalScale.cs +++ b/CDP4Common/AutoGenPoco/IntervalScale.cs @@ -116,6 +116,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (IntervalScale)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -126,6 +127,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.MappingToReferenceScale.AddRange(this.MappingToReferenceScale.Select(x => x.Clone(true))); @@ -181,6 +183,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -213,6 +216,7 @@ public override DTO.Thing ToDto() var dto = new DTO.IntervalScale(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/LinearConversionUnit.cs b/CDP4Common/AutoGenPoco/LinearConversionUnit.cs index d4f3906aa..bfb886087 100644 --- a/CDP4Common/AutoGenPoco/LinearConversionUnit.cs +++ b/CDP4Common/AutoGenPoco/LinearConversionUnit.cs @@ -94,6 +94,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (LinearConversionUnit)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -102,6 +103,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -155,6 +157,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.ConversionFactor = dto.ConversionFactor; this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -179,6 +182,7 @@ public override DTO.Thing ToDto() var dto = new DTO.LinearConversionUnit(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.ConversionFactor = this.ConversionFactor; dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/LogarithmicScale.cs b/CDP4Common/AutoGenPoco/LogarithmicScale.cs index 309a40f6b..b57123a9b 100644 --- a/CDP4Common/AutoGenPoco/LogarithmicScale.cs +++ b/CDP4Common/AutoGenPoco/LogarithmicScale.cs @@ -179,6 +179,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (LogarithmicScale)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -190,6 +191,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.MappingToReferenceScale.AddRange(this.MappingToReferenceScale.Select(x => x.Clone(true))); @@ -263,6 +265,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -300,6 +303,7 @@ public override DTO.Thing ToDto() var dto = new DTO.LogarithmicScale(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/ModelReferenceDataLibrary.cs b/CDP4Common/AutoGenPoco/ModelReferenceDataLibrary.cs index 77a27eabf..129c8aa5c 100644 --- a/CDP4Common/AutoGenPoco/ModelReferenceDataLibrary.cs +++ b/CDP4Common/AutoGenPoco/ModelReferenceDataLibrary.cs @@ -91,6 +91,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (ModelReferenceDataLibrary)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.BaseQuantityKind = new OrderedItemList(this.BaseQuantityKind, this); clone.BaseUnit = new List(this.BaseUnit); clone.Constant = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Constant, clone); @@ -111,6 +112,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Constant.AddRange(this.Constant.Select(x => x.Clone(true))); clone.DefinedCategory.AddRange(this.DefinedCategory.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); @@ -174,6 +176,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.BaseQuantityKind.ResolveList(dto.BaseQuantityKind, dto.IterationContainerId, this.Cache); this.BaseUnit.ResolveList(dto.BaseUnit, dto.IterationContainerId, this.Cache); this.Constant.ResolveList(dto.Constant, dto.IterationContainerId, this.Cache); @@ -208,6 +211,7 @@ public override DTO.Thing ToDto() var dto = new DTO.ModelReferenceDataLibrary(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.BaseQuantityKind.AddRange(this.BaseQuantityKind.ToDtoOrderedItemList()); dto.BaseUnit.AddRange(this.BaseUnit.Select(x => x.Iid)); dto.Constant.AddRange(this.Constant.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/MultiRelationshipRule.cs b/CDP4Common/AutoGenPoco/MultiRelationshipRule.cs index 64cb4d371..3a903f8b3 100644 --- a/CDP4Common/AutoGenPoco/MultiRelationshipRule.cs +++ b/CDP4Common/AutoGenPoco/MultiRelationshipRule.cs @@ -160,6 +160,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (MultiRelationshipRule)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -169,6 +170,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -235,6 +237,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -261,6 +264,7 @@ public override DTO.Thing ToDto() var dto = new DTO.MultiRelationshipRule(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/Option.cs b/CDP4Common/AutoGenPoco/Option.cs index cfbc09da0..10643f828 100644 --- a/CDP4Common/AutoGenPoco/Option.cs +++ b/CDP4Common/AutoGenPoco/Option.cs @@ -151,6 +151,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (Option)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -161,6 +162,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.NestedElement.AddRange(this.NestedElement.Select(x => x.Clone(true))); @@ -215,6 +217,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -238,6 +241,7 @@ public override DTO.Thing ToDto() var dto = new DTO.Option(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/OrdinalScale.cs b/CDP4Common/AutoGenPoco/OrdinalScale.cs index f38f74591..d0284edd7 100644 --- a/CDP4Common/AutoGenPoco/OrdinalScale.cs +++ b/CDP4Common/AutoGenPoco/OrdinalScale.cs @@ -126,6 +126,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (OrdinalScale)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -136,6 +137,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.MappingToReferenceScale.AddRange(this.MappingToReferenceScale.Select(x => x.Clone(true))); @@ -191,6 +193,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -224,6 +227,7 @@ public override DTO.Thing ToDto() var dto = new DTO.OrdinalScale(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/ParameterizedCategoryRule.cs b/CDP4Common/AutoGenPoco/ParameterizedCategoryRule.cs index eba935767..53deca4fb 100644 --- a/CDP4Common/AutoGenPoco/ParameterizedCategoryRule.cs +++ b/CDP4Common/AutoGenPoco/ParameterizedCategoryRule.cs @@ -139,6 +139,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (ParameterizedCategoryRule)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -148,6 +149,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -214,6 +216,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category = this.Cache.Get(dto.Category, dto.IterationContainerId) ?? SentinelThingProvider.GetSentinel(); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -238,6 +241,7 @@ public override DTO.Thing ToDto() var dto = new DTO.ParameterizedCategoryRule(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category = this.Category != null ? this.Category.Iid : Guid.Empty; dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/ParticipantRole.cs b/CDP4Common/AutoGenPoco/ParticipantRole.cs index f5d4c0e41..8a9450c64 100644 --- a/CDP4Common/AutoGenPoco/ParticipantRole.cs +++ b/CDP4Common/AutoGenPoco/ParticipantRole.cs @@ -127,6 +127,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (ParticipantRole)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -136,6 +137,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.ParticipantPermission.AddRange(this.ParticipantPermission.Select(x => x.Clone(true))); @@ -190,6 +192,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -213,6 +216,7 @@ public override DTO.Thing ToDto() var dto = new DTO.ParticipantRole(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/PersonRole.cs b/CDP4Common/AutoGenPoco/PersonRole.cs index 9100381db..52d0c0948 100644 --- a/CDP4Common/AutoGenPoco/PersonRole.cs +++ b/CDP4Common/AutoGenPoco/PersonRole.cs @@ -127,6 +127,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (PersonRole)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -136,6 +137,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.PersonPermission.AddRange(this.PersonPermission.Select(x => x.Clone(true))); @@ -190,6 +192,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -213,6 +216,7 @@ public override DTO.Thing ToDto() var dto = new DTO.PersonRole(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/PossibleFiniteState.cs b/CDP4Common/AutoGenPoco/PossibleFiniteState.cs index 19f6f8f73..8ec1896f1 100644 --- a/CDP4Common/AutoGenPoco/PossibleFiniteState.cs +++ b/CDP4Common/AutoGenPoco/PossibleFiniteState.cs @@ -109,6 +109,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (PossibleFiniteState)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -117,6 +118,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -170,6 +172,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -191,6 +194,7 @@ public override DTO.Thing ToDto() var dto = new DTO.PossibleFiniteState(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/PossibleFiniteStateList.cs b/CDP4Common/AutoGenPoco/PossibleFiniteStateList.cs index 7b606678b..2028ca10f 100644 --- a/CDP4Common/AutoGenPoco/PossibleFiniteStateList.cs +++ b/CDP4Common/AutoGenPoco/PossibleFiniteStateList.cs @@ -187,6 +187,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (PossibleFiniteStateList)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -197,6 +198,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.PossibleState = this.PossibleState.Clone(clone); @@ -264,6 +266,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.DefaultState = (dto.DefaultState.HasValue) ? this.Cache.Get(dto.DefaultState.Value, dto.IterationContainerId) : null; this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); @@ -289,6 +292,7 @@ public override DTO.Thing ToDto() var dto = new DTO.PossibleFiniteStateList(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.DefaultState = this.DefaultState != null ? (Guid?)this.DefaultState.Iid : null; dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/PrefixedUnit.cs b/CDP4Common/AutoGenPoco/PrefixedUnit.cs index c61375574..8f745256c 100644 --- a/CDP4Common/AutoGenPoco/PrefixedUnit.cs +++ b/CDP4Common/AutoGenPoco/PrefixedUnit.cs @@ -176,6 +176,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (PrefixedUnit)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -184,6 +185,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -244,6 +246,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -266,6 +269,7 @@ public override DTO.Thing ToDto() var dto = new DTO.PrefixedUnit(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/PublicationState.cs b/CDP4Common/AutoGenPoco/PublicationState.cs new file mode 100644 index 000000000..3cef5fedf --- /dev/null +++ b/CDP4Common/AutoGenPoco/PublicationState.cs @@ -0,0 +1,47 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.DiagramData +{ + /// + /// Specifies the state of Publication. + /// + public enum PublicationState + { + /// + /// State that defines that an object is Hidden to others. + /// + Hidden, + + /// + /// State that defines that an object is ready for publication. + /// + ReadyForPublish, + + /// + /// State that defines that an object has been published. + /// + Published, + } +} diff --git a/CDP4Common/AutoGenPoco/RatioScale.cs b/CDP4Common/AutoGenPoco/RatioScale.cs index 91e3a5ad0..06ce9f741 100644 --- a/CDP4Common/AutoGenPoco/RatioScale.cs +++ b/CDP4Common/AutoGenPoco/RatioScale.cs @@ -110,6 +110,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (RatioScale)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -120,6 +121,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.MappingToReferenceScale.AddRange(this.MappingToReferenceScale.Select(x => x.Clone(true))); @@ -175,6 +177,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -207,6 +210,7 @@ public override DTO.Thing ToDto() var dto = new DTO.RatioScale(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/ReferenceSource.cs b/CDP4Common/AutoGenPoco/ReferenceSource.cs index 664053dfd..161621352 100644 --- a/CDP4Common/AutoGenPoco/ReferenceSource.cs +++ b/CDP4Common/AutoGenPoco/ReferenceSource.cs @@ -210,6 +210,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (ReferenceSource)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -219,6 +220,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -272,6 +274,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Author = dto.Author; this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); @@ -302,6 +305,7 @@ public override DTO.Thing ToDto() var dto = new DTO.ReferenceSource(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Author = this.Author; dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/ReferencerRule.cs b/CDP4Common/AutoGenPoco/ReferencerRule.cs index c542d7076..879765d93 100644 --- a/CDP4Common/AutoGenPoco/ReferencerRule.cs +++ b/CDP4Common/AutoGenPoco/ReferencerRule.cs @@ -160,6 +160,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (ReferencerRule)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -169,6 +170,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -235,6 +237,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -261,6 +264,7 @@ public override DTO.Thing ToDto() var dto = new DTO.ReferencerRule(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/Requirement.cs b/CDP4Common/AutoGenPoco/Requirement.cs index c391df607..0aa2b8e34 100644 --- a/CDP4Common/AutoGenPoco/Requirement.cs +++ b/CDP4Common/AutoGenPoco/Requirement.cs @@ -175,6 +175,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (Requirement)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -186,6 +187,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.ParameterValue.AddRange(this.ParameterValue.Select(x => x.Clone(true))); @@ -241,6 +243,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -268,6 +271,7 @@ public override DTO.Thing ToDto() var dto = new DTO.Requirement(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/RequirementsGroup.cs b/CDP4Common/AutoGenPoco/RequirementsGroup.cs index 98672ee0f..6fe9531a5 100644 --- a/CDP4Common/AutoGenPoco/RequirementsGroup.cs +++ b/CDP4Common/AutoGenPoco/RequirementsGroup.cs @@ -91,6 +91,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (RequirementsGroup)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -102,6 +103,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.Group.AddRange(this.Group.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); @@ -157,6 +159,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -182,6 +185,7 @@ public override DTO.Thing ToDto() var dto = new DTO.RequirementsGroup(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/RequirementsSpecification.cs b/CDP4Common/AutoGenPoco/RequirementsSpecification.cs index 9c5219b2d..4114ccbe7 100644 --- a/CDP4Common/AutoGenPoco/RequirementsSpecification.cs +++ b/CDP4Common/AutoGenPoco/RequirementsSpecification.cs @@ -126,6 +126,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (RequirementsSpecification)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -138,6 +139,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.Group.AddRange(this.Group.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); @@ -194,6 +196,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -221,6 +224,7 @@ public override DTO.Thing ToDto() var dto = new DTO.RequirementsSpecification(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/RuleVerificationList.cs b/CDP4Common/AutoGenPoco/RuleVerificationList.cs index cda9c2080..4e4247e88 100644 --- a/CDP4Common/AutoGenPoco/RuleVerificationList.cs +++ b/CDP4Common/AutoGenPoco/RuleVerificationList.cs @@ -149,6 +149,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (RuleVerificationList)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -158,6 +159,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.RuleVerification = this.RuleVerification.Clone(clone); @@ -219,6 +221,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -242,6 +245,7 @@ public override DTO.Thing ToDto() var dto = new DTO.RuleVerificationList(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/SampledFunctionParameterType.cs b/CDP4Common/AutoGenPoco/SampledFunctionParameterType.cs index 8c43d980e..c9ddf7cca 100644 --- a/CDP4Common/AutoGenPoco/SampledFunctionParameterType.cs +++ b/CDP4Common/AutoGenPoco/SampledFunctionParameterType.cs @@ -156,6 +156,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (SampledFunctionParameterType)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.DependentParameterType = cloneContainedThings ? null : new OrderedItemList(this.DependentParameterType, clone); @@ -168,6 +169,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.DependentParameterType = this.DependentParameterType.Clone(clone); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); @@ -241,6 +243,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.DegreeOfInterpolation = dto.DegreeOfInterpolation; @@ -269,6 +272,7 @@ public override DTO.Thing ToDto() var dto = new DTO.SampledFunctionParameterType(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.DegreeOfInterpolation = this.DegreeOfInterpolation; diff --git a/CDP4Common/AutoGenPoco/ScaleValueDefinition.cs b/CDP4Common/AutoGenPoco/ScaleValueDefinition.cs index 5fc5a273d..0fe393df9 100644 --- a/CDP4Common/AutoGenPoco/ScaleValueDefinition.cs +++ b/CDP4Common/AutoGenPoco/ScaleValueDefinition.cs @@ -101,6 +101,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (ScaleValueDefinition)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -109,6 +110,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -167,6 +169,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -189,6 +192,7 @@ public override DTO.Thing ToDto() var dto = new DTO.ScaleValueDefinition(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/SimpleQuantityKind.cs b/CDP4Common/AutoGenPoco/SimpleQuantityKind.cs index 7c5509706..6a3fada93 100644 --- a/CDP4Common/AutoGenPoco/SimpleQuantityKind.cs +++ b/CDP4Common/AutoGenPoco/SimpleQuantityKind.cs @@ -93,6 +93,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (SimpleQuantityKind)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -103,6 +104,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -156,6 +158,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.DefaultScale = this.Cache.Get(dto.DefaultScale, dto.IterationContainerId) ?? SentinelThingProvider.GetSentinel(); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); @@ -183,6 +186,7 @@ public override DTO.Thing ToDto() var dto = new DTO.SimpleQuantityKind(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.DefaultScale = this.DefaultScale != null ? this.DefaultScale.Iid : Guid.Empty; dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/SimpleUnit.cs b/CDP4Common/AutoGenPoco/SimpleUnit.cs index 7969c6904..e794ec32e 100644 --- a/CDP4Common/AutoGenPoco/SimpleUnit.cs +++ b/CDP4Common/AutoGenPoco/SimpleUnit.cs @@ -96,6 +96,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (SimpleUnit)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -104,6 +105,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -157,6 +159,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -179,6 +182,7 @@ public override DTO.Thing ToDto() var dto = new DTO.SimpleUnit(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/SiteReferenceDataLibrary.cs b/CDP4Common/AutoGenPoco/SiteReferenceDataLibrary.cs index 945b74b1f..1cee86145 100644 --- a/CDP4Common/AutoGenPoco/SiteReferenceDataLibrary.cs +++ b/CDP4Common/AutoGenPoco/SiteReferenceDataLibrary.cs @@ -102,6 +102,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (SiteReferenceDataLibrary)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.BaseQuantityKind = new OrderedItemList(this.BaseQuantityKind, this); clone.BaseUnit = new List(this.BaseUnit); clone.Constant = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Constant, clone); @@ -122,6 +123,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Constant.AddRange(this.Constant.Select(x => x.Clone(true))); clone.DefinedCategory.AddRange(this.DefinedCategory.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); @@ -185,6 +187,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.BaseQuantityKind.ResolveList(dto.BaseQuantityKind, dto.IterationContainerId, this.Cache); this.BaseUnit.ResolveList(dto.BaseUnit, dto.IterationContainerId, this.Cache); this.Constant.ResolveList(dto.Constant, dto.IterationContainerId, this.Cache); @@ -220,6 +223,7 @@ public override DTO.Thing ToDto() var dto = new DTO.SiteReferenceDataLibrary(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.BaseQuantityKind.AddRange(this.BaseQuantityKind.ToDtoOrderedItemList()); dto.BaseUnit.AddRange(this.BaseUnit.Select(x => x.Iid)); dto.Constant.AddRange(this.Constant.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/SpecializedQuantityKind.cs b/CDP4Common/AutoGenPoco/SpecializedQuantityKind.cs index 149741978..da408a383 100644 --- a/CDP4Common/AutoGenPoco/SpecializedQuantityKind.cs +++ b/CDP4Common/AutoGenPoco/SpecializedQuantityKind.cs @@ -127,6 +127,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (SpecializedQuantityKind)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -137,6 +138,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -197,6 +199,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.DefaultScale = this.Cache.Get(dto.DefaultScale, dto.IterationContainerId) ?? SentinelThingProvider.GetSentinel(); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); @@ -225,6 +228,7 @@ public override DTO.Thing ToDto() var dto = new DTO.SpecializedQuantityKind(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.DefaultScale = this.DefaultScale != null ? this.DefaultScale.Iid : Guid.Empty; dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/StakeHolderValueMap.cs b/CDP4Common/AutoGenPoco/StakeHolderValueMap.cs index 12975a12e..679098aed 100644 --- a/CDP4Common/AutoGenPoco/StakeHolderValueMap.cs +++ b/CDP4Common/AutoGenPoco/StakeHolderValueMap.cs @@ -209,6 +209,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (StakeHolderValueMap)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -223,6 +224,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); clone.Settings.AddRange(this.Settings.Select(x => x.Clone(true))); @@ -283,6 +285,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -310,6 +313,7 @@ public override DTO.Thing ToDto() var dto = new DTO.StakeHolderValueMap(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/Stakeholder.cs b/CDP4Common/AutoGenPoco/Stakeholder.cs index 070cd7f75..c9a73fcb9 100644 --- a/CDP4Common/AutoGenPoco/Stakeholder.cs +++ b/CDP4Common/AutoGenPoco/Stakeholder.cs @@ -141,6 +141,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (Stakeholder)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -151,6 +152,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -204,6 +206,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -227,6 +230,7 @@ public override DTO.Thing ToDto() var dto = new DTO.Stakeholder(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/StakeholderValue.cs b/CDP4Common/AutoGenPoco/StakeholderValue.cs index d16cee147..e6ef8861b 100644 --- a/CDP4Common/AutoGenPoco/StakeholderValue.cs +++ b/CDP4Common/AutoGenPoco/StakeholderValue.cs @@ -126,6 +126,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (StakeholderValue)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -135,6 +136,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -188,6 +190,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -210,6 +213,7 @@ public override DTO.Thing ToDto() var dto = new DTO.StakeholderValue(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/Term.cs b/CDP4Common/AutoGenPoco/Term.cs index 112d95836..f4da43570 100644 --- a/CDP4Common/AutoGenPoco/Term.cs +++ b/CDP4Common/AutoGenPoco/Term.cs @@ -100,6 +100,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (Term)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -108,6 +109,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -161,6 +163,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); this.ExcludedPerson.ResolveList(dto.ExcludedPerson, dto.IterationContainerId, this.Cache); @@ -183,6 +186,7 @@ public override DTO.Thing ToDto() var dto = new DTO.Term(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); dto.ExcludedPerson.AddRange(this.ExcludedPerson.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/TextParameterType.cs b/CDP4Common/AutoGenPoco/TextParameterType.cs index a4872bfa8..6a115b781 100644 --- a/CDP4Common/AutoGenPoco/TextParameterType.cs +++ b/CDP4Common/AutoGenPoco/TextParameterType.cs @@ -91,6 +91,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (TextParameterType)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -100,6 +101,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -153,6 +155,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -177,6 +180,7 @@ public override DTO.Thing ToDto() var dto = new DTO.TextParameterType(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/TimeOfDayParameterType.cs b/CDP4Common/AutoGenPoco/TimeOfDayParameterType.cs index dedb36819..7fd08e931 100644 --- a/CDP4Common/AutoGenPoco/TimeOfDayParameterType.cs +++ b/CDP4Common/AutoGenPoco/TimeOfDayParameterType.cs @@ -92,6 +92,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (TimeOfDayParameterType)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -101,6 +102,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -154,6 +156,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -178,6 +181,7 @@ public override DTO.Thing ToDto() var dto = new DTO.TimeOfDayParameterType(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/UnitPrefix.cs b/CDP4Common/AutoGenPoco/UnitPrefix.cs index a0a9d743b..ac798130d 100644 --- a/CDP4Common/AutoGenPoco/UnitPrefix.cs +++ b/CDP4Common/AutoGenPoco/UnitPrefix.cs @@ -110,6 +110,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (UnitPrefix)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); clone.ExcludedPerson = new List(this.ExcludedPerson); @@ -118,6 +119,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -176,6 +178,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.ConversionFactor = dto.ConversionFactor; this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -199,6 +202,7 @@ public override DTO.Thing ToDto() var dto = new DTO.UnitPrefix(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.ConversionFactor = this.ConversionFactor; dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenPoco/ValueGroup.cs b/CDP4Common/AutoGenPoco/ValueGroup.cs index 5f8365b27..232cd2c89 100644 --- a/CDP4Common/AutoGenPoco/ValueGroup.cs +++ b/CDP4Common/AutoGenPoco/ValueGroup.cs @@ -126,6 +126,7 @@ protected override Thing GenericClone(bool cloneContainedThings) { var clone = (ValueGroup)this.MemberwiseClone(); clone.Alias = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Alias, clone); + clone.Attachment = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Attachment, clone); clone.Category = new List(this.Category); clone.Definition = cloneContainedThings ? new ContainerList(clone) : new ContainerList(this.Definition, clone); clone.ExcludedDomain = new List(this.ExcludedDomain); @@ -135,6 +136,7 @@ protected override Thing GenericClone(bool cloneContainedThings) if (cloneContainedThings) { clone.Alias.AddRange(this.Alias.Select(x => x.Clone(true))); + clone.Attachment.AddRange(this.Attachment.Select(x => x.Clone(true))); clone.Definition.AddRange(this.Definition.Select(x => x.Clone(true))); clone.HyperLink.AddRange(this.HyperLink.Select(x => x.Clone(true))); } @@ -188,6 +190,7 @@ internal override void ResolveProperties(DTO.Thing dtoThing) } this.Alias.ResolveList(dto.Alias, dto.IterationContainerId, this.Cache); + this.Attachment.ResolveList(dto.Attachment, dto.IterationContainerId, this.Cache); this.Category.ResolveList(dto.Category, dto.IterationContainerId, this.Cache); this.Definition.ResolveList(dto.Definition, dto.IterationContainerId, this.Cache); this.ExcludedDomain.ResolveList(dto.ExcludedDomain, dto.IterationContainerId, this.Cache); @@ -210,6 +213,7 @@ public override DTO.Thing ToDto() var dto = new DTO.ValueGroup(this.Iid, this.RevisionNumber); dto.Alias.AddRange(this.Alias.Select(x => x.Iid)); + dto.Attachment.AddRange(this.Attachment.Select(x => x.Iid)); dto.Category.AddRange(this.Category.Select(x => x.Iid)); dto.Definition.AddRange(this.Definition.Select(x => x.Iid)); dto.ExcludedDomain.AddRange(this.ExcludedDomain.Select(x => x.Iid)); diff --git a/CDP4Common/AutoGenSentinel/SentinelThingProvider.cs b/CDP4Common/AutoGenSentinel/SentinelThingProvider.cs index b8fe539c0..6897d7ec7 100644 --- a/CDP4Common/AutoGenSentinel/SentinelThingProvider.cs +++ b/CDP4Common/AutoGenSentinel/SentinelThingProvider.cs @@ -51,7 +51,7 @@ static SentinelThingProvider() sentinelProvider.Add("Category", new Category(Guid.Empty, null, null)); sentinelProvider.Add("ChangeProposal", new ChangeProposal(Guid.Empty, null, null)); sentinelProvider.Add("ChangeRequest", new ChangeRequest(Guid.Empty, null, null)); - sentinelProvider.Add("DiagramElementThing", new DiagramEdge(Guid.Empty, null, null)); + sentinelProvider.Add("DiagramElementThing", new ArchitectureElement(Guid.Empty, null, null)); sentinelProvider.Add("DomainOfExpertise", new DomainOfExpertise(Guid.Empty, null, null)); sentinelProvider.Add("ElementDefinition", new ElementDefinition(Guid.Empty, null, null)); sentinelProvider.Add("EngineeringModelSetup", new EngineeringModelSetup(Guid.Empty, null, null)); diff --git a/CDP4Common/Dto/Attachment.cs b/CDP4Common/Dto/Attachment.cs new file mode 100644 index 000000000..c9c002eed --- /dev/null +++ b/CDP4Common/Dto/Attachment.cs @@ -0,0 +1,38 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Patxi Ozkoidi, Alexander van Delft, Nathanael Smiechowski, Ahmed Ahmed, Simon Wood +// +// This file is part of COMET-IME Community Edition. +// The COMET-IME Community Edition is the RHEA Concurrent Design Desktop Application and Excel Integration +// compliant with ECSS-E-TM-10-25 Annex A and Annex C. +// +// The COMET-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or any later version. +// +// The COMET-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.DTO +{ + /// + /// The extended part of the auto-generated + /// + public partial class Attachment : ILocalFile + { + /// + /// Contains the path of the file in the context of the User's PC + /// + public string LocalPath { get; set; } + } +} diff --git a/CDP4Common/Dto/FileRevision.cs b/CDP4Common/Dto/FileRevision.cs new file mode 100644 index 000000000..a5317abbb --- /dev/null +++ b/CDP4Common/Dto/FileRevision.cs @@ -0,0 +1,38 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Alex Vorobiev, Naron Phou, Patxi Ozkoidi, Alexander van Delft, Nathanael Smiechowski, Ahmed Ahmed, Simon Wood +// +// This file is part of COMET-IME Community Edition. +// The COMET-IME Community Edition is the RHEA Concurrent Design Desktop Application and Excel Integration +// compliant with ECSS-E-TM-10-25 Annex A and Annex C. +// +// The COMET-IME Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Affero General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or any later version. +// +// The COMET-IME Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.DTO +{ + /// + /// The extended part of the auto-generated + /// + public partial class FileRevision : ILocalFile + { + /// + /// Contains the path of the file in the context of the User's PC + /// + public string LocalPath { get; set; } + } +} diff --git a/CDP4Common/Dto/ILocalFile.cs b/CDP4Common/Dto/ILocalFile.cs new file mode 100644 index 000000000..ebeb79f89 --- /dev/null +++ b/CDP4Common/Dto/ILocalFile.cs @@ -0,0 +1,42 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft +// +// This file is part of CDP4-SDK Community Edition +// +// The CDP4-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.DTO +{ + /// + /// An interface for DTO classes containing data that's needed in a file upload scenario. + /// Typically used for objects. + /// + public interface ILocalFile + { + /// + /// Gets or sets the ContentHash. + /// + /// + /// SHA-1 hash code of the content (byte stream) of this object + /// Note: The SHA-1 cryptographic hash is described in http://en.wikipedia.org/wiki/SHA-1. It provides a unique hash to the file content of the file and was selected for future compatibility with a GIT (http://git-scm.com/) version controlled file store. Implementations of E-TM-10-25 need to provide a way to associate a SHA-1 hash to the content of a file. Whether or not the content of two FileRevisions differs can then be determined by just comparing the SHA-1 hashes without the need for having access to the actual file content itself. + /// + string ContentHash { get; } + } +} diff --git a/CDP4Common/Poco/ILocalFile.cs b/CDP4Common/ILocalFile.cs similarity index 98% rename from CDP4Common/Poco/ILocalFile.cs rename to CDP4Common/ILocalFile.cs index 9b45a290e..4ad5205c0 100644 --- a/CDP4Common/Poco/ILocalFile.cs +++ b/CDP4Common/ILocalFile.cs @@ -1,49 +1,49 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) 2015-2020 RHEA System S.A. -// -// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft -// -// This file is part of CDP4-SDK Community Edition -// -// The CDP4-SDK Community Edition is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 3 of the License, or (at your option) any later version. -// -// The CDP4-SDK Community Edition is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with this program; if not, write to the Free Software Foundation, -// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace CDP4Common -{ - using CDP4Common.EngineeringModelData; - - /// - /// An interface for classes containing data that's needed in a file upload scenario. - /// Typically used for objects. - /// - public interface ILocalFile - { - /// - /// Contains the path of the file in the context of the User's PC - /// - string LocalPath { get; } - - /// - /// Gets or sets the ContentHash. - /// - /// - /// SHA-1 hash code of the content (byte stream) of this object - /// Note: The SHA-1 cryptographic hash is described in http://en.wikipedia.org/wiki/SHA-1. It provides a unique hash to the file content of the file and was selected for future compatibility with a GIT (http://git-scm.com/) version controlled file store. Implementations of E-TM-10-25 need to provide a way to associate a SHA-1 hash to the content of a file. Whether or not the content of two FileRevisions differs can then be determined by just comparing the SHA-1 hashes without the need for having access to the actual file content itself. - /// - string ContentHash { get; } - } -} +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2020 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft +// +// This file is part of CDP4-SDK Community Edition +// +// The CDP4-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common +{ + using CDP4Common.EngineeringModelData; + + /// + /// An interface for classes containing data that's needed in a file upload scenario. + /// Typically used for objects. + /// + public interface ILocalFile + { + /// + /// Contains the path of the file in the context of the User's PC + /// + string LocalPath { get; } + + /// + /// Gets or sets the ContentHash. + /// + /// + /// SHA-1 hash code of the content (byte stream) of this object + /// Note: The SHA-1 cryptographic hash is described in http://en.wikipedia.org/wiki/SHA-1. It provides a unique hash to the file content of the file and was selected for future compatibility with a GIT (http://git-scm.com/) version controlled file store. Implementations of E-TM-10-25 need to provide a way to associate a SHA-1 hash to the content of a file. Whether or not the content of two FileRevisions differs can then be determined by just comparing the SHA-1 hashes without the need for having access to the actual file content itself. + /// + string ContentHash { get; } + } +} diff --git a/CDP4Common/Poco/Attachment.cs b/CDP4Common/Poco/Attachment.cs new file mode 100644 index 000000000..2e4cca7e7 --- /dev/null +++ b/CDP4Common/Poco/Attachment.cs @@ -0,0 +1,72 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft +// +// This file is part of CDP4-SDK Community Edition +// +// The CDP4-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The CDP4-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4Common.EngineeringModelData +{ + using System; + using System.Linq; + using System.Text; + + /// + /// Extended part for the auto-generated + /// + public partial class Attachment : ILocalFile + { + /// + /// Gets or sets the Path. + /// + /// + /// full path name including folder path and type extension(s) + /// Note: The path is derived to be the concatenation of the path of the containingFolder (if any) followed by a forward slash and the name of this FileRevision and then a dot separated concatenation of the extensions of the associated FileTypes. This yields a path that is similar to that of a "file://" URL starting from the containing FileStore. + /// + /// + /// The Path property is a derived property; when the getter and setter are invoked an InvalidOperationException will be thrown. + /// + public string Path => this.GetDerivedPath(); + + /// + /// Returns the derived value + /// + /// The value + private string GetDerivedPath() + { + var path = new StringBuilder(); + + path.Append(this.FileName); + + foreach (var fileType in this.FileType.Where(x => !string.IsNullOrWhiteSpace(x.Extension))) + { + path.Append("."); + path.Append(fileType.Extension); + } + + return path.ToString(); + } + + /// + /// Gets or sets the (temporary) LocalPath of the file + /// + public string LocalPath { get; set; } + } +} diff --git a/CDP4Dal/CDP4Dal.csproj b/CDP4Dal/CDP4Dal.csproj index 8a4536176..33b5c6b70 100644 --- a/CDP4Dal/CDP4Dal.csproj +++ b/CDP4Dal/CDP4Dal.csproj @@ -4,7 +4,7 @@ net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netstandard2.0;netstandard2.1;netcoreapp3.1 RHEA System S.A. CDP4Dal Community Edition - 8.1.0 + 8.1.1 CDP4 Data Access Layer library, a consumer of an ECSS-E-TM-10-25 Annex C API Copyright © RHEA System S.A. Sam, Merlin, Alex, Naron, Alexander, Yevhen, Nathanael, Ahmed diff --git a/CDP4Dal/DAL/Dal.cs b/CDP4Dal/DAL/Dal.cs index ba8d4e8c3..40cf67f32 100644 --- a/CDP4Dal/DAL/Dal.cs +++ b/CDP4Dal/DAL/Dal.cs @@ -33,6 +33,7 @@ namespace CDP4Dal.DAL using System.Threading; using System.Threading.Tasks; + using CDP4Common; using CDP4Common.CommonData; using CDP4Common.Helpers; using CDP4Common.MetaInfo; @@ -448,7 +449,7 @@ protected void OperationContainerFileVerification(OperationContainer operationCo foreach (var operation in operationContainer.Operations) { - var fileRevision = operation.ModifiedThing as CDP4Common.DTO.FileRevision; + var fileRevision = operation.ModifiedThing as CDP4Common.DTO.ILocalFile; if (fileRevision != null && fileRevision.ContentHash == hash) { diff --git a/CDP4Dal/Operations/ThingTransaction.cs b/CDP4Dal/Operations/ThingTransaction.cs index dc766fe67..1ae4787fd 100644 --- a/CDP4Dal/Operations/ThingTransaction.cs +++ b/CDP4Dal/Operations/ThingTransaction.cs @@ -617,14 +617,14 @@ public OperationContainer FinalizeTransaction() } /// - /// Get all the files that need to be added to the DataStore accoring to the added/changed/deleted s + /// Get all the files that need to be added to the DataStore according to the added s that implement . /// /// An Array of strings that contain the local paths in the context of the users' computer public string[] GetFiles() { var files = new List(); - - foreach (var thing in this.AddedThing.OfType().Union(this.UpdatedThing.OfType()).Where(x => x.LocalPath != null)) + + foreach (var thing in this.AddedThing.OfType().Where(x => x.LocalPath != null)) { if (string.IsNullOrWhiteSpace(thing.ContentHash)) { diff --git a/CDP4Dal/Session.cs b/CDP4Dal/Session.cs index 0de1eaf8d..afa048745 100644 --- a/CDP4Dal/Session.cs +++ b/CDP4Dal/Session.cs @@ -785,17 +785,18 @@ private static bool CanCancel(CancellationTokenSource cancellationTokenSource) /// public bool CanCancel() { - foreach (var cancellationTokenSourceKey in this.cancellationTokenSourceDictionary.Keys) + foreach (var cancellationTokenSourceKey in this.cancellationTokenSourceDictionary.Keys.ToList()) { - this.cancellationTokenSourceDictionary.TryGetValue(cancellationTokenSourceKey, out var cancellationTokenSource); + if (!this.cancellationTokenSourceDictionary.TryGetValue(cancellationTokenSourceKey, out var cancellationTokenSource)) + { + continue; + } if (!CanCancel(cancellationTokenSource)) { continue; } - cancellationTokenSource?.Cancel(); - return true; } @@ -807,11 +808,14 @@ public bool CanCancel() /// public void Cancel() { - foreach (var cancellationTokenSourceKey in this.cancellationTokenSourceDictionary.Keys) + foreach (var cancellationTokenSourceKey in this.cancellationTokenSourceDictionary.Keys.ToList()) { - if (CanCancel(this.cancellationTokenSourceDictionary[cancellationTokenSourceKey])) + if (this.cancellationTokenSourceDictionary.TryGetValue(cancellationTokenSourceKey, out var cancellationTokenSource)) { - this.cancellationTokenSourceDictionary[cancellationTokenSourceKey].Cancel(); + if (CanCancel(cancellationTokenSource)) + { + cancellationTokenSource.Cancel(); + } } } } diff --git a/CDP4JsonFileDal/CDP4JsonFileDal.csproj b/CDP4JsonFileDal/CDP4JsonFileDal.csproj index e08f70c47..e7ed5e2ab 100644 --- a/CDP4JsonFileDal/CDP4JsonFileDal.csproj +++ b/CDP4JsonFileDal/CDP4JsonFileDal.csproj @@ -4,7 +4,7 @@ net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netstandard2.0;netstandard2.1;netcoreapp3.1 RHEA System S.A. CDP4JsonFileDal Community Edition - 8.1.0 + 8.1.1 CDP4 Json File Dal Plugin Copyright © RHEA System S.A. Sam, Merlin, Alex, Naron, Alexander, Yevhen, Nathanael diff --git a/CDP4JsonSerializer.NetCore.Tests/TestData/jsonTestSample.json b/CDP4JsonSerializer.NetCore.Tests/TestData/jsonTestSample.json index 7b8ad8b3c..a054495c0 100644 --- a/CDP4JsonSerializer.NetCore.Tests/TestData/jsonTestSample.json +++ b/CDP4JsonSerializer.NetCore.Tests/TestData/jsonTestSample.json @@ -14,6 +14,7 @@ "name": "test", "shortName": "test1", "alias": [], + "attachment": [], "definition": [], "hyperLink": [ "049abaf8-d550-44b1-b32b-c74b333f5d73" ], "category": [], @@ -37,6 +38,7 @@ "name": "array", "shortName": "array1", "alias": [], + "attachment": [], "definition": [], "hyperLink": [], "isDeprecated": false, diff --git a/CDP4JsonSerializer.Tests/TestData/jsonTestSample.json b/CDP4JsonSerializer.Tests/TestData/jsonTestSample.json index 7b8ad8b3c..755b5967b 100644 --- a/CDP4JsonSerializer.Tests/TestData/jsonTestSample.json +++ b/CDP4JsonSerializer.Tests/TestData/jsonTestSample.json @@ -14,6 +14,7 @@ "name": "test", "shortName": "test1", "alias": [], + "attachment": [], "definition": [], "hyperLink": [ "049abaf8-d550-44b1-b32b-c74b333f5d73" ], "category": [], @@ -37,6 +38,7 @@ "name": "array", "shortName": "array1", "alias": [], + "attachment": [], "definition": [], "hyperLink": [], "isDeprecated": false, diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/ArchitectureDiagramResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/ArchitectureDiagramResolver.cs new file mode 100644 index 000000000..a8abd70cd --- /dev/null +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/ArchitectureDiagramResolver.cs @@ -0,0 +1,118 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4JsonSerializer +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + using Newtonsoft.Json.Linq; + + /// + /// The purpose of the is to deserialize a JSON object to a + /// + public static class ArchitectureDiagramResolver + { + /// + /// Instantiate and deserialize the properties of a + /// + /// The containing the data + /// The to instantiate + public static CDP4Common.DTO.ArchitectureDiagram FromJsonObject(JObject jObject) + { + var iid = jObject["iid"].ToObject(); + var revisionNumber = jObject["revisionNumber"].IsNullOrEmpty() ? 0 : jObject["revisionNumber"].ToObject(); + var architectureDiagram = new CDP4Common.DTO.ArchitectureDiagram(iid, revisionNumber); + + if (!jObject["bounds"].IsNullOrEmpty()) + { + architectureDiagram.Bounds.AddRange(jObject["bounds"].ToObject>()); + } + + if (!jObject["createdOn"].IsNullOrEmpty()) + { + architectureDiagram.CreatedOn = jObject["createdOn"].ToObject(); + } + + if (!jObject["description"].IsNullOrEmpty()) + { + architectureDiagram.Description = jObject["description"].ToObject(); + } + + if (!jObject["diagramElement"].IsNullOrEmpty()) + { + architectureDiagram.DiagramElement.AddRange(jObject["diagramElement"].ToObject>()); + } + + if (!jObject["excludedDomain"].IsNullOrEmpty()) + { + architectureDiagram.ExcludedDomain.AddRange(jObject["excludedDomain"].ToObject>()); + } + + if (!jObject["excludedPerson"].IsNullOrEmpty()) + { + architectureDiagram.ExcludedPerson.AddRange(jObject["excludedPerson"].ToObject>()); + } + + if (!jObject["modifiedOn"].IsNullOrEmpty()) + { + architectureDiagram.ModifiedOn = jObject["modifiedOn"].ToObject(); + } + + if (!jObject["name"].IsNullOrEmpty()) + { + architectureDiagram.Name = jObject["name"].ToObject(); + } + + if (!jObject["owner"].IsNullOrEmpty()) + { + architectureDiagram.Owner = jObject["owner"].ToObject(); + } + + if (!jObject["publicationState"].IsNullOrEmpty()) + { + architectureDiagram.PublicationState = jObject["publicationState"].ToObject(); + } + + if (!jObject["thingPreference"].IsNullOrEmpty()) + { + architectureDiagram.ThingPreference = jObject["thingPreference"].ToObject(); + } + + if (!jObject["topArchitectureElement"].IsNullOrEmpty()) + { + architectureDiagram.TopArchitectureElement = jObject["topArchitectureElement"].ToObject(); + } + + return architectureDiagram; + } + } +} diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/ArchitectureElementResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/ArchitectureElementResolver.cs new file mode 100644 index 000000000..2b116406b --- /dev/null +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/ArchitectureElementResolver.cs @@ -0,0 +1,118 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4JsonSerializer +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + using Newtonsoft.Json.Linq; + + /// + /// The purpose of the is to deserialize a JSON object to a + /// + public static class ArchitectureElementResolver + { + /// + /// Instantiate and deserialize the properties of a + /// + /// The containing the data + /// The to instantiate + public static CDP4Common.DTO.ArchitectureElement FromJsonObject(JObject jObject) + { + var iid = jObject["iid"].ToObject(); + var revisionNumber = jObject["revisionNumber"].IsNullOrEmpty() ? 0 : jObject["revisionNumber"].ToObject(); + var architectureElement = new CDP4Common.DTO.ArchitectureElement(iid, revisionNumber); + + if (!jObject["bounds"].IsNullOrEmpty()) + { + architectureElement.Bounds.AddRange(jObject["bounds"].ToObject>()); + } + + if (!jObject["depictedThing"].IsNullOrEmpty()) + { + architectureElement.DepictedThing = jObject["depictedThing"].ToObject(); + } + + if (!jObject["diagramElement"].IsNullOrEmpty()) + { + architectureElement.DiagramElement.AddRange(jObject["diagramElement"].ToObject>()); + } + + if (!jObject["documentation"].IsNullOrEmpty()) + { + architectureElement.Documentation = jObject["documentation"].ToObject(); + } + + if (!jObject["excludedDomain"].IsNullOrEmpty()) + { + architectureElement.ExcludedDomain.AddRange(jObject["excludedDomain"].ToObject>()); + } + + if (!jObject["excludedPerson"].IsNullOrEmpty()) + { + architectureElement.ExcludedPerson.AddRange(jObject["excludedPerson"].ToObject>()); + } + + if (!jObject["localStyle"].IsNullOrEmpty()) + { + architectureElement.LocalStyle.AddRange(jObject["localStyle"].ToObject>()); + } + + if (!jObject["modifiedOn"].IsNullOrEmpty()) + { + architectureElement.ModifiedOn = jObject["modifiedOn"].ToObject(); + } + + if (!jObject["name"].IsNullOrEmpty()) + { + architectureElement.Name = jObject["name"].ToObject(); + } + + if (!jObject["resolution"].IsNullOrEmpty()) + { + architectureElement.Resolution = jObject["resolution"].ToObject(); + } + + if (!jObject["sharedStyle"].IsNullOrEmpty()) + { + architectureElement.SharedStyle = jObject["sharedStyle"].ToObject(); + } + + if (!jObject["thingPreference"].IsNullOrEmpty()) + { + architectureElement.ThingPreference = jObject["thingPreference"].ToObject(); + } + + return architectureElement; + } + } +} diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/ArrayParameterTypeResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/ArrayParameterTypeResolver.cs index 7490699c6..5db4b9b6c 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/ArrayParameterTypeResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/ArrayParameterTypeResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.ArrayParameterType FromJsonObject(JObject jObject) arrayParameterType.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + arrayParameterType.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { arrayParameterType.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/AttachmentResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/AttachmentResolver.cs new file mode 100644 index 000000000..bf9e9314d --- /dev/null +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/AttachmentResolver.cs @@ -0,0 +1,93 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4JsonSerializer +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + using Newtonsoft.Json.Linq; + + /// + /// The purpose of the is to deserialize a JSON object to a + /// + public static class AttachmentResolver + { + /// + /// Instantiate and deserialize the properties of a + /// + /// The containing the data + /// The to instantiate + public static CDP4Common.DTO.Attachment FromJsonObject(JObject jObject) + { + var iid = jObject["iid"].ToObject(); + var revisionNumber = jObject["revisionNumber"].IsNullOrEmpty() ? 0 : jObject["revisionNumber"].ToObject(); + var attachment = new CDP4Common.DTO.Attachment(iid, revisionNumber); + + if (!jObject["contentHash"].IsNullOrEmpty()) + { + attachment.ContentHash = jObject["contentHash"].ToObject(); + } + + if (!jObject["excludedDomain"].IsNullOrEmpty()) + { + attachment.ExcludedDomain.AddRange(jObject["excludedDomain"].ToObject>()); + } + + if (!jObject["excludedPerson"].IsNullOrEmpty()) + { + attachment.ExcludedPerson.AddRange(jObject["excludedPerson"].ToObject>()); + } + + if (!jObject["fileName"].IsNullOrEmpty()) + { + attachment.FileName = jObject["fileName"].ToObject(); + } + + if (!jObject["fileType"].IsNullOrEmpty()) + { + attachment.FileType.AddRange(jObject["fileType"].ToObject>()); + } + + if (!jObject["modifiedOn"].IsNullOrEmpty()) + { + attachment.ModifiedOn = jObject["modifiedOn"].ToObject(); + } + + if (!jObject["thingPreference"].IsNullOrEmpty()) + { + attachment.ThingPreference = jObject["thingPreference"].ToObject(); + } + + return attachment; + } + } +} diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/BehaviorResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/BehaviorResolver.cs new file mode 100644 index 000000000..d5da497f2 --- /dev/null +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/BehaviorResolver.cs @@ -0,0 +1,123 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4JsonSerializer +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + using Newtonsoft.Json.Linq; + + /// + /// The purpose of the is to deserialize a JSON object to a + /// + public static class BehaviorResolver + { + /// + /// Instantiate and deserialize the properties of a + /// + /// The containing the data + /// The to instantiate + public static CDP4Common.DTO.Behavior FromJsonObject(JObject jObject) + { + var iid = jObject["iid"].ToObject(); + var revisionNumber = jObject["revisionNumber"].IsNullOrEmpty() ? 0 : jObject["revisionNumber"].ToObject(); + var behavior = new CDP4Common.DTO.Behavior(iid, revisionNumber); + + if (!jObject["alias"].IsNullOrEmpty()) + { + behavior.Alias.AddRange(jObject["alias"].ToObject>()); + } + + if (!jObject["attachment"].IsNullOrEmpty()) + { + behavior.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + + if (!jObject["behavioralModelKind"].IsNullOrEmpty()) + { + behavior.BehavioralModelKind = jObject["behavioralModelKind"].ToObject(); + } + + if (!jObject["behavioralParameter"].IsNullOrEmpty()) + { + behavior.BehavioralParameter.AddRange(jObject["behavioralParameter"].ToObject>()); + } + + if (!jObject["definition"].IsNullOrEmpty()) + { + behavior.Definition.AddRange(jObject["definition"].ToObject>()); + } + + if (!jObject["excludedDomain"].IsNullOrEmpty()) + { + behavior.ExcludedDomain.AddRange(jObject["excludedDomain"].ToObject>()); + } + + if (!jObject["excludedPerson"].IsNullOrEmpty()) + { + behavior.ExcludedPerson.AddRange(jObject["excludedPerson"].ToObject>()); + } + + if (!jObject["hyperLink"].IsNullOrEmpty()) + { + behavior.HyperLink.AddRange(jObject["hyperLink"].ToObject>()); + } + + if (!jObject["modifiedOn"].IsNullOrEmpty()) + { + behavior.ModifiedOn = jObject["modifiedOn"].ToObject(); + } + + if (!jObject["name"].IsNullOrEmpty()) + { + behavior.Name = jObject["name"].ToObject(); + } + + if (!jObject["script"].IsNullOrEmpty()) + { + behavior.Script = jObject["script"].ToObject(); + } + + if (!jObject["shortName"].IsNullOrEmpty()) + { + behavior.ShortName = jObject["shortName"].ToObject(); + } + + if (!jObject["thingPreference"].IsNullOrEmpty()) + { + behavior.ThingPreference = jObject["thingPreference"].ToObject(); + } + + return behavior; + } + } +} diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/BehavioralParameterResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/BehavioralParameterResolver.cs new file mode 100644 index 000000000..dc937120d --- /dev/null +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/BehavioralParameterResolver.cs @@ -0,0 +1,93 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4JsonSerializer +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + using Newtonsoft.Json.Linq; + + /// + /// The purpose of the is to deserialize a JSON object to a + /// + public static class BehavioralParameterResolver + { + /// + /// Instantiate and deserialize the properties of a + /// + /// The containing the data + /// The to instantiate + public static CDP4Common.DTO.BehavioralParameter FromJsonObject(JObject jObject) + { + var iid = jObject["iid"].ToObject(); + var revisionNumber = jObject["revisionNumber"].IsNullOrEmpty() ? 0 : jObject["revisionNumber"].ToObject(); + var behavioralParameter = new CDP4Common.DTO.BehavioralParameter(iid, revisionNumber); + + if (!jObject["behavioralParameterKind"].IsNullOrEmpty()) + { + behavioralParameter.BehavioralParameterKind = jObject["behavioralParameterKind"].ToObject(); + } + + if (!jObject["excludedDomain"].IsNullOrEmpty()) + { + behavioralParameter.ExcludedDomain.AddRange(jObject["excludedDomain"].ToObject>()); + } + + if (!jObject["excludedPerson"].IsNullOrEmpty()) + { + behavioralParameter.ExcludedPerson.AddRange(jObject["excludedPerson"].ToObject>()); + } + + if (!jObject["modifiedOn"].IsNullOrEmpty()) + { + behavioralParameter.ModifiedOn = jObject["modifiedOn"].ToObject(); + } + + if (!jObject["parameter"].IsNullOrEmpty()) + { + behavioralParameter.Parameter = jObject["parameter"].ToObject(); + } + + if (!jObject["thingPreference"].IsNullOrEmpty()) + { + behavioralParameter.ThingPreference = jObject["thingPreference"].ToObject(); + } + + if (!jObject["variableName"].IsNullOrEmpty()) + { + behavioralParameter.VariableName = jObject["variableName"].ToObject(); + } + + return behavioralParameter; + } + } +} diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/BinaryRelationshipRuleResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/BinaryRelationshipRuleResolver.cs index d031a1f87..450bc2f56 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/BinaryRelationshipRuleResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/BinaryRelationshipRuleResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.BinaryRelationshipRule FromJsonObject(JObject jObje binaryRelationshipRule.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + binaryRelationshipRule.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { binaryRelationshipRule.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/BooleanParameterTypeResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/BooleanParameterTypeResolver.cs index a7e88cab0..60e25f90c 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/BooleanParameterTypeResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/BooleanParameterTypeResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.BooleanParameterType FromJsonObject(JObject jObject booleanParameterType.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + booleanParameterType.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { booleanParameterType.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/CategoryResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/CategoryResolver.cs index 9320ccf8d..c0a754b10 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/CategoryResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/CategoryResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.Category FromJsonObject(JObject jObject) category.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + category.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { category.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/CompoundParameterTypeResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/CompoundParameterTypeResolver.cs index f897de0a0..b0bb28a93 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/CompoundParameterTypeResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/CompoundParameterTypeResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.CompoundParameterType FromJsonObject(JObject jObjec compoundParameterType.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + compoundParameterType.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { compoundParameterType.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/ConstantResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/ConstantResolver.cs index 0d1e7a724..38a057dd2 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/ConstantResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/ConstantResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.Constant FromJsonObject(JObject jObject) constant.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + constant.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { constant.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/CyclicRatioScaleResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/CyclicRatioScaleResolver.cs index b989471c8..6552d34e1 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/CyclicRatioScaleResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/CyclicRatioScaleResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.CyclicRatioScale FromJsonObject(JObject jObject) cyclicRatioScale.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + cyclicRatioScale.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { cyclicRatioScale.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/DateParameterTypeResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/DateParameterTypeResolver.cs index d59cbbcd1..049ddf9ee 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/DateParameterTypeResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/DateParameterTypeResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.DateParameterType FromJsonObject(JObject jObject) dateParameterType.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + dateParameterType.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { dateParameterType.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/DateTimeParameterTypeResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/DateTimeParameterTypeResolver.cs index 2d02db788..486e0eeac 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/DateTimeParameterTypeResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/DateTimeParameterTypeResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.DateTimeParameterType FromJsonObject(JObject jObjec dateTimeParameterType.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + dateTimeParameterType.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { dateTimeParameterType.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/DecompositionRuleResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/DecompositionRuleResolver.cs index d6a1a0538..90a733837 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/DecompositionRuleResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/DecompositionRuleResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.DecompositionRule FromJsonObject(JObject jObject) decompositionRule.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + decompositionRule.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["containedCategory"].IsNullOrEmpty()) { decompositionRule.ContainedCategory.AddRange(jObject["containedCategory"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/DerivedQuantityKindResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/DerivedQuantityKindResolver.cs index 08b4a07bd..82d8686ad 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/DerivedQuantityKindResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/DerivedQuantityKindResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.DerivedQuantityKind FromJsonObject(JObject jObject) derivedQuantityKind.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + derivedQuantityKind.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { derivedQuantityKind.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/DerivedUnitResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/DerivedUnitResolver.cs index 12ea269d2..b5122e893 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/DerivedUnitResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/DerivedUnitResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.DerivedUnit FromJsonObject(JObject jObject) derivedUnit.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + derivedUnit.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { derivedUnit.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/DiagramCanvasResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/DiagramCanvasResolver.cs index b70a5c2dd..3d17fea45 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/DiagramCanvasResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/DiagramCanvasResolver.cs @@ -62,6 +62,11 @@ public static CDP4Common.DTO.DiagramCanvas FromJsonObject(JObject jObject) diagramCanvas.CreatedOn = jObject["createdOn"].ToObject(); } + if (!jObject["description"].IsNullOrEmpty()) + { + diagramCanvas.Description = jObject["description"].ToObject(); + } + if (!jObject["diagramElement"].IsNullOrEmpty()) { diagramCanvas.DiagramElement.AddRange(jObject["diagramElement"].ToObject>()); @@ -87,6 +92,11 @@ public static CDP4Common.DTO.DiagramCanvas FromJsonObject(JObject jObject) diagramCanvas.Name = jObject["name"].ToObject(); } + if (!jObject["publicationState"].IsNullOrEmpty()) + { + diagramCanvas.PublicationState = jObject["publicationState"].ToObject(); + } + if (!jObject["thingPreference"].IsNullOrEmpty()) { diagramCanvas.ThingPreference = jObject["thingPreference"].ToObject(); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/DiagramFrameResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/DiagramFrameResolver.cs new file mode 100644 index 000000000..bd33b7085 --- /dev/null +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/DiagramFrameResolver.cs @@ -0,0 +1,108 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4JsonSerializer +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + using Newtonsoft.Json.Linq; + + /// + /// The purpose of the is to deserialize a JSON object to a + /// + public static class DiagramFrameResolver + { + /// + /// Instantiate and deserialize the properties of a + /// + /// The containing the data + /// The to instantiate + public static CDP4Common.DTO.DiagramFrame FromJsonObject(JObject jObject) + { + var iid = jObject["iid"].ToObject(); + var revisionNumber = jObject["revisionNumber"].IsNullOrEmpty() ? 0 : jObject["revisionNumber"].ToObject(); + var diagramFrame = new CDP4Common.DTO.DiagramFrame(iid, revisionNumber); + + if (!jObject["bounds"].IsNullOrEmpty()) + { + diagramFrame.Bounds.AddRange(jObject["bounds"].ToObject>()); + } + + if (!jObject["depictedThing"].IsNullOrEmpty()) + { + diagramFrame.DepictedThing = jObject["depictedThing"].ToObject(); + } + + if (!jObject["diagramElement"].IsNullOrEmpty()) + { + diagramFrame.DiagramElement.AddRange(jObject["diagramElement"].ToObject>()); + } + + if (!jObject["excludedDomain"].IsNullOrEmpty()) + { + diagramFrame.ExcludedDomain.AddRange(jObject["excludedDomain"].ToObject>()); + } + + if (!jObject["excludedPerson"].IsNullOrEmpty()) + { + diagramFrame.ExcludedPerson.AddRange(jObject["excludedPerson"].ToObject>()); + } + + if (!jObject["localStyle"].IsNullOrEmpty()) + { + diagramFrame.LocalStyle.AddRange(jObject["localStyle"].ToObject>()); + } + + if (!jObject["modifiedOn"].IsNullOrEmpty()) + { + diagramFrame.ModifiedOn = jObject["modifiedOn"].ToObject(); + } + + if (!jObject["name"].IsNullOrEmpty()) + { + diagramFrame.Name = jObject["name"].ToObject(); + } + + if (!jObject["sharedStyle"].IsNullOrEmpty()) + { + diagramFrame.SharedStyle = jObject["sharedStyle"].ToObject(); + } + + if (!jObject["thingPreference"].IsNullOrEmpty()) + { + diagramFrame.ThingPreference = jObject["thingPreference"].ToObject(); + } + + return diagramFrame; + } + } +} diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/DiagramPortResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/DiagramPortResolver.cs new file mode 100644 index 000000000..876a64983 --- /dev/null +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/DiagramPortResolver.cs @@ -0,0 +1,108 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4JsonSerializer +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using CDP4Common.CommonData; + using CDP4Common.DiagramData; + using CDP4Common.EngineeringModelData; + using CDP4Common.ReportingData; + using CDP4Common.SiteDirectoryData; + using CDP4Common.Types; + using Newtonsoft.Json.Linq; + + /// + /// The purpose of the is to deserialize a JSON object to a + /// + public static class DiagramPortResolver + { + /// + /// Instantiate and deserialize the properties of a + /// + /// The containing the data + /// The to instantiate + public static CDP4Common.DTO.DiagramPort FromJsonObject(JObject jObject) + { + var iid = jObject["iid"].ToObject(); + var revisionNumber = jObject["revisionNumber"].IsNullOrEmpty() ? 0 : jObject["revisionNumber"].ToObject(); + var diagramPort = new CDP4Common.DTO.DiagramPort(iid, revisionNumber); + + if (!jObject["bounds"].IsNullOrEmpty()) + { + diagramPort.Bounds.AddRange(jObject["bounds"].ToObject>()); + } + + if (!jObject["depictedThing"].IsNullOrEmpty()) + { + diagramPort.DepictedThing = jObject["depictedThing"].ToObject(); + } + + if (!jObject["diagramElement"].IsNullOrEmpty()) + { + diagramPort.DiagramElement.AddRange(jObject["diagramElement"].ToObject>()); + } + + if (!jObject["excludedDomain"].IsNullOrEmpty()) + { + diagramPort.ExcludedDomain.AddRange(jObject["excludedDomain"].ToObject>()); + } + + if (!jObject["excludedPerson"].IsNullOrEmpty()) + { + diagramPort.ExcludedPerson.AddRange(jObject["excludedPerson"].ToObject>()); + } + + if (!jObject["localStyle"].IsNullOrEmpty()) + { + diagramPort.LocalStyle.AddRange(jObject["localStyle"].ToObject>()); + } + + if (!jObject["modifiedOn"].IsNullOrEmpty()) + { + diagramPort.ModifiedOn = jObject["modifiedOn"].ToObject(); + } + + if (!jObject["name"].IsNullOrEmpty()) + { + diagramPort.Name = jObject["name"].ToObject(); + } + + if (!jObject["sharedStyle"].IsNullOrEmpty()) + { + diagramPort.SharedStyle = jObject["sharedStyle"].ToObject(); + } + + if (!jObject["thingPreference"].IsNullOrEmpty()) + { + diagramPort.ThingPreference = jObject["thingPreference"].ToObject(); + } + + return diagramPort; + } + } +} diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/DomainOfExpertiseGroupResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/DomainOfExpertiseGroupResolver.cs index 3ec7b33a2..1485a2154 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/DomainOfExpertiseGroupResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/DomainOfExpertiseGroupResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.DomainOfExpertiseGroup FromJsonObject(JObject jObje domainOfExpertiseGroup.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + domainOfExpertiseGroup.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { domainOfExpertiseGroup.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/DomainOfExpertiseResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/DomainOfExpertiseResolver.cs index 634ed4fae..e97a51660 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/DomainOfExpertiseResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/DomainOfExpertiseResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.DomainOfExpertise FromJsonObject(JObject jObject) domainOfExpertise.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + domainOfExpertise.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { domainOfExpertise.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/DtoFactory.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/DtoFactory.cs index ed1a30614..cb0daaa41 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/DtoFactory.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/DtoFactory.cs @@ -45,7 +45,12 @@ public static class DtoFactory { "Alias", AliasResolver.FromJsonObject }, { "AndExpression", AndExpressionResolver.FromJsonObject }, { "Approval", ApprovalResolver.FromJsonObject }, + { "ArchitectureDiagram", ArchitectureDiagramResolver.FromJsonObject }, + { "ArchitectureElement", ArchitectureElementResolver.FromJsonObject }, { "ArrayParameterType", ArrayParameterTypeResolver.FromJsonObject }, + { "Attachment", AttachmentResolver.FromJsonObject }, + { "Behavior", BehaviorResolver.FromJsonObject }, + { "BehavioralParameter", BehavioralParameterResolver.FromJsonObject }, { "BinaryNote", BinaryNoteResolver.FromJsonObject }, { "BinaryRelationship", BinaryRelationshipResolver.FromJsonObject }, { "BinaryRelationshipRule", BinaryRelationshipRuleResolver.FromJsonObject }, @@ -72,7 +77,9 @@ public static class DtoFactory { "DerivedUnit", DerivedUnitResolver.FromJsonObject }, { "DiagramCanvas", DiagramCanvasResolver.FromJsonObject }, { "DiagramEdge", DiagramEdgeResolver.FromJsonObject }, + { "DiagramFrame", DiagramFrameResolver.FromJsonObject }, { "DiagramObject", DiagramObjectResolver.FromJsonObject }, + { "DiagramPort", DiagramPortResolver.FromJsonObject }, { "DomainFileStore", DomainFileStoreResolver.FromJsonObject }, { "DomainOfExpertise", DomainOfExpertiseResolver.FromJsonObject }, { "DomainOfExpertiseGroup", DomainOfExpertiseGroupResolver.FromJsonObject }, diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/ElementDefinitionResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/ElementDefinitionResolver.cs index 65e627b48..d1f4b79d8 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/ElementDefinitionResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/ElementDefinitionResolver.cs @@ -57,6 +57,16 @@ public static CDP4Common.DTO.ElementDefinition FromJsonObject(JObject jObject) elementDefinition.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + elementDefinition.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + + if (!jObject["behavior"].IsNullOrEmpty()) + { + elementDefinition.Behavior.AddRange(jObject["behavior"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { elementDefinition.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/ElementUsageResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/ElementUsageResolver.cs index 37a588ed5..4bec8df4c 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/ElementUsageResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/ElementUsageResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.ElementUsage FromJsonObject(JObject jObject) elementUsage.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + elementUsage.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { elementUsage.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/EngineeringModelSetupResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/EngineeringModelSetupResolver.cs index fe018c00d..cd0521e04 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/EngineeringModelSetupResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/EngineeringModelSetupResolver.cs @@ -62,6 +62,11 @@ public static CDP4Common.DTO.EngineeringModelSetup FromJsonObject(JObject jObjec engineeringModelSetup.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + engineeringModelSetup.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["defaultOrganizationalParticipant"].IsNullOrEmpty()) { engineeringModelSetup.DefaultOrganizationalParticipant = jObject["defaultOrganizationalParticipant"].ToObject(); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/EnumerationParameterTypeResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/EnumerationParameterTypeResolver.cs index ceefb5584..e42473dbc 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/EnumerationParameterTypeResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/EnumerationParameterTypeResolver.cs @@ -62,6 +62,11 @@ public static CDP4Common.DTO.EnumerationParameterType FromJsonObject(JObject jOb enumerationParameterType.AllowMultiSelect = jObject["allowMultiSelect"].ToObject(); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + enumerationParameterType.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { enumerationParameterType.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/EnumerationValueDefinitionResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/EnumerationValueDefinitionResolver.cs index 4380c3b36..1137a40db 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/EnumerationValueDefinitionResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/EnumerationValueDefinitionResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.EnumerationValueDefinition FromJsonObject(JObject j enumerationValueDefinition.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + enumerationValueDefinition.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { enumerationValueDefinition.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/FileTypeResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/FileTypeResolver.cs index 9314afe97..d4287707f 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/FileTypeResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/FileTypeResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.FileType FromJsonObject(JObject jObject) fileType.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + fileType.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { fileType.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/GlossaryResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/GlossaryResolver.cs index 33a899b73..037260228 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/GlossaryResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/GlossaryResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.Glossary FromJsonObject(JObject jObject) glossary.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + glossary.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { glossary.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/GoalResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/GoalResolver.cs index cf9f3ccb9..199149e82 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/GoalResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/GoalResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.Goal FromJsonObject(JObject jObject) goal.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + goal.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { goal.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/IntervalScaleResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/IntervalScaleResolver.cs index 911f210e3..af7077aff 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/IntervalScaleResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/IntervalScaleResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.IntervalScale FromJsonObject(JObject jObject) intervalScale.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + intervalScale.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { intervalScale.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/LinearConversionUnitResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/LinearConversionUnitResolver.cs index a08d5439d..6b07681f8 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/LinearConversionUnitResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/LinearConversionUnitResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.LinearConversionUnit FromJsonObject(JObject jObject linearConversionUnit.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + linearConversionUnit.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["conversionFactor"].IsNullOrEmpty()) { linearConversionUnit.ConversionFactor = jObject["conversionFactor"].ToObject(); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/LogarithmicScaleResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/LogarithmicScaleResolver.cs index ba4052188..3ebeb6afb 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/LogarithmicScaleResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/LogarithmicScaleResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.LogarithmicScale FromJsonObject(JObject jObject) logarithmicScale.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + logarithmicScale.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { logarithmicScale.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/ModelReferenceDataLibraryResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/ModelReferenceDataLibraryResolver.cs index ec88f1ada..b6c509c37 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/ModelReferenceDataLibraryResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/ModelReferenceDataLibraryResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.ModelReferenceDataLibrary FromJsonObject(JObject jO modelReferenceDataLibrary.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + modelReferenceDataLibrary.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["baseQuantityKind"].IsNullOrEmpty()) { modelReferenceDataLibrary.BaseQuantityKind.AddRange(jObject["baseQuantityKind"].ToOrderedItemCollection()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/MultiRelationshipRuleResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/MultiRelationshipRuleResolver.cs index a18f6f8a2..f479707ec 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/MultiRelationshipRuleResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/MultiRelationshipRuleResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.MultiRelationshipRule FromJsonObject(JObject jObjec multiRelationshipRule.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + multiRelationshipRule.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { multiRelationshipRule.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/OptionResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/OptionResolver.cs index 524e66495..5472e9231 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/OptionResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/OptionResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.Option FromJsonObject(JObject jObject) option.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + option.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { option.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/OrdinalScaleResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/OrdinalScaleResolver.cs index 4b8bec84d..02010fe50 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/OrdinalScaleResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/OrdinalScaleResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.OrdinalScale FromJsonObject(JObject jObject) ordinalScale.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + ordinalScale.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { ordinalScale.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/ParameterizedCategoryRuleResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/ParameterizedCategoryRuleResolver.cs index 78195ed02..6e5e86d40 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/ParameterizedCategoryRuleResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/ParameterizedCategoryRuleResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.ParameterizedCategoryRule FromJsonObject(JObject jO parameterizedCategoryRule.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + parameterizedCategoryRule.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { parameterizedCategoryRule.Category = jObject["category"].ToObject(); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/ParticipantRoleResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/ParticipantRoleResolver.cs index f31c971d4..9a5206a17 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/ParticipantRoleResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/ParticipantRoleResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.ParticipantRole FromJsonObject(JObject jObject) participantRole.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + participantRole.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { participantRole.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/PersonRoleResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/PersonRoleResolver.cs index f1d6063ed..9f733f7fb 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/PersonRoleResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/PersonRoleResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.PersonRole FromJsonObject(JObject jObject) personRole.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + personRole.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { personRole.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/PossibleFiniteStateListResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/PossibleFiniteStateListResolver.cs index a2e9db452..c1f319bbf 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/PossibleFiniteStateListResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/PossibleFiniteStateListResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.PossibleFiniteStateList FromJsonObject(JObject jObj possibleFiniteStateList.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + possibleFiniteStateList.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { possibleFiniteStateList.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/PossibleFiniteStateResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/PossibleFiniteStateResolver.cs index f2e3eee97..93b03a515 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/PossibleFiniteStateResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/PossibleFiniteStateResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.PossibleFiniteState FromJsonObject(JObject jObject) possibleFiniteState.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + possibleFiniteState.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { possibleFiniteState.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/PrefixedUnitResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/PrefixedUnitResolver.cs index b6ac0ee75..36a196ac7 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/PrefixedUnitResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/PrefixedUnitResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.PrefixedUnit FromJsonObject(JObject jObject) prefixedUnit.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + prefixedUnit.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { prefixedUnit.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/RatioScaleResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/RatioScaleResolver.cs index 1b66b55f9..12f64ea33 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/RatioScaleResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/RatioScaleResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.RatioScale FromJsonObject(JObject jObject) ratioScale.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + ratioScale.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { ratioScale.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/ReferenceSourceResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/ReferenceSourceResolver.cs index 9f1eb01b2..b57bce107 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/ReferenceSourceResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/ReferenceSourceResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.ReferenceSource FromJsonObject(JObject jObject) referenceSource.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + referenceSource.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["author"].IsNullOrEmpty()) { referenceSource.Author = jObject["author"].ToObject(); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/ReferencerRuleResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/ReferencerRuleResolver.cs index c606b0b7d..ea7d491eb 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/ReferencerRuleResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/ReferencerRuleResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.ReferencerRule FromJsonObject(JObject jObject) referencerRule.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + referencerRule.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { referencerRule.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/RequirementResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/RequirementResolver.cs index a12e1ff1f..eab04bdcc 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/RequirementResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/RequirementResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.Requirement FromJsonObject(JObject jObject) requirement.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + requirement.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { requirement.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/RequirementsGroupResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/RequirementsGroupResolver.cs index 01ca51b1b..e60234ba6 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/RequirementsGroupResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/RequirementsGroupResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.RequirementsGroup FromJsonObject(JObject jObject) requirementsGroup.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + requirementsGroup.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { requirementsGroup.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/RequirementsSpecificationResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/RequirementsSpecificationResolver.cs index 7c12f7a84..ed1400c5b 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/RequirementsSpecificationResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/RequirementsSpecificationResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.RequirementsSpecification FromJsonObject(JObject jO requirementsSpecification.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + requirementsSpecification.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { requirementsSpecification.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/RuleVerificationListResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/RuleVerificationListResolver.cs index cb6b93379..600e339c3 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/RuleVerificationListResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/RuleVerificationListResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.RuleVerificationList FromJsonObject(JObject jObject ruleVerificationList.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + ruleVerificationList.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { ruleVerificationList.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/SampledFunctionParameterTypeResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/SampledFunctionParameterTypeResolver.cs index ceed4330f..43bfd540a 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/SampledFunctionParameterTypeResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/SampledFunctionParameterTypeResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.SampledFunctionParameterType FromJsonObject(JObject sampledFunctionParameterType.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + sampledFunctionParameterType.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { sampledFunctionParameterType.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/ScaleValueDefinitionResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/ScaleValueDefinitionResolver.cs index 4991474ff..37c5b2678 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/ScaleValueDefinitionResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/ScaleValueDefinitionResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.ScaleValueDefinition FromJsonObject(JObject jObject scaleValueDefinition.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + scaleValueDefinition.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { scaleValueDefinition.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/SimpleQuantityKindResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/SimpleQuantityKindResolver.cs index 6cb5019c7..99c0bda89 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/SimpleQuantityKindResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/SimpleQuantityKindResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.SimpleQuantityKind FromJsonObject(JObject jObject) simpleQuantityKind.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + simpleQuantityKind.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { simpleQuantityKind.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/SimpleUnitResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/SimpleUnitResolver.cs index e35c392aa..062496d43 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/SimpleUnitResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/SimpleUnitResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.SimpleUnit FromJsonObject(JObject jObject) simpleUnit.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + simpleUnit.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { simpleUnit.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/SiteReferenceDataLibraryResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/SiteReferenceDataLibraryResolver.cs index 51ac0828b..a7285d65e 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/SiteReferenceDataLibraryResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/SiteReferenceDataLibraryResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.SiteReferenceDataLibrary FromJsonObject(JObject jOb siteReferenceDataLibrary.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + siteReferenceDataLibrary.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["baseQuantityKind"].IsNullOrEmpty()) { siteReferenceDataLibrary.BaseQuantityKind.AddRange(jObject["baseQuantityKind"].ToOrderedItemCollection()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/SpecializedQuantityKindResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/SpecializedQuantityKindResolver.cs index 480dea2b9..7069ec28c 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/SpecializedQuantityKindResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/SpecializedQuantityKindResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.SpecializedQuantityKind FromJsonObject(JObject jObj specializedQuantityKind.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + specializedQuantityKind.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { specializedQuantityKind.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/StakeHolderValueMapResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/StakeHolderValueMapResolver.cs index 489e576e0..19b4a1204 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/StakeHolderValueMapResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/StakeHolderValueMapResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.StakeHolderValueMap FromJsonObject(JObject jObject) stakeHolderValueMap.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + stakeHolderValueMap.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { stakeHolderValueMap.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/StakeholderResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/StakeholderResolver.cs index bf7e993c4..a9be5ff4b 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/StakeholderResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/StakeholderResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.Stakeholder FromJsonObject(JObject jObject) stakeholder.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + stakeholder.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { stakeholder.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/StakeholderValueResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/StakeholderValueResolver.cs index 167266383..72447a638 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/StakeholderValueResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/StakeholderValueResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.StakeholderValue FromJsonObject(JObject jObject) stakeholderValue.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + stakeholderValue.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { stakeholderValue.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/TermResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/TermResolver.cs index af098c0c6..7ecbb38d7 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/TermResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/TermResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.Term FromJsonObject(JObject jObject) term.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + term.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["definition"].IsNullOrEmpty()) { term.Definition.AddRange(jObject["definition"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/TextParameterTypeResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/TextParameterTypeResolver.cs index fd6e9dde0..54d451f4f 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/TextParameterTypeResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/TextParameterTypeResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.TextParameterType FromJsonObject(JObject jObject) textParameterType.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + textParameterType.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { textParameterType.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/TimeOfDayParameterTypeResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/TimeOfDayParameterTypeResolver.cs index 3c4b3ecae..5fa7d2583 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/TimeOfDayParameterTypeResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/TimeOfDayParameterTypeResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.TimeOfDayParameterType FromJsonObject(JObject jObje timeOfDayParameterType.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + timeOfDayParameterType.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { timeOfDayParameterType.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/UnitPrefixResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/UnitPrefixResolver.cs index 5b8628831..6593b3430 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/UnitPrefixResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/UnitPrefixResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.UnitPrefix FromJsonObject(JObject jObject) unitPrefix.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + unitPrefix.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["conversionFactor"].IsNullOrEmpty()) { unitPrefix.ConversionFactor = jObject["conversionFactor"].ToObject(); diff --git a/CDP4JsonSerializer/AutoGenDtoDeserializer/ValueGroupResolver.cs b/CDP4JsonSerializer/AutoGenDtoDeserializer/ValueGroupResolver.cs index acbc085fe..d34a318e6 100644 --- a/CDP4JsonSerializer/AutoGenDtoDeserializer/ValueGroupResolver.cs +++ b/CDP4JsonSerializer/AutoGenDtoDeserializer/ValueGroupResolver.cs @@ -57,6 +57,11 @@ public static CDP4Common.DTO.ValueGroup FromJsonObject(JObject jObject) valueGroup.Alias.AddRange(jObject["alias"].ToObject>()); } + if (!jObject["attachment"].IsNullOrEmpty()) + { + valueGroup.Attachment.AddRange(jObject["attachment"].ToObject>()); + } + if (!jObject["category"].IsNullOrEmpty()) { valueGroup.Category.AddRange(jObject["category"].ToObject>()); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/ArchitectureDiagramSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/ArchitectureDiagramSerializer.cs new file mode 100644 index 000000000..36d0c9661 --- /dev/null +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/ArchitectureDiagramSerializer.cs @@ -0,0 +1,117 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4JsonSerializer +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using CDP4Common.DTO; + using CDP4Common.Types; + using Newtonsoft.Json.Linq; + + /// + /// The purpose of the class is to provide a specific serializer + /// + public class ArchitectureDiagramSerializer : BaseThingSerializer, IThingSerializer + { + /// + /// The map containing the serialization methods + /// + private readonly Dictionary> propertySerializerMap = new Dictionary> + { + { "bounds", bounds => new JArray(bounds) }, + { "classKind", classKind => new JValue(classKind.ToString()) }, + { "createdOn", createdOn => new JValue(((DateTime)createdOn).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")) }, + { "description", description => new JValue(description) }, + { "diagramElement", diagramElement => new JArray(diagramElement) }, + { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, + { "excludedPerson", excludedPerson => new JArray(excludedPerson) }, + { "iid", iid => new JValue(iid) }, + { "modifiedOn", modifiedOn => new JValue(((DateTime)modifiedOn).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")) }, + { "name", name => new JValue(name) }, + { "owner", owner => new JValue(owner) }, + { "publicationState", publicationState => new JValue(publicationState.ToString()) }, + { "revisionNumber", revisionNumber => new JValue(revisionNumber) }, + { "thingPreference", thingPreference => new JValue(thingPreference) }, + { "topArchitectureElement", topArchitectureElement => new JValue(topArchitectureElement) }, + }; + + /// + /// Serialize the + /// + /// The to serialize + /// The + private JObject Serialize(ArchitectureDiagram architectureDiagram) + { + var jsonObject = new JObject(); + jsonObject.Add("bounds", this.PropertySerializerMap["bounds"](architectureDiagram.Bounds)); + jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), architectureDiagram.ClassKind))); + jsonObject.Add("createdOn", this.PropertySerializerMap["createdOn"](architectureDiagram.CreatedOn)); + jsonObject.Add("description", this.PropertySerializerMap["description"](architectureDiagram.Description)); + jsonObject.Add("diagramElement", this.PropertySerializerMap["diagramElement"](architectureDiagram.DiagramElement.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](architectureDiagram.ExcludedDomain.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("excludedPerson", this.PropertySerializerMap["excludedPerson"](architectureDiagram.ExcludedPerson.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("iid", this.PropertySerializerMap["iid"](architectureDiagram.Iid)); + jsonObject.Add("modifiedOn", this.PropertySerializerMap["modifiedOn"](architectureDiagram.ModifiedOn)); + jsonObject.Add("name", this.PropertySerializerMap["name"](architectureDiagram.Name)); + jsonObject.Add("owner", this.PropertySerializerMap["owner"](architectureDiagram.Owner)); + jsonObject.Add("publicationState", this.PropertySerializerMap["publicationState"](Enum.GetName(typeof(CDP4Common.DiagramData.PublicationState), architectureDiagram.PublicationState))); + jsonObject.Add("revisionNumber", this.PropertySerializerMap["revisionNumber"](architectureDiagram.RevisionNumber)); + jsonObject.Add("thingPreference", this.PropertySerializerMap["thingPreference"](architectureDiagram.ThingPreference)); + jsonObject.Add("topArchitectureElement", this.PropertySerializerMap["topArchitectureElement"](architectureDiagram.TopArchitectureElement)); + return jsonObject; + } + + /// + /// Gets the map containing the serialization method for each property of the class. + /// + public IReadOnlyDictionary> PropertySerializerMap + { + get { return this.propertySerializerMap; } + } + + /// + /// Serialize the to JObject + /// + /// The to serialize + /// The + public JObject Serialize(Thing thing) + { + if (thing == null) + { + throw new ArgumentNullException($"The {nameof(thing)} may not be null.", nameof(thing)); + } + + var architectureDiagram = thing as ArchitectureDiagram; + if (architectureDiagram == null) + { + throw new InvalidOperationException("The thing is not a ArchitectureDiagram."); + } + + return this.Serialize(architectureDiagram); + } + } +} diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/ArchitectureElementSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/ArchitectureElementSerializer.cs new file mode 100644 index 000000000..c3771c4f9 --- /dev/null +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/ArchitectureElementSerializer.cs @@ -0,0 +1,117 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4JsonSerializer +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using CDP4Common.DTO; + using CDP4Common.Types; + using Newtonsoft.Json.Linq; + + /// + /// The purpose of the class is to provide a specific serializer + /// + public class ArchitectureElementSerializer : BaseThingSerializer, IThingSerializer + { + /// + /// The map containing the serialization methods + /// + private readonly Dictionary> propertySerializerMap = new Dictionary> + { + { "bounds", bounds => new JArray(bounds) }, + { "classKind", classKind => new JValue(classKind.ToString()) }, + { "depictedThing", depictedThing => new JValue(depictedThing) }, + { "diagramElement", diagramElement => new JArray(diagramElement) }, + { "documentation", documentation => new JValue(documentation) }, + { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, + { "excludedPerson", excludedPerson => new JArray(excludedPerson) }, + { "iid", iid => new JValue(iid) }, + { "localStyle", localStyle => new JArray(localStyle) }, + { "modifiedOn", modifiedOn => new JValue(((DateTime)modifiedOn).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")) }, + { "name", name => new JValue(name) }, + { "resolution", resolution => new JValue(resolution) }, + { "revisionNumber", revisionNumber => new JValue(revisionNumber) }, + { "sharedStyle", sharedStyle => new JValue(sharedStyle) }, + { "thingPreference", thingPreference => new JValue(thingPreference) }, + }; + + /// + /// Serialize the + /// + /// The to serialize + /// The + private JObject Serialize(ArchitectureElement architectureElement) + { + var jsonObject = new JObject(); + jsonObject.Add("bounds", this.PropertySerializerMap["bounds"](architectureElement.Bounds)); + jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), architectureElement.ClassKind))); + jsonObject.Add("depictedThing", this.PropertySerializerMap["depictedThing"](architectureElement.DepictedThing)); + jsonObject.Add("diagramElement", this.PropertySerializerMap["diagramElement"](architectureElement.DiagramElement.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("documentation", this.PropertySerializerMap["documentation"](architectureElement.Documentation)); + jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](architectureElement.ExcludedDomain.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("excludedPerson", this.PropertySerializerMap["excludedPerson"](architectureElement.ExcludedPerson.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("iid", this.PropertySerializerMap["iid"](architectureElement.Iid)); + jsonObject.Add("localStyle", this.PropertySerializerMap["localStyle"](architectureElement.LocalStyle)); + jsonObject.Add("modifiedOn", this.PropertySerializerMap["modifiedOn"](architectureElement.ModifiedOn)); + jsonObject.Add("name", this.PropertySerializerMap["name"](architectureElement.Name)); + jsonObject.Add("resolution", this.PropertySerializerMap["resolution"](architectureElement.Resolution)); + jsonObject.Add("revisionNumber", this.PropertySerializerMap["revisionNumber"](architectureElement.RevisionNumber)); + jsonObject.Add("sharedStyle", this.PropertySerializerMap["sharedStyle"](architectureElement.SharedStyle)); + jsonObject.Add("thingPreference", this.PropertySerializerMap["thingPreference"](architectureElement.ThingPreference)); + return jsonObject; + } + + /// + /// Gets the map containing the serialization method for each property of the class. + /// + public IReadOnlyDictionary> PropertySerializerMap + { + get { return this.propertySerializerMap; } + } + + /// + /// Serialize the to JObject + /// + /// The to serialize + /// The + public JObject Serialize(Thing thing) + { + if (thing == null) + { + throw new ArgumentNullException($"The {nameof(thing)} may not be null.", nameof(thing)); + } + + var architectureElement = thing as ArchitectureElement; + if (architectureElement == null) + { + throw new InvalidOperationException("The thing is not a ArchitectureElement."); + } + + return this.Serialize(architectureElement); + } + } +} diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/ArrayParameterTypeSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/ArrayParameterTypeSerializer.cs index 78e29fad9..cfe619969 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/ArrayParameterTypeSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/ArrayParameterTypeSerializer.cs @@ -43,6 +43,7 @@ public class ArrayParameterTypeSerializer : BaseThingSerializer, IThingSerialize private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "component", component => new JArray(((IEnumerable)component).Cast().Select(x => x.ToJsonObject())) }, @@ -72,6 +73,7 @@ private JObject Serialize(ArrayParameterType arrayParameterType) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](arrayParameterType.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](arrayParameterType.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](arrayParameterType.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), arrayParameterType.ClassKind))); jsonObject.Add("component", this.PropertySerializerMap["component"](arrayParameterType.Component.OrderBy(x => x, this.orderedItemComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/AttachmentSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/AttachmentSerializer.cs new file mode 100644 index 000000000..5134d3db2 --- /dev/null +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/AttachmentSerializer.cs @@ -0,0 +1,107 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4JsonSerializer +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using CDP4Common.DTO; + using CDP4Common.Types; + using Newtonsoft.Json.Linq; + + /// + /// The purpose of the class is to provide a specific serializer + /// + public class AttachmentSerializer : BaseThingSerializer, IThingSerializer + { + /// + /// The map containing the serialization methods + /// + private readonly Dictionary> propertySerializerMap = new Dictionary> + { + { "classKind", classKind => new JValue(classKind.ToString()) }, + { "contentHash", contentHash => new JValue(contentHash) }, + { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, + { "excludedPerson", excludedPerson => new JArray(excludedPerson) }, + { "fileName", fileName => new JValue(fileName) }, + { "fileType", fileType => new JArray(fileType) }, + { "iid", iid => new JValue(iid) }, + { "modifiedOn", modifiedOn => new JValue(((DateTime)modifiedOn).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")) }, + { "revisionNumber", revisionNumber => new JValue(revisionNumber) }, + { "thingPreference", thingPreference => new JValue(thingPreference) }, + }; + + /// + /// Serialize the + /// + /// The to serialize + /// The + private JObject Serialize(Attachment attachment) + { + var jsonObject = new JObject(); + jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), attachment.ClassKind))); + jsonObject.Add("contentHash", this.PropertySerializerMap["contentHash"](attachment.ContentHash)); + jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](attachment.ExcludedDomain.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("excludedPerson", this.PropertySerializerMap["excludedPerson"](attachment.ExcludedPerson.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("fileName", this.PropertySerializerMap["fileName"](attachment.FileName)); + jsonObject.Add("fileType", this.PropertySerializerMap["fileType"](attachment.FileType.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("iid", this.PropertySerializerMap["iid"](attachment.Iid)); + jsonObject.Add("modifiedOn", this.PropertySerializerMap["modifiedOn"](attachment.ModifiedOn)); + jsonObject.Add("revisionNumber", this.PropertySerializerMap["revisionNumber"](attachment.RevisionNumber)); + jsonObject.Add("thingPreference", this.PropertySerializerMap["thingPreference"](attachment.ThingPreference)); + return jsonObject; + } + + /// + /// Gets the map containing the serialization method for each property of the class. + /// + public IReadOnlyDictionary> PropertySerializerMap + { + get { return this.propertySerializerMap; } + } + + /// + /// Serialize the to JObject + /// + /// The to serialize + /// The + public JObject Serialize(Thing thing) + { + if (thing == null) + { + throw new ArgumentNullException($"The {nameof(thing)} may not be null.", nameof(thing)); + } + + var attachment = thing as Attachment; + if (attachment == null) + { + throw new InvalidOperationException("The thing is not a Attachment."); + } + + return this.Serialize(attachment); + } + } +} diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/BehaviorSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/BehaviorSerializer.cs new file mode 100644 index 000000000..d35015176 --- /dev/null +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/BehaviorSerializer.cs @@ -0,0 +1,119 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4JsonSerializer +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using CDP4Common.DTO; + using CDP4Common.Types; + using Newtonsoft.Json.Linq; + + /// + /// The purpose of the class is to provide a specific serializer + /// + public class BehaviorSerializer : BaseThingSerializer, IThingSerializer + { + /// + /// The map containing the serialization methods + /// + private readonly Dictionary> propertySerializerMap = new Dictionary> + { + { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, + { "behavioralModelKind", behavioralModelKind => new JValue(behavioralModelKind.ToString()) }, + { "behavioralParameter", behavioralParameter => new JArray(behavioralParameter) }, + { "classKind", classKind => new JValue(classKind.ToString()) }, + { "definition", definition => new JArray(definition) }, + { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, + { "excludedPerson", excludedPerson => new JArray(excludedPerson) }, + { "hyperLink", hyperLink => new JArray(hyperLink) }, + { "iid", iid => new JValue(iid) }, + { "modifiedOn", modifiedOn => new JValue(((DateTime)modifiedOn).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")) }, + { "name", name => new JValue(name) }, + { "revisionNumber", revisionNumber => new JValue(revisionNumber) }, + { "script", script => new JValue(script) }, + { "shortName", shortName => new JValue(shortName) }, + { "thingPreference", thingPreference => new JValue(thingPreference) }, + }; + + /// + /// Serialize the + /// + /// The to serialize + /// The + private JObject Serialize(Behavior behavior) + { + var jsonObject = new JObject(); + jsonObject.Add("alias", this.PropertySerializerMap["alias"](behavior.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](behavior.Attachment.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("behavioralModelKind", this.PropertySerializerMap["behavioralModelKind"](Enum.GetName(typeof(CDP4Common.EngineeringModelData.BehavioralModelKind), behavior.BehavioralModelKind))); + jsonObject.Add("behavioralParameter", this.PropertySerializerMap["behavioralParameter"](behavior.BehavioralParameter.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), behavior.ClassKind))); + jsonObject.Add("definition", this.PropertySerializerMap["definition"](behavior.Definition.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](behavior.ExcludedDomain.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("excludedPerson", this.PropertySerializerMap["excludedPerson"](behavior.ExcludedPerson.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("hyperLink", this.PropertySerializerMap["hyperLink"](behavior.HyperLink.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("iid", this.PropertySerializerMap["iid"](behavior.Iid)); + jsonObject.Add("modifiedOn", this.PropertySerializerMap["modifiedOn"](behavior.ModifiedOn)); + jsonObject.Add("name", this.PropertySerializerMap["name"](behavior.Name)); + jsonObject.Add("revisionNumber", this.PropertySerializerMap["revisionNumber"](behavior.RevisionNumber)); + jsonObject.Add("script", this.PropertySerializerMap["script"](behavior.Script)); + jsonObject.Add("shortName", this.PropertySerializerMap["shortName"](behavior.ShortName)); + jsonObject.Add("thingPreference", this.PropertySerializerMap["thingPreference"](behavior.ThingPreference)); + return jsonObject; + } + + /// + /// Gets the map containing the serialization method for each property of the class. + /// + public IReadOnlyDictionary> PropertySerializerMap + { + get { return this.propertySerializerMap; } + } + + /// + /// Serialize the to JObject + /// + /// The to serialize + /// The + public JObject Serialize(Thing thing) + { + if (thing == null) + { + throw new ArgumentNullException($"The {nameof(thing)} may not be null.", nameof(thing)); + } + + var behavior = thing as Behavior; + if (behavior == null) + { + throw new InvalidOperationException("The thing is not a Behavior."); + } + + return this.Serialize(behavior); + } + } +} diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/BehavioralParameterSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/BehavioralParameterSerializer.cs new file mode 100644 index 000000000..7be9866fa --- /dev/null +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/BehavioralParameterSerializer.cs @@ -0,0 +1,107 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4JsonSerializer +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using CDP4Common.DTO; + using CDP4Common.Types; + using Newtonsoft.Json.Linq; + + /// + /// The purpose of the class is to provide a specific serializer + /// + public class BehavioralParameterSerializer : BaseThingSerializer, IThingSerializer + { + /// + /// The map containing the serialization methods + /// + private readonly Dictionary> propertySerializerMap = new Dictionary> + { + { "behavioralParameterKind", behavioralParameterKind => new JValue(behavioralParameterKind.ToString()) }, + { "classKind", classKind => new JValue(classKind.ToString()) }, + { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, + { "excludedPerson", excludedPerson => new JArray(excludedPerson) }, + { "iid", iid => new JValue(iid) }, + { "modifiedOn", modifiedOn => new JValue(((DateTime)modifiedOn).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")) }, + { "parameter", parameter => new JValue(parameter) }, + { "revisionNumber", revisionNumber => new JValue(revisionNumber) }, + { "thingPreference", thingPreference => new JValue(thingPreference) }, + { "variableName", variableName => new JValue(variableName) }, + }; + + /// + /// Serialize the + /// + /// The to serialize + /// The + private JObject Serialize(BehavioralParameter behavioralParameter) + { + var jsonObject = new JObject(); + jsonObject.Add("behavioralParameterKind", this.PropertySerializerMap["behavioralParameterKind"](Enum.GetName(typeof(CDP4Common.EngineeringModelData.BehavioralParameterKind), behavioralParameter.BehavioralParameterKind))); + jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), behavioralParameter.ClassKind))); + jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](behavioralParameter.ExcludedDomain.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("excludedPerson", this.PropertySerializerMap["excludedPerson"](behavioralParameter.ExcludedPerson.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("iid", this.PropertySerializerMap["iid"](behavioralParameter.Iid)); + jsonObject.Add("modifiedOn", this.PropertySerializerMap["modifiedOn"](behavioralParameter.ModifiedOn)); + jsonObject.Add("parameter", this.PropertySerializerMap["parameter"](behavioralParameter.Parameter)); + jsonObject.Add("revisionNumber", this.PropertySerializerMap["revisionNumber"](behavioralParameter.RevisionNumber)); + jsonObject.Add("thingPreference", this.PropertySerializerMap["thingPreference"](behavioralParameter.ThingPreference)); + jsonObject.Add("variableName", this.PropertySerializerMap["variableName"](behavioralParameter.VariableName)); + return jsonObject; + } + + /// + /// Gets the map containing the serialization method for each property of the class. + /// + public IReadOnlyDictionary> PropertySerializerMap + { + get { return this.propertySerializerMap; } + } + + /// + /// Serialize the to JObject + /// + /// The to serialize + /// The + public JObject Serialize(Thing thing) + { + if (thing == null) + { + throw new ArgumentNullException($"The {nameof(thing)} may not be null.", nameof(thing)); + } + + var behavioralParameter = thing as BehavioralParameter; + if (behavioralParameter == null) + { + throw new InvalidOperationException("The thing is not a BehavioralParameter."); + } + + return this.Serialize(behavioralParameter); + } + } +} diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/BinaryRelationshipRuleSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/BinaryRelationshipRuleSerializer.cs index 54c5f5605..b8f4f8d8c 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/BinaryRelationshipRuleSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/BinaryRelationshipRuleSerializer.cs @@ -43,6 +43,7 @@ public class BinaryRelationshipRuleSerializer : BaseThingSerializer, IThingSeria private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -71,6 +72,7 @@ private JObject Serialize(BinaryRelationshipRule binaryRelationshipRule) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](binaryRelationshipRule.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](binaryRelationshipRule.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), binaryRelationshipRule.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](binaryRelationshipRule.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](binaryRelationshipRule.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/BooleanParameterTypeSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/BooleanParameterTypeSerializer.cs index 6a323aac5..61983760f 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/BooleanParameterTypeSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/BooleanParameterTypeSerializer.cs @@ -43,6 +43,7 @@ public class BooleanParameterTypeSerializer : BaseThingSerializer, IThingSeriali private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -68,6 +69,7 @@ private JObject Serialize(BooleanParameterType booleanParameterType) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](booleanParameterType.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](booleanParameterType.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](booleanParameterType.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), booleanParameterType.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](booleanParameterType.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/CategorySerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/CategorySerializer.cs index a287bd4ec..03013162e 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/CategorySerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/CategorySerializer.cs @@ -43,6 +43,7 @@ public class CategorySerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -69,6 +70,7 @@ private JObject Serialize(Category category) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](category.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](category.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), category.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](category.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](category.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/CompoundParameterTypeSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/CompoundParameterTypeSerializer.cs index 7e4dc7721..261af1ca0 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/CompoundParameterTypeSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/CompoundParameterTypeSerializer.cs @@ -43,6 +43,7 @@ public class CompoundParameterTypeSerializer : BaseThingSerializer, IThingSerial private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "component", component => new JArray(((IEnumerable)component).Cast().Select(x => x.ToJsonObject())) }, @@ -70,6 +71,7 @@ private JObject Serialize(CompoundParameterType compoundParameterType) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](compoundParameterType.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](compoundParameterType.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](compoundParameterType.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), compoundParameterType.ClassKind))); jsonObject.Add("component", this.PropertySerializerMap["component"](compoundParameterType.Component.OrderBy(x => x, this.orderedItemComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/ConstantSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/ConstantSerializer.cs index 908cfdf73..85ba7a938 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/ConstantSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/ConstantSerializer.cs @@ -43,6 +43,7 @@ public class ConstantSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -70,6 +71,7 @@ private JObject Serialize(Constant constant) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](constant.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](constant.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](constant.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), constant.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](constant.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/CyclicRatioScaleSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/CyclicRatioScaleSerializer.cs index 25b3da47c..67ede7c7c 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/CyclicRatioScaleSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/CyclicRatioScaleSerializer.cs @@ -43,6 +43,7 @@ public class CyclicRatioScaleSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -77,6 +78,7 @@ private JObject Serialize(CyclicRatioScale cyclicRatioScale) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](cyclicRatioScale.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](cyclicRatioScale.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), cyclicRatioScale.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](cyclicRatioScale.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](cyclicRatioScale.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/DateParameterTypeSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/DateParameterTypeSerializer.cs index 5bbbcc803..202f980aa 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/DateParameterTypeSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/DateParameterTypeSerializer.cs @@ -43,6 +43,7 @@ public class DateParameterTypeSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -68,6 +69,7 @@ private JObject Serialize(DateParameterType dateParameterType) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](dateParameterType.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](dateParameterType.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](dateParameterType.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), dateParameterType.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](dateParameterType.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/DateTimeParameterTypeSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/DateTimeParameterTypeSerializer.cs index f9ccbebf4..b39b30ff7 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/DateTimeParameterTypeSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/DateTimeParameterTypeSerializer.cs @@ -43,6 +43,7 @@ public class DateTimeParameterTypeSerializer : BaseThingSerializer, IThingSerial private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -68,6 +69,7 @@ private JObject Serialize(DateTimeParameterType dateTimeParameterType) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](dateTimeParameterType.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](dateTimeParameterType.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](dateTimeParameterType.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), dateTimeParameterType.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](dateTimeParameterType.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/DecompositionRuleSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/DecompositionRuleSerializer.cs index 123c774c2..201801bb5 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/DecompositionRuleSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/DecompositionRuleSerializer.cs @@ -43,6 +43,7 @@ public class DecompositionRuleSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "containedCategory", containedCategory => new JArray(containedCategory) }, { "containingCategory", containingCategory => new JValue(containingCategory) }, @@ -70,6 +71,7 @@ private JObject Serialize(DecompositionRule decompositionRule) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](decompositionRule.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](decompositionRule.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), decompositionRule.ClassKind))); jsonObject.Add("containedCategory", this.PropertySerializerMap["containedCategory"](decompositionRule.ContainedCategory.OrderBy(x => x, this.guidComparer))); jsonObject.Add("containingCategory", this.PropertySerializerMap["containingCategory"](decompositionRule.ContainingCategory)); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/DerivedQuantityKindSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/DerivedQuantityKindSerializer.cs index 2a9aebe1a..fef68bf86 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/DerivedQuantityKindSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/DerivedQuantityKindSerializer.cs @@ -43,6 +43,7 @@ public class DerivedQuantityKindSerializer : BaseThingSerializer, IThingSerializ private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "defaultScale", defaultScale => new JValue(defaultScale) }, @@ -72,6 +73,7 @@ private JObject Serialize(DerivedQuantityKind derivedQuantityKind) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](derivedQuantityKind.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](derivedQuantityKind.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](derivedQuantityKind.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), derivedQuantityKind.ClassKind))); jsonObject.Add("defaultScale", this.PropertySerializerMap["defaultScale"](derivedQuantityKind.DefaultScale)); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/DerivedUnitSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/DerivedUnitSerializer.cs index 46b254e8d..b9571c9d7 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/DerivedUnitSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/DerivedUnitSerializer.cs @@ -43,6 +43,7 @@ public class DerivedUnitSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -67,6 +68,7 @@ private JObject Serialize(DerivedUnit derivedUnit) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](derivedUnit.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](derivedUnit.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), derivedUnit.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](derivedUnit.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](derivedUnit.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/DiagramCanvasSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/DiagramCanvasSerializer.cs index 327344a1a..408861967 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/DiagramCanvasSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/DiagramCanvasSerializer.cs @@ -45,12 +45,14 @@ public class DiagramCanvasSerializer : BaseThingSerializer, IThingSerializer { "bounds", bounds => new JArray(bounds) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "createdOn", createdOn => new JValue(((DateTime)createdOn).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")) }, + { "description", description => new JValue(description) }, { "diagramElement", diagramElement => new JArray(diagramElement) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, { "excludedPerson", excludedPerson => new JArray(excludedPerson) }, { "iid", iid => new JValue(iid) }, { "modifiedOn", modifiedOn => new JValue(((DateTime)modifiedOn).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")) }, { "name", name => new JValue(name) }, + { "publicationState", publicationState => new JValue(publicationState.ToString()) }, { "revisionNumber", revisionNumber => new JValue(revisionNumber) }, { "thingPreference", thingPreference => new JValue(thingPreference) }, }; @@ -66,12 +68,14 @@ private JObject Serialize(DiagramCanvas diagramCanvas) jsonObject.Add("bounds", this.PropertySerializerMap["bounds"](diagramCanvas.Bounds)); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), diagramCanvas.ClassKind))); jsonObject.Add("createdOn", this.PropertySerializerMap["createdOn"](diagramCanvas.CreatedOn)); + jsonObject.Add("description", this.PropertySerializerMap["description"](diagramCanvas.Description)); jsonObject.Add("diagramElement", this.PropertySerializerMap["diagramElement"](diagramCanvas.DiagramElement.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](diagramCanvas.ExcludedDomain.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedPerson", this.PropertySerializerMap["excludedPerson"](diagramCanvas.ExcludedPerson.OrderBy(x => x, this.guidComparer))); jsonObject.Add("iid", this.PropertySerializerMap["iid"](diagramCanvas.Iid)); jsonObject.Add("modifiedOn", this.PropertySerializerMap["modifiedOn"](diagramCanvas.ModifiedOn)); jsonObject.Add("name", this.PropertySerializerMap["name"](diagramCanvas.Name)); + jsonObject.Add("publicationState", this.PropertySerializerMap["publicationState"](Enum.GetName(typeof(CDP4Common.DiagramData.PublicationState), diagramCanvas.PublicationState))); jsonObject.Add("revisionNumber", this.PropertySerializerMap["revisionNumber"](diagramCanvas.RevisionNumber)); jsonObject.Add("thingPreference", this.PropertySerializerMap["thingPreference"](diagramCanvas.ThingPreference)); return jsonObject; diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/DiagramFrameSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/DiagramFrameSerializer.cs new file mode 100644 index 000000000..c12463d69 --- /dev/null +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/DiagramFrameSerializer.cs @@ -0,0 +1,113 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4JsonSerializer +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using CDP4Common.DTO; + using CDP4Common.Types; + using Newtonsoft.Json.Linq; + + /// + /// The purpose of the class is to provide a specific serializer + /// + public class DiagramFrameSerializer : BaseThingSerializer, IThingSerializer + { + /// + /// The map containing the serialization methods + /// + private readonly Dictionary> propertySerializerMap = new Dictionary> + { + { "bounds", bounds => new JArray(bounds) }, + { "classKind", classKind => new JValue(classKind.ToString()) }, + { "depictedThing", depictedThing => new JValue(depictedThing) }, + { "diagramElement", diagramElement => new JArray(diagramElement) }, + { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, + { "excludedPerson", excludedPerson => new JArray(excludedPerson) }, + { "iid", iid => new JValue(iid) }, + { "localStyle", localStyle => new JArray(localStyle) }, + { "modifiedOn", modifiedOn => new JValue(((DateTime)modifiedOn).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")) }, + { "name", name => new JValue(name) }, + { "revisionNumber", revisionNumber => new JValue(revisionNumber) }, + { "sharedStyle", sharedStyle => new JValue(sharedStyle) }, + { "thingPreference", thingPreference => new JValue(thingPreference) }, + }; + + /// + /// Serialize the + /// + /// The to serialize + /// The + private JObject Serialize(DiagramFrame diagramFrame) + { + var jsonObject = new JObject(); + jsonObject.Add("bounds", this.PropertySerializerMap["bounds"](diagramFrame.Bounds)); + jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), diagramFrame.ClassKind))); + jsonObject.Add("depictedThing", this.PropertySerializerMap["depictedThing"](diagramFrame.DepictedThing)); + jsonObject.Add("diagramElement", this.PropertySerializerMap["diagramElement"](diagramFrame.DiagramElement.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](diagramFrame.ExcludedDomain.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("excludedPerson", this.PropertySerializerMap["excludedPerson"](diagramFrame.ExcludedPerson.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("iid", this.PropertySerializerMap["iid"](diagramFrame.Iid)); + jsonObject.Add("localStyle", this.PropertySerializerMap["localStyle"](diagramFrame.LocalStyle)); + jsonObject.Add("modifiedOn", this.PropertySerializerMap["modifiedOn"](diagramFrame.ModifiedOn)); + jsonObject.Add("name", this.PropertySerializerMap["name"](diagramFrame.Name)); + jsonObject.Add("revisionNumber", this.PropertySerializerMap["revisionNumber"](diagramFrame.RevisionNumber)); + jsonObject.Add("sharedStyle", this.PropertySerializerMap["sharedStyle"](diagramFrame.SharedStyle)); + jsonObject.Add("thingPreference", this.PropertySerializerMap["thingPreference"](diagramFrame.ThingPreference)); + return jsonObject; + } + + /// + /// Gets the map containing the serialization method for each property of the class. + /// + public IReadOnlyDictionary> PropertySerializerMap + { + get { return this.propertySerializerMap; } + } + + /// + /// Serialize the to JObject + /// + /// The to serialize + /// The + public JObject Serialize(Thing thing) + { + if (thing == null) + { + throw new ArgumentNullException($"The {nameof(thing)} may not be null.", nameof(thing)); + } + + var diagramFrame = thing as DiagramFrame; + if (diagramFrame == null) + { + throw new InvalidOperationException("The thing is not a DiagramFrame."); + } + + return this.Serialize(diagramFrame); + } + } +} diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/DiagramPortSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/DiagramPortSerializer.cs new file mode 100644 index 000000000..06fbedf04 --- /dev/null +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/DiagramPortSerializer.cs @@ -0,0 +1,113 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) 2015-2021 RHEA System S.A. +// +// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski +// +// This file is part of COMET-SDK Community Edition +// This is an auto-generated class. Any manual changes to this file will be overwritten! +// +// The COMET-SDK Community Edition is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// The COMET-SDK Community Edition is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// -------------------------------------------------------------------------------------------------------------------- + +namespace CDP4JsonSerializer +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using CDP4Common.DTO; + using CDP4Common.Types; + using Newtonsoft.Json.Linq; + + /// + /// The purpose of the class is to provide a specific serializer + /// + public class DiagramPortSerializer : BaseThingSerializer, IThingSerializer + { + /// + /// The map containing the serialization methods + /// + private readonly Dictionary> propertySerializerMap = new Dictionary> + { + { "bounds", bounds => new JArray(bounds) }, + { "classKind", classKind => new JValue(classKind.ToString()) }, + { "depictedThing", depictedThing => new JValue(depictedThing) }, + { "diagramElement", diagramElement => new JArray(diagramElement) }, + { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, + { "excludedPerson", excludedPerson => new JArray(excludedPerson) }, + { "iid", iid => new JValue(iid) }, + { "localStyle", localStyle => new JArray(localStyle) }, + { "modifiedOn", modifiedOn => new JValue(((DateTime)modifiedOn).ToString("yyyy-MM-ddTHH:mm:ss.fffZ")) }, + { "name", name => new JValue(name) }, + { "revisionNumber", revisionNumber => new JValue(revisionNumber) }, + { "sharedStyle", sharedStyle => new JValue(sharedStyle) }, + { "thingPreference", thingPreference => new JValue(thingPreference) }, + }; + + /// + /// Serialize the + /// + /// The to serialize + /// The + private JObject Serialize(DiagramPort diagramPort) + { + var jsonObject = new JObject(); + jsonObject.Add("bounds", this.PropertySerializerMap["bounds"](diagramPort.Bounds)); + jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), diagramPort.ClassKind))); + jsonObject.Add("depictedThing", this.PropertySerializerMap["depictedThing"](diagramPort.DepictedThing)); + jsonObject.Add("diagramElement", this.PropertySerializerMap["diagramElement"](diagramPort.DiagramElement.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](diagramPort.ExcludedDomain.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("excludedPerson", this.PropertySerializerMap["excludedPerson"](diagramPort.ExcludedPerson.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("iid", this.PropertySerializerMap["iid"](diagramPort.Iid)); + jsonObject.Add("localStyle", this.PropertySerializerMap["localStyle"](diagramPort.LocalStyle)); + jsonObject.Add("modifiedOn", this.PropertySerializerMap["modifiedOn"](diagramPort.ModifiedOn)); + jsonObject.Add("name", this.PropertySerializerMap["name"](diagramPort.Name)); + jsonObject.Add("revisionNumber", this.PropertySerializerMap["revisionNumber"](diagramPort.RevisionNumber)); + jsonObject.Add("sharedStyle", this.PropertySerializerMap["sharedStyle"](diagramPort.SharedStyle)); + jsonObject.Add("thingPreference", this.PropertySerializerMap["thingPreference"](diagramPort.ThingPreference)); + return jsonObject; + } + + /// + /// Gets the map containing the serialization method for each property of the class. + /// + public IReadOnlyDictionary> PropertySerializerMap + { + get { return this.propertySerializerMap; } + } + + /// + /// Serialize the to JObject + /// + /// The to serialize + /// The + public JObject Serialize(Thing thing) + { + if (thing == null) + { + throw new ArgumentNullException($"The {nameof(thing)} may not be null.", nameof(thing)); + } + + var diagramPort = thing as DiagramPort; + if (diagramPort == null) + { + throw new InvalidOperationException("The thing is not a DiagramPort."); + } + + return this.Serialize(diagramPort); + } + } +} diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/DomainOfExpertiseGroupSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/DomainOfExpertiseGroupSerializer.cs index 5409637d0..6472c4519 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/DomainOfExpertiseGroupSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/DomainOfExpertiseGroupSerializer.cs @@ -43,6 +43,7 @@ public class DomainOfExpertiseGroupSerializer : BaseThingSerializer, IThingSeria private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "domain", domain => new JArray(domain) }, @@ -67,6 +68,7 @@ private JObject Serialize(DomainOfExpertiseGroup domainOfExpertiseGroup) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](domainOfExpertiseGroup.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](domainOfExpertiseGroup.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), domainOfExpertiseGroup.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](domainOfExpertiseGroup.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("domain", this.PropertySerializerMap["domain"](domainOfExpertiseGroup.Domain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/DomainOfExpertiseSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/DomainOfExpertiseSerializer.cs index 5caa03a5f..ee0ca0a09 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/DomainOfExpertiseSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/DomainOfExpertiseSerializer.cs @@ -43,6 +43,7 @@ public class DomainOfExpertiseSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -67,6 +68,7 @@ private JObject Serialize(DomainOfExpertise domainOfExpertise) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](domainOfExpertise.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](domainOfExpertise.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](domainOfExpertise.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), domainOfExpertise.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](domainOfExpertise.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/ElementDefinitionSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/ElementDefinitionSerializer.cs index b21d30239..ecee21f2c 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/ElementDefinitionSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/ElementDefinitionSerializer.cs @@ -43,6 +43,8 @@ public class ElementDefinitionSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, + { "behavior", behavior => new JArray(behavior) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "containedElement", containedElement => new JArray(containedElement) }, @@ -72,6 +74,8 @@ private JObject Serialize(ElementDefinition elementDefinition) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](elementDefinition.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](elementDefinition.Attachment.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("behavior", this.PropertySerializerMap["behavior"](elementDefinition.Behavior.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](elementDefinition.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), elementDefinition.ClassKind))); jsonObject.Add("containedElement", this.PropertySerializerMap["containedElement"](elementDefinition.ContainedElement.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/ElementUsageSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/ElementUsageSerializer.cs index dbf1ade25..d6f5048f9 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/ElementUsageSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/ElementUsageSerializer.cs @@ -43,6 +43,7 @@ public class ElementUsageSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -71,6 +72,7 @@ private JObject Serialize(ElementUsage elementUsage) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](elementUsage.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](elementUsage.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](elementUsage.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), elementUsage.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](elementUsage.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/EngineeringModelSetupSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/EngineeringModelSetupSerializer.cs index effc28c6c..a0ee57ca2 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/EngineeringModelSetupSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/EngineeringModelSetupSerializer.cs @@ -44,6 +44,7 @@ public class EngineeringModelSetupSerializer : BaseThingSerializer, IThingSerial { { "activeDomain", activeDomain => new JArray(activeDomain) }, { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "defaultOrganizationalParticipant", defaultOrganizationalParticipant => new JValue(defaultOrganizationalParticipant) }, { "definition", definition => new JArray(definition) }, @@ -76,6 +77,7 @@ private JObject Serialize(EngineeringModelSetup engineeringModelSetup) var jsonObject = new JObject(); jsonObject.Add("activeDomain", this.PropertySerializerMap["activeDomain"](engineeringModelSetup.ActiveDomain.OrderBy(x => x, this.guidComparer))); jsonObject.Add("alias", this.PropertySerializerMap["alias"](engineeringModelSetup.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](engineeringModelSetup.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), engineeringModelSetup.ClassKind))); jsonObject.Add("defaultOrganizationalParticipant", this.PropertySerializerMap["defaultOrganizationalParticipant"](engineeringModelSetup.DefaultOrganizationalParticipant)); jsonObject.Add("definition", this.PropertySerializerMap["definition"](engineeringModelSetup.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/EnumerationParameterTypeSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/EnumerationParameterTypeSerializer.cs index 287d2313d..400d1e660 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/EnumerationParameterTypeSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/EnumerationParameterTypeSerializer.cs @@ -44,6 +44,7 @@ public class EnumerationParameterTypeSerializer : BaseThingSerializer, IThingSer { { "alias", alias => new JArray(alias) }, { "allowMultiSelect", allowMultiSelect => new JValue(allowMultiSelect) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -71,6 +72,7 @@ private JObject Serialize(EnumerationParameterType enumerationParameterType) var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](enumerationParameterType.Alias.OrderBy(x => x, this.guidComparer))); jsonObject.Add("allowMultiSelect", this.PropertySerializerMap["allowMultiSelect"](enumerationParameterType.AllowMultiSelect)); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](enumerationParameterType.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](enumerationParameterType.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), enumerationParameterType.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](enumerationParameterType.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/EnumerationValueDefinitionSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/EnumerationValueDefinitionSerializer.cs index 96d21828b..7929e7a5f 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/EnumerationValueDefinitionSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/EnumerationValueDefinitionSerializer.cs @@ -43,6 +43,7 @@ public class EnumerationValueDefinitionSerializer : BaseThingSerializer, IThingS private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -65,6 +66,7 @@ private JObject Serialize(EnumerationValueDefinition enumerationValueDefinition) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](enumerationValueDefinition.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](enumerationValueDefinition.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), enumerationValueDefinition.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](enumerationValueDefinition.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](enumerationValueDefinition.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/FileTypeSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/FileTypeSerializer.cs index 798c2c041..642369ae8 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/FileTypeSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/FileTypeSerializer.cs @@ -43,6 +43,7 @@ public class FileTypeSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -68,6 +69,7 @@ private JObject Serialize(FileType fileType) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](fileType.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](fileType.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](fileType.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), fileType.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](fileType.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/GlossarySerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/GlossarySerializer.cs index aa9bdee60..0f130a30b 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/GlossarySerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/GlossarySerializer.cs @@ -43,6 +43,7 @@ public class GlossarySerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -68,6 +69,7 @@ private JObject Serialize(Glossary glossary) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](glossary.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](glossary.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](glossary.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), glossary.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](glossary.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/GoalSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/GoalSerializer.cs index 64740a639..436cdce5b 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/GoalSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/GoalSerializer.cs @@ -43,6 +43,7 @@ public class GoalSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -66,6 +67,7 @@ private JObject Serialize(Goal goal) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](goal.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](goal.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](goal.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), goal.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](goal.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/IntervalScaleSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/IntervalScaleSerializer.cs index adeae494b..64da23171 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/IntervalScaleSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/IntervalScaleSerializer.cs @@ -43,6 +43,7 @@ public class IntervalScaleSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -76,6 +77,7 @@ private JObject Serialize(IntervalScale intervalScale) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](intervalScale.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](intervalScale.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), intervalScale.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](intervalScale.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](intervalScale.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/LinearConversionUnitSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/LinearConversionUnitSerializer.cs index 83d3c0e3c..88236fa2e 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/LinearConversionUnitSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/LinearConversionUnitSerializer.cs @@ -43,6 +43,7 @@ public class LinearConversionUnitSerializer : BaseThingSerializer, IThingSeriali private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "conversionFactor", conversionFactor => new JValue(conversionFactor) }, { "definition", definition => new JArray(definition) }, @@ -68,6 +69,7 @@ private JObject Serialize(LinearConversionUnit linearConversionUnit) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](linearConversionUnit.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](linearConversionUnit.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), linearConversionUnit.ClassKind))); jsonObject.Add("conversionFactor", this.PropertySerializerMap["conversionFactor"](linearConversionUnit.ConversionFactor)); jsonObject.Add("definition", this.PropertySerializerMap["definition"](linearConversionUnit.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/LogarithmicScaleSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/LogarithmicScaleSerializer.cs index 364cc5e00..ce5640ef2 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/LogarithmicScaleSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/LogarithmicScaleSerializer.cs @@ -43,6 +43,7 @@ public class LogarithmicScaleSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -81,6 +82,7 @@ private JObject Serialize(LogarithmicScale logarithmicScale) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](logarithmicScale.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](logarithmicScale.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), logarithmicScale.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](logarithmicScale.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](logarithmicScale.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/ModelReferenceDataLibrarySerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/ModelReferenceDataLibrarySerializer.cs index afca62211..479bc2198 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/ModelReferenceDataLibrarySerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/ModelReferenceDataLibrarySerializer.cs @@ -43,6 +43,7 @@ public class ModelReferenceDataLibrarySerializer : BaseThingSerializer, IThingSe private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "baseQuantityKind", baseQuantityKind => new JArray(((IEnumerable)baseQuantityKind).Cast().Select(x => x.ToJsonObject())) }, { "baseUnit", baseUnit => new JArray(baseUnit) }, { "classKind", classKind => new JValue(classKind.ToString()) }, @@ -78,6 +79,7 @@ private JObject Serialize(ModelReferenceDataLibrary modelReferenceDataLibrary) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](modelReferenceDataLibrary.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](modelReferenceDataLibrary.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("baseQuantityKind", this.PropertySerializerMap["baseQuantityKind"](modelReferenceDataLibrary.BaseQuantityKind.OrderBy(x => x, this.orderedItemComparer))); jsonObject.Add("baseUnit", this.PropertySerializerMap["baseUnit"](modelReferenceDataLibrary.BaseUnit.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), modelReferenceDataLibrary.ClassKind))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/MultiRelationshipRuleSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/MultiRelationshipRuleSerializer.cs index 8005c5c36..8a329a624 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/MultiRelationshipRuleSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/MultiRelationshipRuleSerializer.cs @@ -43,6 +43,7 @@ public class MultiRelationshipRuleSerializer : BaseThingSerializer, IThingSerial private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -70,6 +71,7 @@ private JObject Serialize(MultiRelationshipRule multiRelationshipRule) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](multiRelationshipRule.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](multiRelationshipRule.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), multiRelationshipRule.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](multiRelationshipRule.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](multiRelationshipRule.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/OptionSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/OptionSerializer.cs index 0aa1343c8..944a6ce07 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/OptionSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/OptionSerializer.cs @@ -43,6 +43,7 @@ public class OptionSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -67,6 +68,7 @@ private JObject Serialize(Option option) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](option.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](option.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](option.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), option.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](option.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/OrdinalScaleSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/OrdinalScaleSerializer.cs index 02fe18b3c..81f1ba446 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/OrdinalScaleSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/OrdinalScaleSerializer.cs @@ -43,6 +43,7 @@ public class OrdinalScaleSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -77,6 +78,7 @@ private JObject Serialize(OrdinalScale ordinalScale) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](ordinalScale.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](ordinalScale.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), ordinalScale.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](ordinalScale.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](ordinalScale.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/ParameterizedCategoryRuleSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/ParameterizedCategoryRuleSerializer.cs index d8158383f..482728dce 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/ParameterizedCategoryRuleSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/ParameterizedCategoryRuleSerializer.cs @@ -43,6 +43,7 @@ public class ParameterizedCategoryRuleSerializer : BaseThingSerializer, IThingSe private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JValue(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -68,6 +69,7 @@ private JObject Serialize(ParameterizedCategoryRule parameterizedCategoryRule) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](parameterizedCategoryRule.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](parameterizedCategoryRule.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](parameterizedCategoryRule.Category)); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), parameterizedCategoryRule.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](parameterizedCategoryRule.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/ParticipantRoleSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/ParticipantRoleSerializer.cs index 84d76e685..0a4c53a68 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/ParticipantRoleSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/ParticipantRoleSerializer.cs @@ -43,6 +43,7 @@ public class ParticipantRoleSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -67,6 +68,7 @@ private JObject Serialize(ParticipantRole participantRole) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](participantRole.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](participantRole.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), participantRole.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](participantRole.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](participantRole.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/PersonRoleSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/PersonRoleSerializer.cs index 8bef8f426..eb104d208 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/PersonRoleSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/PersonRoleSerializer.cs @@ -43,6 +43,7 @@ public class PersonRoleSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -67,6 +68,7 @@ private JObject Serialize(PersonRole personRole) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](personRole.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](personRole.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), personRole.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](personRole.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](personRole.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/PossibleFiniteStateListSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/PossibleFiniteStateListSerializer.cs index ad26b7d0c..debba022d 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/PossibleFiniteStateListSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/PossibleFiniteStateListSerializer.cs @@ -43,6 +43,7 @@ public class PossibleFiniteStateListSerializer : BaseThingSerializer, IThingSeri private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "defaultState", defaultState => new JValue(defaultState) }, @@ -69,6 +70,7 @@ private JObject Serialize(PossibleFiniteStateList possibleFiniteStateList) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](possibleFiniteStateList.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](possibleFiniteStateList.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](possibleFiniteStateList.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), possibleFiniteStateList.ClassKind))); jsonObject.Add("defaultState", this.PropertySerializerMap["defaultState"](possibleFiniteStateList.DefaultState)); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/PossibleFiniteStateSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/PossibleFiniteStateSerializer.cs index 2b4c94894..860fb06ee 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/PossibleFiniteStateSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/PossibleFiniteStateSerializer.cs @@ -43,6 +43,7 @@ public class PossibleFiniteStateSerializer : BaseThingSerializer, IThingSerializ private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -65,6 +66,7 @@ private JObject Serialize(PossibleFiniteState possibleFiniteState) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](possibleFiniteState.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](possibleFiniteState.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), possibleFiniteState.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](possibleFiniteState.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](possibleFiniteState.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/PrefixedUnitSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/PrefixedUnitSerializer.cs index 8fe2e4b1b..e8241b15a 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/PrefixedUnitSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/PrefixedUnitSerializer.cs @@ -43,6 +43,7 @@ public class PrefixedUnitSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -66,6 +67,7 @@ private JObject Serialize(PrefixedUnit prefixedUnit) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](prefixedUnit.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](prefixedUnit.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), prefixedUnit.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](prefixedUnit.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](prefixedUnit.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/RatioScaleSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/RatioScaleSerializer.cs index 1a33bd16e..7015b31c3 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/RatioScaleSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/RatioScaleSerializer.cs @@ -43,6 +43,7 @@ public class RatioScaleSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -76,6 +77,7 @@ private JObject Serialize(RatioScale ratioScale) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](ratioScale.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](ratioScale.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), ratioScale.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](ratioScale.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](ratioScale.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/ReferenceSourceSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/ReferenceSourceSerializer.cs index 5af801a6c..a92cb7ffe 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/ReferenceSourceSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/ReferenceSourceSerializer.cs @@ -43,6 +43,7 @@ public class ReferenceSourceSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "author", author => new JValue(author) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, @@ -74,6 +75,7 @@ private JObject Serialize(ReferenceSource referenceSource) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](referenceSource.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](referenceSource.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("author", this.PropertySerializerMap["author"](referenceSource.Author)); jsonObject.Add("category", this.PropertySerializerMap["category"](referenceSource.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), referenceSource.ClassKind))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/ReferencerRuleSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/ReferencerRuleSerializer.cs index 55dbb008f..abcd4c642 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/ReferencerRuleSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/ReferencerRuleSerializer.cs @@ -43,6 +43,7 @@ public class ReferencerRuleSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -70,6 +71,7 @@ private JObject Serialize(ReferencerRule referencerRule) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](referencerRule.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](referencerRule.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), referencerRule.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](referencerRule.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](referencerRule.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/RequirementSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/RequirementSerializer.cs index a399f495f..30890a278 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/RequirementSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/RequirementSerializer.cs @@ -43,6 +43,7 @@ public class RequirementSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -71,6 +72,7 @@ private JObject Serialize(Requirement requirement) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](requirement.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](requirement.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](requirement.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), requirement.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](requirement.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/RequirementsGroupSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/RequirementsGroupSerializer.cs index c37f923c9..1750390eb 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/RequirementsGroupSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/RequirementsGroupSerializer.cs @@ -43,6 +43,7 @@ public class RequirementsGroupSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -69,6 +70,7 @@ private JObject Serialize(RequirementsGroup requirementsGroup) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](requirementsGroup.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](requirementsGroup.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](requirementsGroup.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), requirementsGroup.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](requirementsGroup.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/RequirementsSpecificationSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/RequirementsSpecificationSerializer.cs index da99ecf11..f372da5bb 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/RequirementsSpecificationSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/RequirementsSpecificationSerializer.cs @@ -43,6 +43,7 @@ public class RequirementsSpecificationSerializer : BaseThingSerializer, IThingSe private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -71,6 +72,7 @@ private JObject Serialize(RequirementsSpecification requirementsSpecification) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](requirementsSpecification.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](requirementsSpecification.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](requirementsSpecification.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), requirementsSpecification.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](requirementsSpecification.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/RuleVerificationListSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/RuleVerificationListSerializer.cs index 924547200..f21f2f2f7 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/RuleVerificationListSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/RuleVerificationListSerializer.cs @@ -43,6 +43,7 @@ public class RuleVerificationListSerializer : BaseThingSerializer, IThingSeriali private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -67,6 +68,7 @@ private JObject Serialize(RuleVerificationList ruleVerificationList) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](ruleVerificationList.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](ruleVerificationList.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), ruleVerificationList.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](ruleVerificationList.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](ruleVerificationList.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/SampledFunctionParameterTypeSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/SampledFunctionParameterTypeSerializer.cs index 1259f4a66..e6ad2112f 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/SampledFunctionParameterTypeSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/SampledFunctionParameterTypeSerializer.cs @@ -43,6 +43,7 @@ public class SampledFunctionParameterTypeSerializer : BaseThingSerializer, IThin private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -72,6 +73,7 @@ private JObject Serialize(SampledFunctionParameterType sampledFunctionParameterT { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](sampledFunctionParameterType.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](sampledFunctionParameterType.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](sampledFunctionParameterType.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), sampledFunctionParameterType.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](sampledFunctionParameterType.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/ScaleValueDefinitionSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/ScaleValueDefinitionSerializer.cs index 7f82e548a..aa22ddf1b 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/ScaleValueDefinitionSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/ScaleValueDefinitionSerializer.cs @@ -43,6 +43,7 @@ public class ScaleValueDefinitionSerializer : BaseThingSerializer, IThingSeriali private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -66,6 +67,7 @@ private JObject Serialize(ScaleValueDefinition scaleValueDefinition) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](scaleValueDefinition.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](scaleValueDefinition.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), scaleValueDefinition.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](scaleValueDefinition.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](scaleValueDefinition.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/SerializerProvider.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/SerializerProvider.cs index 08a706cb5..5df8c5dfa 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/SerializerProvider.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/SerializerProvider.cs @@ -47,7 +47,12 @@ public static class SerializerProvider { "Alias", new AliasSerializer() }, { "AndExpression", new AndExpressionSerializer() }, { "Approval", new ApprovalSerializer() }, + { "ArchitectureDiagram", new ArchitectureDiagramSerializer() }, + { "ArchitectureElement", new ArchitectureElementSerializer() }, { "ArrayParameterType", new ArrayParameterTypeSerializer() }, + { "Attachment", new AttachmentSerializer() }, + { "Behavior", new BehaviorSerializer() }, + { "BehavioralParameter", new BehavioralParameterSerializer() }, { "BinaryNote", new BinaryNoteSerializer() }, { "BinaryRelationship", new BinaryRelationshipSerializer() }, { "BinaryRelationshipRule", new BinaryRelationshipRuleSerializer() }, @@ -74,7 +79,9 @@ public static class SerializerProvider { "DerivedUnit", new DerivedUnitSerializer() }, { "DiagramCanvas", new DiagramCanvasSerializer() }, { "DiagramEdge", new DiagramEdgeSerializer() }, + { "DiagramFrame", new DiagramFrameSerializer() }, { "DiagramObject", new DiagramObjectSerializer() }, + { "DiagramPort", new DiagramPortSerializer() }, { "DomainFileStore", new DomainFileStoreSerializer() }, { "DomainOfExpertise", new DomainOfExpertiseSerializer() }, { "DomainOfExpertiseGroup", new DomainOfExpertiseGroupSerializer() }, diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/SimpleQuantityKindSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/SimpleQuantityKindSerializer.cs index 6cee8efef..ccf46613b 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/SimpleQuantityKindSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/SimpleQuantityKindSerializer.cs @@ -43,6 +43,7 @@ public class SimpleQuantityKindSerializer : BaseThingSerializer, IThingSerialize private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "defaultScale", defaultScale => new JValue(defaultScale) }, @@ -71,6 +72,7 @@ private JObject Serialize(SimpleQuantityKind simpleQuantityKind) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](simpleQuantityKind.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](simpleQuantityKind.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](simpleQuantityKind.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), simpleQuantityKind.ClassKind))); jsonObject.Add("defaultScale", this.PropertySerializerMap["defaultScale"](simpleQuantityKind.DefaultScale)); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/SimpleUnitSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/SimpleUnitSerializer.cs index b3dc57548..1e3fab501 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/SimpleUnitSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/SimpleUnitSerializer.cs @@ -43,6 +43,7 @@ public class SimpleUnitSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -66,6 +67,7 @@ private JObject Serialize(SimpleUnit simpleUnit) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](simpleUnit.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](simpleUnit.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), simpleUnit.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](simpleUnit.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](simpleUnit.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/SiteReferenceDataLibrarySerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/SiteReferenceDataLibrarySerializer.cs index e793e29eb..68027c93e 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/SiteReferenceDataLibrarySerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/SiteReferenceDataLibrarySerializer.cs @@ -43,6 +43,7 @@ public class SiteReferenceDataLibrarySerializer : BaseThingSerializer, IThingSer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "baseQuantityKind", baseQuantityKind => new JArray(((IEnumerable)baseQuantityKind).Cast().Select(x => x.ToJsonObject())) }, { "baseUnit", baseUnit => new JArray(baseUnit) }, { "classKind", classKind => new JValue(classKind.ToString()) }, @@ -79,6 +80,7 @@ private JObject Serialize(SiteReferenceDataLibrary siteReferenceDataLibrary) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](siteReferenceDataLibrary.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](siteReferenceDataLibrary.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("baseQuantityKind", this.PropertySerializerMap["baseQuantityKind"](siteReferenceDataLibrary.BaseQuantityKind.OrderBy(x => x, this.orderedItemComparer))); jsonObject.Add("baseUnit", this.PropertySerializerMap["baseUnit"](siteReferenceDataLibrary.BaseUnit.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), siteReferenceDataLibrary.ClassKind))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/SpecializedQuantityKindSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/SpecializedQuantityKindSerializer.cs index 0a94a66be..35ecdc6a2 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/SpecializedQuantityKindSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/SpecializedQuantityKindSerializer.cs @@ -43,6 +43,7 @@ public class SpecializedQuantityKindSerializer : BaseThingSerializer, IThingSeri private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "defaultScale", defaultScale => new JValue(defaultScale) }, @@ -72,6 +73,7 @@ private JObject Serialize(SpecializedQuantityKind specializedQuantityKind) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](specializedQuantityKind.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](specializedQuantityKind.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](specializedQuantityKind.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), specializedQuantityKind.ClassKind))); jsonObject.Add("defaultScale", this.PropertySerializerMap["defaultScale"](specializedQuantityKind.DefaultScale)); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/StakeHolderValueMapSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/StakeHolderValueMapSerializer.cs index be7fa34b3..6ad69ea38 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/StakeHolderValueMapSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/StakeHolderValueMapSerializer.cs @@ -43,6 +43,7 @@ public class StakeHolderValueMapSerializer : BaseThingSerializer, IThingSerializ private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -71,6 +72,7 @@ private JObject Serialize(StakeHolderValueMap stakeHolderValueMap) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](stakeHolderValueMap.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](stakeHolderValueMap.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](stakeHolderValueMap.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), stakeHolderValueMap.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](stakeHolderValueMap.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/StakeholderSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/StakeholderSerializer.cs index 69bc7c70c..5ddab0f12 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/StakeholderSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/StakeholderSerializer.cs @@ -43,6 +43,7 @@ public class StakeholderSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -67,6 +68,7 @@ private JObject Serialize(Stakeholder stakeholder) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](stakeholder.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](stakeholder.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](stakeholder.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), stakeholder.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](stakeholder.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/StakeholderValueSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/StakeholderValueSerializer.cs index 91b66ce20..f9f68ed3e 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/StakeholderValueSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/StakeholderValueSerializer.cs @@ -43,6 +43,7 @@ public class StakeholderValueSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -66,6 +67,7 @@ private JObject Serialize(StakeholderValue stakeholderValue) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](stakeholderValue.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](stakeholderValue.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](stakeholderValue.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), stakeholderValue.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](stakeholderValue.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/TermSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/TermSerializer.cs index 90ba34394..4329863ef 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/TermSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/TermSerializer.cs @@ -43,6 +43,7 @@ public class TermSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, { "excludedDomain", excludedDomain => new JArray(excludedDomain) }, @@ -66,6 +67,7 @@ private JObject Serialize(Term term) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](term.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](term.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), term.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](term.Definition.OrderBy(x => x, this.guidComparer))); jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](term.ExcludedDomain.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/TextParameterTypeSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/TextParameterTypeSerializer.cs index 398c515dc..0cf663688 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/TextParameterTypeSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/TextParameterTypeSerializer.cs @@ -43,6 +43,7 @@ public class TextParameterTypeSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -68,6 +69,7 @@ private JObject Serialize(TextParameterType textParameterType) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](textParameterType.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](textParameterType.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](textParameterType.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), textParameterType.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](textParameterType.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/TimeOfDayParameterTypeSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/TimeOfDayParameterTypeSerializer.cs index d1a484359..967a4a08d 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/TimeOfDayParameterTypeSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/TimeOfDayParameterTypeSerializer.cs @@ -43,6 +43,7 @@ public class TimeOfDayParameterTypeSerializer : BaseThingSerializer, IThingSeria private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -68,6 +69,7 @@ private JObject Serialize(TimeOfDayParameterType timeOfDayParameterType) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](timeOfDayParameterType.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](timeOfDayParameterType.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](timeOfDayParameterType.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), timeOfDayParameterType.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](timeOfDayParameterType.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/UnitPrefixSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/UnitPrefixSerializer.cs index 5f5ac4b98..d12fde377 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/UnitPrefixSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/UnitPrefixSerializer.cs @@ -43,6 +43,7 @@ public class UnitPrefixSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "conversionFactor", conversionFactor => new JValue(conversionFactor) }, { "definition", definition => new JArray(definition) }, @@ -67,6 +68,7 @@ private JObject Serialize(UnitPrefix unitPrefix) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](unitPrefix.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](unitPrefix.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), unitPrefix.ClassKind))); jsonObject.Add("conversionFactor", this.PropertySerializerMap["conversionFactor"](unitPrefix.ConversionFactor)); jsonObject.Add("definition", this.PropertySerializerMap["definition"](unitPrefix.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/AutoGenDtoSerializer/ValueGroupSerializer.cs b/CDP4JsonSerializer/AutoGenDtoSerializer/ValueGroupSerializer.cs index 7106ce74d..1146b9149 100644 --- a/CDP4JsonSerializer/AutoGenDtoSerializer/ValueGroupSerializer.cs +++ b/CDP4JsonSerializer/AutoGenDtoSerializer/ValueGroupSerializer.cs @@ -43,6 +43,7 @@ public class ValueGroupSerializer : BaseThingSerializer, IThingSerializer private readonly Dictionary> propertySerializerMap = new Dictionary> { { "alias", alias => new JArray(alias) }, + { "attachment", attachment => new JArray(attachment) }, { "category", category => new JArray(category) }, { "classKind", classKind => new JValue(classKind.ToString()) }, { "definition", definition => new JArray(definition) }, @@ -66,6 +67,7 @@ private JObject Serialize(ValueGroup valueGroup) { var jsonObject = new JObject(); jsonObject.Add("alias", this.PropertySerializerMap["alias"](valueGroup.Alias.OrderBy(x => x, this.guidComparer))); + jsonObject.Add("attachment", this.PropertySerializerMap["attachment"](valueGroup.Attachment.OrderBy(x => x, this.guidComparer))); jsonObject.Add("category", this.PropertySerializerMap["category"](valueGroup.Category.OrderBy(x => x, this.guidComparer))); jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), valueGroup.ClassKind))); jsonObject.Add("definition", this.PropertySerializerMap["definition"](valueGroup.Definition.OrderBy(x => x, this.guidComparer))); diff --git a/CDP4JsonSerializer/CDP4JsonSerializer.csproj b/CDP4JsonSerializer/CDP4JsonSerializer.csproj index 4e73d986f..e89fb44f5 100644 --- a/CDP4JsonSerializer/CDP4JsonSerializer.csproj +++ b/CDP4JsonSerializer/CDP4JsonSerializer.csproj @@ -4,7 +4,7 @@ net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netstandard2.0;netstandard2.1;netcoreapp3.1 RHEA System S.A. CDP4JsonSerializer Community Edition - 8.1.0 + 8.1.1 CDP4 JSON Serialization Library Copyright © RHEA System S.A. Sam, Merlin, Alex, Naron, Alexander, Yevhen, Nathanael diff --git a/CDP4Rules/CDP4Rules.csproj b/CDP4Rules/CDP4Rules.csproj index a9ce7f3af..b797c5059 100644 --- a/CDP4Rules/CDP4Rules.csproj +++ b/CDP4Rules/CDP4Rules.csproj @@ -4,7 +4,7 @@ net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netstandard2.0;netstandard2.1;netcoreapp3.1 RHEA System S.A. CDP4Rules Community Edition - 8.1.0 + 8.1.1 CDP4 Class Library that provides Model Analysis and Rule Checking Copyright © RHEA System S.A. Sam, Alex, Alexander, Yevhen, Nathanael diff --git a/CDP4ServicesDal/CDP4ServicesDal.csproj b/CDP4ServicesDal/CDP4ServicesDal.csproj index 188f0c7e2..182a2ed43 100644 --- a/CDP4ServicesDal/CDP4ServicesDal.csproj +++ b/CDP4ServicesDal/CDP4ServicesDal.csproj @@ -4,7 +4,7 @@ net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netstandard2.0;netstandard2.1;netcoreapp3.1 RHEA System S.A. CDP4ServicesDal Community Edition - 8.1.0 + 8.1.1 CDP4ServicesDal Dal Plugin Copyright © RHEA System S.A. Sam, Merlin, Alex, Naron, Alexander, Yevhen, Nathanael diff --git a/CDP4ServicesDal/CdpServicesDal.cs b/CDP4ServicesDal/CdpServicesDal.cs index 88b0dbc21..eb977593f 100644 --- a/CDP4ServicesDal/CdpServicesDal.cs +++ b/CDP4ServicesDal/CdpServicesDal.cs @@ -62,7 +62,7 @@ namespace CDP4ServicesDal /// The purpose of the is to provide the Data Access Layer for CDP4 ECSS-E-TM-10-25 /// Annex C, REST API /// - [DalExport("COMET/CDP4 Services", "A COMET, or CDP4 Services Data Access Layer", "1.2.0", DalType.Web)] + [DalExport("COMET/CDP4 Services", "A COMET, or CDP4 Services Data Access Layer", "1.3.0", DalType.Web)] #if NETFRAMEWORK [PartCreationPolicy(CreationPolicy.NonShared)] #endif diff --git a/CDP4ServicesDal/Headers.cs b/CDP4ServicesDal/Headers.cs index b0b2e5a47..a2caecccd 100644 --- a/CDP4ServicesDal/Headers.cs +++ b/CDP4ServicesDal/Headers.cs @@ -67,6 +67,6 @@ internal static class Headers /// /// The header that specifies the version of CDP extensions that are accepted /// - internal const string AcceptCdpVersionValue = "1.2.0"; + internal const string AcceptCdpVersionValue = "1.3.0"; } } \ No newline at end of file diff --git a/CDP4WspDal/CDP4WspDal.csproj b/CDP4WspDal/CDP4WspDal.csproj index 6a2d89844..2807019a9 100644 --- a/CDP4WspDal/CDP4WspDal.csproj +++ b/CDP4WspDal/CDP4WspDal.csproj @@ -4,7 +4,7 @@ net45;net451;net452;net46;net461;net462;net47;net471;net472;net48;netstandard2.0;netstandard2.1;netcoreapp3.1 RHEA System S.A. CDP4WspDal Community Edition - 8.1.0 + 8.1.1 CDP4 WSP Dal Plugin Copyright © RHEA System S.A. Sam, Merlin, Alex, Naron, Alexander, Yevhen, Nathanael