Changes for page 12 Constraints
Last modified by Helena K. on 2026/06/09 11:04
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -26,18 +26,18 @@ 26 26 27 27 ==== 12.2.2.1 Narrative ==== 28 28 29 -Any [[artefact>>doc:sdmx:Glossary2\.1.Artefact.WebHome]] that inherits from the //ConstrainableArtefact// interface can have[[constraints>>doc:sdmx:Glossary2\.1.Constraint.WebHome]]defined. The[[artefacts>>doc:sdmx:Glossary2\.1.Artefact.WebHome]] that can have[[constraint>>doc:sdmx:Glossary2\.1.Constraint.WebHome]] metadata attached are:29 +Any artefact that inherits from the //ConstrainableArtefact// interface can have constraints defined. The artefacts that can have constraint metadata attached are: 30 30 31 - [[Dataflow>>doc:sdmx:Glossary 2\.1.Dataflow.WebHome]]31 +Dataflow 32 32 ProvisionAgreement 33 33 DataProvider 34 34 DataStructureDefinition 35 - [[Metadataflow>>doc:sdmx:Glossary 2\.1.Metadataflow.WebHome]]35 +Metadataflow 36 36 MetaDataProvider 37 37 MetadataProvisionAgreement 38 38 MetadataStructureDefinition 39 39 40 -Note that, because the // [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]// can specify a subset of the[[component>>doc:sdmx:Glossary2\.1.Component.WebHome]]values implied by a specific //Structure// (such as a specific DataStructureDefinition or specific MetadataStructureDefinition), the //ConstrainableArtefact//s must be associated with a specific //Structure//. Therefore, whilst the //[[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]// itself may not be linked directly to a DataStructureDefinition or MetadataStructureDefinition, the[[artefact>>doc:sdmx:Glossary2\.1.Artefact.WebHome]] that it is constraining will be linked to a DataStructureDefinition or MetadataStructureDefinition. A DataProvider and MetadataProvider indirectly refernece DSDs and MSDs through their associated Data and Metadata[[Provision Agreements>>doc:sdmx:Glossary2\.1.Provisionagreement.WebHome]] as such these[[Constraints>>doc:sdmx:Glossary2\.1.Constraint.WebHome]] are restricted to Cube Regions and are applicable only to the DSDs / MSDs which contain the Componets being restricted.40 +Note that, because the //Constraint// can specify a subset of the component values implied by a specific //Structure// (such as a specific DataStructureDefinition or specific MetadataStructureDefinition), the //ConstrainableArtefact//s must be associated with a specific //Structure//. Therefore, whilst the //Constraint// itself may not be linked directly to a DataStructureDefinition or MetadataStructureDefinition, the artefact that it is constraining will be linked to a DataStructureDefinition or MetadataStructureDefinition. A DataProvider and MetadataProvider indirectly refernece DSDs and MSDs through their associated Data and Metadata Provision Agreements as such these Constraints are restricted to Cube Regions and are applicable only to the DSDs / MSDs which contain the Componets being restricted. 41 41 42 42 == 12.3 Constraints == 43 43 ... ... @@ -51,18 +51,18 @@ 51 51 52 52 ==== 12.3.2.1 Narrative ==== 53 53 54 -The [[constraint>>doc:sdmx:Glossary2\.1.Constraint.WebHome]] mechanism allows specific[[constraints>>doc:sdmx:Glossary2\.1.Constraint.WebHome]]tobe attached to a //ConstrainableArtefact//. These[[constraints>>doc:sdmx:Glossary2\.1.Constraint.WebHome]] specify a subset of the total set of values or keys that may be present in any of the //ConstrainableArtefacts//.54 +The constraint mechanism allows specific constraints to be attached to a //ConstrainableArtefact//. These constraints specify a subset of the total set of values or keys that may be present in any of the //ConstrainableArtefacts//. 55 55 56 -For instance, a DataStructureDefinition specifies, for each [[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]], the list of allowable[[code>>doc:sdmx:Glossary2\.1.Code.WebHome]]values. However, a specific[[Dataflow>>doc:sdmx:Glossary2\.1.Dataflow.WebHome]] that uses the56 +For instance, a DataStructureDefinition specifies, for each Dimension, the list of allowable code values. However, a specific Dataflow that uses the 57 57 58 -DataStructureDefinition may contain only a subset of the possible range of keys that is theoretically possible from the DataStructureDefinition definition (the total range of possibilities is sometimes called the Cartesian product of the [[dimension>>doc:sdmx:Glossary2\.1.Dimension.WebHome]]values). In addition to this, a DataProvider that is capable of supplying data according to the[[Dataflow>>doc:sdmx:Glossary2\.1.Dataflow.WebHome]]has a ProvisionAgreement, and the DataProvider may also wish to supply[[constraint>>doc:sdmx:Glossary2\.1.Constraint.WebHome]] information which may further constrain the range of possibilities in order to describe the data that the provider can supply. It may also be useful to describe the content of a[[data source>>doc:sdmx:Glossary2\.1.Data source.WebHome]]in terms of the KeySets or CubeRegions contained within it.58 +DataStructureDefinition may contain only a subset of the possible range of keys that is theoretically possible from the DataStructureDefinition definition (the total range of possibilities is sometimes called the Cartesian product of the dimension values). In addition to this, a DataProvider that is capable of supplying data according to the Dataflow has a ProvisionAgreement, and the DataProvider may also wish to supply constraint information which may further constrain the range of possibilities in order to describe the data that the provider can supply. It may also be useful to describe the content of a data source in terms of the KeySets or CubeRegions contained within it. 59 59 60 -A //ConstrainableArtefact// can have two types of // [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]//s:60 +A //ConstrainableArtefact// can have two types of //Constraint//s: 61 61 62 -1. DataConstraint – is used as a mechanism to specify the set of keys (DataKeySet), or set of [[component>>doc:sdmx:Glossary2\.1.Component.WebHome]]values (CubeRegion) that can be reported against the target ConstrainableArtefact. Multiple such DataConstraints may be present for a //ConstrainableArtefact//.63 -1. MetadataConstraint – is used as a mechanism to specify a set of [[component>>doc:sdmx:Glossary2\.1.Component.WebHome]]values (MetadatTargetRegion) that can be reported against the target ConstrainableArtefact. Multiple such MetadataConstraints may be present for a //ConstrainableArtefact//.62 +1. DataConstraint – is used as a mechanism to specify the set of keys (DataKeySet), or set of component values (CubeRegion) that can be reported against the target ConstrainableArtefact. Multiple such DataConstraints may be present for a //ConstrainableArtefact//. 63 +1. MetadataConstraint – is used as a mechanism to specify a set of component values (MetadatTargetRegion) that can be reported against the target ConstrainableArtefact. Multiple such MetadataConstraints may be present for a //ConstrainableArtefact//. 64 64 65 -Note also that another possible type of a [[Constraint>>doc:sdmx:Glossary2\.1.Constraint.WebHome]] is available; that is a AvailableDataConstraint, this is used to report the data that exists in a[[data source>>doc:sdmx:Glossary 2\.1.Datasource.WebHome]].An AvailableDataConstraint is not a[[Maintainable Artefact>>doc:sdmx:Glossary2\.1.Maintainable artefact.WebHome]] as it is geneated dynamically based on the query. An AvailableDataConstraint contains only 1 Cube Region which is used to specify the valid values per[[Dimension>>doc:sdmx:Glossary2\.1.Dimension.WebHome]] of the[[DSD>>doc:sdmx:Glossary2\.1.Data structure definition.WebHome]] that is is attached to.65 +Note also that another possible type of a Constraint is available; that is a AvailableDataConstraint, this is used to report the data that exists in a data source. An AvailableDataConstraint is not a Maintainable Artefact as it is geneated dynamically based on the query. An AvailableDataConstraint contains only 1 Cube Region which is used to specify the valid values per Dimension of the DSD that is is attached to. 66 66 67 67 === 12.3.3 Relationship Class Diagram – Detail === 68 68 ... ... @@ -72,33 +72,33 @@ 72 72 73 73 ==== 12.3.3.1 Explanation of the Diagram ==== 74 74 75 -A // [[Constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]]// is a //MaintainableArtefact//.75 +A //Constraint// is a //MaintainableArtefact//. 76 76 77 77 A DataConstraint has a choice of two ways of specifying value subsets: 78 78 79 -1. As a set of keys that can be present in the // [[DataSet>>doc:sdmx:Glossary 2\.1.Data set.WebHome]]// (DataKeySet). Each DataKey specifies a number of ComponentValues each of which reference a //[[Component>>doc:sdmx:Glossary 2\.1.Component.WebHome]]// (e.g.,[[Dimension>>doc:sdmx:Glossary 2\.1.Dimension.WebHome]], DataAttribute). Each ComponentValue is a value that may be present for a //[[Component>>doc:sdmx:Glossary 2\.1.Component.WebHome]]// of a structure when contained in a //[[DataSet>>doc:sdmx:Glossary 2\.1.Data set.WebHome]]//. In addition, each DataKeySet may also include MemberSelections for AttributeComponents or[[Measures>>doc:sdmx:Glossary 2\.1.Measure.WebHome]].80 -1. As a CubeRegion whose MemberSelections SelectionValues define a subset of allowed/disallowed values for a [[Component>>doc:sdmx:Glossary2\.1.Component.WebHome]]when contained in a //[[DataSet>>doc:sdmx:Glossary 2\.1.Data set.WebHome]]/MetadataSet//. A DataConstraint is restricted to a maximum of 2 CubeRegions, one to define included (allowable) content, and the other to define disallowed content (isIncluded=false).79 +1. As a set of keys that can be present in the //DataSet// (DataKeySet). Each DataKey specifies a number of ComponentValues each of which reference a //Component// (e.g., Dimension, DataAttribute). Each ComponentValue is a value that may be present for a //Component// of a structure when contained in a //DataSet//. In addition, each DataKeySet may also include MemberSelections for AttributeComponents or Measures. 80 +1. As a CubeRegion whose MemberSelections SelectionValues define a subset of allowed/disallowed values for a Component when contained in a //DataSet/MetadataSet//. A DataConstraint is restricted to a maximum of 2 CubeRegions, one to define included (allowable) content, and the other to define disallowed content (isIncluded=false). 81 81 82 82 The difference between (1) and (2) above is that : 83 83 84 -1. Defines a combination of [[Dimension>>doc:sdmx:Glossary2\.1.Dimension.WebHome]]values, which are assessed in combination to reference one or more[[Series>>doc:sdmx:Glossary2\.1.Series.WebHome]] in a[[Dataset>>doc:sdmx:Glossary 2\.1.Dataset.WebHome]].This combination of values can be used to explicitly include or exclude the[[Series>>doc:sdmx:Glossary2\.1.Series.WebHome]]from being reported (via the isIncluded property). In addition, once a set of[[Series>>doc:sdmx:Glossary2\.1.Series.WebHome]]are targeted by a DataKey restrictions can be applied to[[Attribute>>doc:sdmx:Glossary2\.1.Attribute.WebHome]]and Measure values by defining subsets of values that are either allowed or disallowed. The DataKeySet targets its rules to specific[[Series>>doc:sdmx:Glossary 2\.1.Series.WebHome]].85 -1. Defines a subset of values that are allowed for a [[Component>>doc:sdmx:Glossary 2\.1.Component.WebHome]].Each CubeRegion MemberSelection defines a single[[Component>>doc:sdmx:Glossary2\.1.Component.WebHome]]todefine a set of allowed or disallowed values, the MemberSelections are processed indepently of each other. The Cube Region supplies global rules, not[[series>>doc:sdmx:Glossary2\.1.Series.WebHome]] specific rules.84 +1. Defines a combination of Dimension values, which are assessed in combination to reference one or more Series in a Dataset. This combination of values can be used to explicitly include or exclude the Series from being reported (via the isIncluded property). In addition, once a set of Series are targeted by a DataKey restrictions can be applied to Attribute and Measure values by defining subsets of values that are either allowed or disallowed. The DataKeySet targets its rules to specific Series. 85 +1. Defines a subset of values that are allowed for a Component. Each CubeRegion MemberSelection defines a single Component to define a set of allowed or disallowed values, the MemberSelections are processed indepently of each other. The Cube Region supplies global rules, not series specific rules. 86 86 87 87 A MetadataConstraint has only one way of specifying value subsets: 88 88 89 -~1. As a set of MetadataTargetRegions each of which defines a “slice” of the total structure (MemberSelection) in terms of one or more MemberValues that may be present for a // [[Component>>doc:sdmx:Glossary 2\.1.Component.WebHome]]// of a structure when contained in a MetadataSet.89 +~1. As a set of MetadataTargetRegions each of which defines a “slice” of the total structure (MemberSelection) in terms of one or more MemberValues that may be present for a //Component// of a structure when contained in a MetadataSet. 90 90 91 -In both CubeRegion and MetadataTargetRegion, the value in ComponentValue.value and MemberValue.value must be consistent with the // [[Representation>>doc:sdmx:Glossary 2\.1.Representation.WebHome]]// declared for the //[[Component>>doc:sdmx:Glossary 2\.1.Component.WebHome]]// in the DataStructureDefinition ([[Dimension>>doc:sdmx:Glossary2\.1.Dimension.WebHome]] or DataAttribute) or MetadataStructureDefinition (MetadataAttribute). Note that in all cases the91 +In both CubeRegion and MetadataTargetRegion, the value in ComponentValue.value and MemberValue.value must be consistent with the //Representation// declared for the //Component// in the DataStructureDefinition (Dimension or DataAttribute) or MetadataStructureDefinition (MetadataAttribute). Note that in all cases the 92 92 93 -"operator" on the value is deemed to be "equals", unless the wildcard character is used '%'. In the latter case the "operation" is a partial matching, where the percentage character ('%') may match zero or more characters. Furthermore, it is possible in a MemberValue to specify that child values (e.g., child [[codes>>doc:sdmx:Glossary 2\.1.Code.WebHome]]) are included in the(% style="color:#e74c3c" %)Constraint(%%)by means of the cascadeValues[[attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]].The latter may take the following values:93 +"operator" on the value is deemed to be "equals", unless the wildcard character is used '%'. In the latter case the "operation" is a partial matching, where the percentage character ('%') may match zero or more characters. Furthermore, it is possible in a MemberValue to specify that child values (e.g., child codes) are included in the Constraint by means of the cascadeValues attribute. The latter may take the following values: 94 94 95 95 * "true": all children are included, 96 96 * "false" (default), or 97 -* "excludeRoot", where all children are included, and the root [[Code>>doc:sdmx:Glossary2\.1.Code.WebHome]]is excluded (i.e. the referenced[[Code>>doc:sdmx:Glossary 2\.1.Code.WebHome]]).97 +* "excludeRoot", where all children are included, and the root Code is excluded (i.e. the referenced Code). 98 98 99 -It is possible to define for the DataKeySet, DataKey, CubeRegion, MetadataTargetRegion and MemberSelection whether the set is included (isIncluded = "true", default) or excluded (isIncluded = "false") from the [[Constraint>>doc:sdmx:Glossary2\.1.Constraint.WebHome]]definition. This[[attribute>>doc:sdmx:Glossary2\.1.Attribute.WebHome]] is useful if, for example, only a small sub-set of the possible values are not included in the set, then this smaller sub-set can be defined and excluded from the[[constraint>>doc:sdmx:Glossary 2\.1.Constraint.WebHome]].Note that if the child construct is “included” and the parent construct is “excluded” then the child construct is included in the list of constructs that are “excluded”.99 +It is possible to define for the DataKeySet, DataKey, CubeRegion, MetadataTargetRegion and MemberSelection whether the set is included (isIncluded = "true", default) or excluded (isIncluded = "false") from the Constraint definition. This attribute is useful if, for example, only a small sub-set of the possible values are not included in the set, then this smaller sub-set can be defined and excluded from the constraint. Note that if the child construct is “included” and the parent construct is “excluded” then the child construct is included in the list of constructs that are “excluded”. 100 100 101 -In any MemberSelection that the corresponding // [[Component>>doc:sdmx:Glossary 2\.1.Component.WebHome]]// was using[[Codelist>>doc:sdmx:Glossary2\.1.Code list.WebHome]]with extensions, it is possible to remove the prefix that has been used, in order to refer to the original[[Codes>>doc:sdmx:Glossary 2\.1.Code.WebHome]].This is achieved via property removePrefix, which defaults to “false”.101 +In any MemberSelection that the corresponding //Component// was using Codelist with extensions, it is possible to remove the prefix that has been used, in order to refer to the original Codes. This is achieved via property removePrefix, which defaults to “false”. 102 102 103 103 In DataKeys and MemberValues it is possible, via the validFrom and validTo properties, to set a validity period for which the selected key or value is constrained. 104 104