Skip to content

Cyclic Cycles

samatstarion edited this page Aug 28, 2024 · 8 revisions

E-TM-10-25 Possible Cyclic Cycles

The CDP4-COMET data model, derived from ECSS-E-TM-10-25A-Annex-A, is an object graph in which potential cyclic references can be created when the datatypes are instantiated. The creation of such cyclic data shall not be permiited by software implementations. The CDP4-COMET Webservices makes sure that cyclic data is avoided, the validations are implemented in the SideEffects. In case a cycle would be introduced in the dataset a AcyclicValidationException is thrown.

The following tables provide an overview of the datatypes where cylces may occur and a link to the CDP4-COMET Web Services source code where the potential for cyclic references are checked and prohibited.

EngineeringModel namespace

Type Possible Cycle Description Source code link
BooleanExpression via term BooleanExpressionSideEffect
ElementDefinition via containedElement.elementDefinition and referencedElement.elementUsage.elementDefinition and referencedElement.rootElement ElementDefinitionSideEffect
ElementUsage via elementDefinition.containedElement ElementDefinitionSideEffect
NestedElement via elementUsage.elementDefinition and via referencedElement.rootElement persistence of NestedElements is an untested and unused feature of the CDP4 Webservices
ParameterGroup via containingGroup ParameterGroupSideEffect
RequirementsGroup via group RequirementsGroupSideEffect

The following classes can cause cycles that are not prohibited as they do not cause any unwanted side-effects.

Type Possible Cycle Description
BinaryRelationship via term
MultiRelationship via term

SiteDirectory namespace

Type Possible Cycle Description Source code link
CompoundParameterType via component.parameterType CompoundParameterTypeBaseSideEffect
Category via superCategory CategorySideEffect
ConversionBasedUnit via referenceUnit ConversionBasedUnitSideEffect
DerivedQuantityKind via quantityKindFactor.quantityKind DerivedQuantityKindSideEffect
DerivedUnit via unitFactor.unit DerivedUnitSideEffect
IterationSetup via sourceIterationSetup IterationSetupSideEffect
MeasurementScale via mappingToReferenceScale.referenceScaleValue.container or mappingToReferenceScale.dependentScaleValue.container MeasurementScaleSideEffect
SiteReferenceDataLibrary via requiredRdl SiteReferenceDataLibrarySideEffect
SpecializedQuantityKind via general SpecializedQuantityKindSideEffect