Wiki source code of 8 Hierarchical Code List
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{box title="**Contents**"}} | ||
| 2 | {{toc/}} | ||
| 3 | {{/box}} | ||
| 4 | |||
| 5 | == {{id name="_Toc371038"/}}8.1 Scope == | ||
| 6 | |||
| 7 | The Codelist described in the section on structural definitions supports a simple [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] of [[Codes>>doc:sdmx:Glossary.Code.WebHome]], and restricts any child [[Code>>doc:sdmx:Glossary.Code.WebHome]] to having just one parent [[Code>>doc:sdmx:Glossary.Code.WebHome]]. Whilst this structure is useful for supporting the needs of the DataStructureDefinition and the MetadataStructureDefinition, it may not sufficient for supporting the more complex associations between [[codes>>doc:sdmx:Glossary.Code.WebHome]] that are often found in coding schemes such as a classification scheme. Often, the Codelist used in a DataStructureDefinition is derived from a more complex coding scheme. Access to such a coding scheme can aid applications, such as OLAP applications or data visualisation systems, to give more views of the data than would be possible with the simple Codelist used in the DataStructureDefinition. | ||
| 8 | |||
| 9 | Note that a [[hierarchical code list>>doc:sdmx:Glossary.Hierarchical code list.WebHome]] is not necessarily a balanced tree. A balanced tree is where (% style="color:#e74c3c" %)levels(%%) are pre-defined and fixed, (i.e. a (% style="color:#e74c3c" %)level(%%) always has the same set of [[codes>>doc:sdmx:Glossary.Code.WebHome]], and any [[code>>doc:sdmx:Glossary.Code.WebHome]] has a fixed parent and child relationship to other [[codes>>doc:sdmx:Glossary.Code.WebHome]]). A statistical classification is an example of a balanced tree, and the support for a balanced [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] is a sub set, and special case, of the [[hierarchical code list>>doc:sdmx:Glossary.Hierarchical code list.WebHome]]. | ||
| 10 | |||
| 11 | The principal features of the Hierarchical Codelist are: | ||
| 12 | |||
| 13 | 1. A child [[code>>doc:sdmx:Glossary.Code.WebHome]] can have more than one parent. | ||
| 14 | 1. There can be more than one [[code>>doc:sdmx:Glossary.Code.WebHome]] that has no parent (i.e. more than one “root node”). | ||
| 15 | 1. There may be many [[hierarchies>>doc:sdmx:Glossary.Hierarchy.WebHome]] (or “views”) defined, in terms of the associations between the [[codes>>doc:sdmx:Glossary.Code.WebHome]]. Each [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] serves a particular purpose in the reporting, analysis, or dissemination of data. | ||
| 16 | 1. The (% style="color:#e74c3c" %)levels(%%) in a [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] can be explicitly defined or they can be implicit: (i.e. they exist only as parent/child relationships in the coding structure). | ||
| 17 | |||
| 18 | == {{id name="_Toc371039"/}}8.2 Inheritance == | ||
| 19 | |||
| 20 | === {{id name="_Toc371040"/}}8.2.1 Class Diagram === | ||
| 21 | |||
| 22 | [[image:1747903601152-126.png]] | ||
| 23 | |||
| 24 | **Figure 30: Inheritance class diagram for the Hierarchical Codelist** | ||
| 25 | |||
| 26 | === {{id name="_Toc371041"/}}8.2.2 Explanation of the Diagram === | ||
| 27 | |||
| 28 | ==== 8.2.2.1 Narrative ==== | ||
| 29 | |||
| 30 | The HierarchicalCodelist inherits from //MaintainableArtefact// and thus has identification, naming, versioning and a [[maintenance agency>>doc:sdmx:Glossary.Maintenance agency.WebHome]]. Both //[[Hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]]// and (% style="color:#e74c3c" %)Level(%%) are a //NameableArtefact// and therefore have an Id, multi-lingual name and multi-lingual description. A HierachicalCode is an //IdentifiableArtefact//. | ||
| 31 | |||
| 32 | It is important to understand that the [[Codes>>doc:sdmx:Glossary.Code.WebHome]] participating in a HierarchicalCodelist are not themselves contained in the list – they are referenced from the list and are maintained in one or more Codelists. This is explained in the narrative of the relationship class diagram below.. | ||
| 33 | |||
| 34 | ==== 8.2.2.2 Definitions ==== | ||
| 35 | |||
| 36 | The definitions of the various classes, [[attributes>>doc:sdmx:Glossary.Attribute.WebHome]], and associations are shown in the relationship section below. | ||
| 37 | |||
| 38 | == {{id name="_Toc371042"/}}8.3 Relationship == | ||
| 39 | |||
| 40 | === {{id name="_Toc371043"/}}8.3.1 Class Diagram === | ||
| 41 | |||
| 42 | [[image:1747903661055-474.png]] | ||
| 43 | |||
| 44 | **Figure 31: Relationship class diagram of the Hierarchical Code Scheme** | ||
| 45 | |||
| 46 | === {{id name="_Toc371044"/}}8.3.2 Explanation of the Diagram === | ||
| 47 | |||
| 48 | ==== 8.3.2.1 Narrative ==== | ||
| 49 | |||
| 50 | The basic principles of the HierarchicalCodelist are: | ||
| 51 | |||
| 52 | 1. The HierarchicalCodelist is a specification of the [[Codes>>doc:sdmx:Glossary.Code.WebHome]] comprising the scheme and the specification of the structure of the [[Codes>>doc:sdmx:Glossary.Code.WebHome]] in the scheme in terms of one or more [[Hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]]. | ||
| 53 | 1. The [[Codes>>doc:sdmx:Glossary.Code.WebHome]] in the HierarchicalCodelist are not themselves a part of the scheme, rather they are references to [[Codes>>doc:sdmx:Glossary.Code.WebHome]] in one or more external Codelists. | ||
| 54 | 1. Any individual [[Code>>doc:sdmx:Glossary.Code.WebHome]] may participate in many [[Hierarchys>>doc:sdmx:Glossary.Hierarchy.WebHome]], in order to give structure to the HierarchicalCodelist. | ||
| 55 | 1. The [[Hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] of [[Codes>>doc:sdmx:Glossary.Code.WebHome]] is specified in HierarchicalCode. This references the [[Code>>doc:sdmx:Glossary.Code.WebHome]] and its immediate child HierarchicalCodes. | ||
| 56 | |||
| 57 | A [[Hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] can have formal (% style="color:#e74c3c" %)levels(%%) (hasFormalLevels=”true”). However, even if hasFormalLevels=”false” the [[Hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] can still have one or more (% style="color:#e74c3c" %)Levels(%%) associated in order to document information about the HierarchicalCodes. | ||
| 58 | |||
| 59 | If hasFormalLevels=”false the [[Hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] is “value based” comprising a [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] of [[codes>>doc:sdmx:Glossary.Code.WebHome]] with no formal (% style="color:#e74c3c" %)Levels(%%). If hasFormalLevels=”true” then the [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] is “(% style="color:#e74c3c" %)level(%%) based” where each (% style="color:#e74c3c" %)Level(%%) is a formal (% style="color:#e74c3c" %)Level(%%) in the HierarchicalCodeList, such as those present in statistical classifications. In a “(% style="color:#e74c3c" %)level(%%) based” [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] each HierarchicalCode is linked to the (% style="color:#e74c3c" %)Level(%%) in which it resides (which must be in the same [[Hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] as the HierarchicalCode). It is expected that all HierarchicalCodes at the same hierarchic (% style="color:#e74c3c" %)level(%%) defined by the +parent/+child association will be linked to the same (% style="color:#e74c3c" %)Level(%%). Note that the +(% style="color:#e74c3c" %)level(%%) association need only be specified if the HierarchicalCode is at a different hierarchical (% style="color:#e74c3c" %)level(%%) ((implied by the HierarchicalCode parent/child association) than the actual (% style="color:#e74c3c" %)Level(%%) in the (% style="color:#e74c3c" %)level(%%) [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] (implied by the (% style="color:#e74c3c" %)Level(%%) parent/child association). | ||
| 60 | |||
| 61 | [Note that organisations wishing to be compliant with accepted models for statistical classifications should ensure that the Id is the number associated with the (% style="color:#e74c3c" %)Level(%%), where (% style="color:#e74c3c" %)Levels(%%) are numbered consecutively starting with (% style="color:#e74c3c" %)level(%%) 1 at the highest (% style="color:#e74c3c" %)Level(%%)]. | ||
| 62 | |||
| 63 | The (% style="color:#e74c3c" %)Level(%%) may have CodingFormat information defined (e.g. coding type at that (% style="color:#e74c3c" %)level(%%)). | ||
| 64 | |||
| 65 | ==== 8.3.2.2 Definitions ==== | ||
| 66 | |||
| 67 | (% style="width:1122.29px" %) | ||
| 68 | |**Class**|**Feature**|(% style="width:708px" %)**Description** | ||
| 69 | |HierarchicalCode list|((( | ||
| 70 | Inherits from: | ||
| 71 | //MaintainableArtefact// | ||
| 72 | )))|(% style="width:708px" %)An organised collection of [[codes>>doc:sdmx:Glossary.Code.WebHome]] that may participate in many parent/child relationships with other [[Codes>>doc:sdmx:Glossary.Code.WebHome]] in the scheme, as defined by one or more [[Hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] of the scheme. | ||
| 73 | | |+hierarchy|(% style="width:708px" %)Association to [[Hierarchies>>doc:sdmx:Glossary.Hierarchy.WebHome]] of [[Codes>>doc:sdmx:Glossary.Code.WebHome]]. | ||
| 74 | |[[Hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]]|((( | ||
| 75 | Inherits from: | ||
| 76 | //NameableArtefact// | ||
| 77 | )))|(% style="width:708px" %)A classification structure arranged in (% style="color:#e74c3c" %)levels(%%) of detail from the broadest to the most detailed (% style="color:#e74c3c" %)level(%%). | ||
| 78 | | |hasFormalLevels|(% style="width:708px" %)((( | ||
| 79 | If “true” this indicates a [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] where the structure is arranged in (% style="color:#e74c3c" %)levels(%%) of detail from the broadest to the most detailed (% style="color:#e74c3c" %)level(%%). | ||
| 80 | If “false” this indicates a [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] structure where the items in the [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] have no formal (% style="color:#e74c3c" %)level(%%) structure. | ||
| 81 | ))) | ||
| 82 | | |+codes|(% style="width:708px" %)Association to the toplevel [[Hierarchical Codes>>doc:sdmx:Glossary.Hierarchical code.WebHome]] in the [[Hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]]. | ||
| 83 | | |+level|(% style="width:708px" %)Association to the top (% style="color:#e74c3c" %)Level(%%) in the [[Hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]]. | ||
| 84 | |(%%)(% style="color:#e74c3c" %)Level|((( | ||
| 85 | Inherits from | ||
| 86 | //NameableArtefact// | ||
| 87 | )))|(% style="width:708px" %)((( | ||
| 88 | In a “(% style="color:#e74c3c" %)level(%%) based” [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] this describes a group of [[Codes>>doc:sdmx:Glossary.Code.WebHome]] which are characterised by homogeneous coding, and where the parent of each [[Code>>doc:sdmx:Glossary.Code.WebHome]] in the group is at the same higher (% style="color:#e74c3c" %)level(%%) of the [[Hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]]. | ||
| 89 | In a “value based’ [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] this describes information about the HierarchicalCodes at the specified nesting (% style="color:#e74c3c" %)level(%%). | ||
| 90 | ))) | ||
| 91 | | |+codeFormat|(% style="width:708px" %)Association to the Coding Format. | ||
| 92 | | |+child|(% style="width:708px" %)Association to a child (% style="color:#e74c3c" %)Level(%%) of (% style="color:#e74c3c" %)Level(%%). | ||
| 93 | |CodingFormat| |(% style="width:708px" %)Specifies format information for the [[codes>>doc:sdmx:Glossary.Code.WebHome]] at this (% style="color:#e74c3c" %)level(%%) in the [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]] such as whether the [[codes>>doc:sdmx:Glossary.Code.WebHome]] at the (% style="color:#e74c3c" %)level(%%) are alphabetic, numeric or alphanumeric and the [[code>>doc:sdmx:Glossary.Code.WebHome]] length. | ||
| 94 | |HierarchicalCode| |(% style="width:708px" %)A hierarchic structure of [[code>>doc:sdmx:Glossary.Code.WebHome]] references. | ||
| 95 | | |validFrom|(% style="width:708px" %)Date from which the construct is valid | ||
| 96 | | |validTo|(% style="width:708px" %)Date from which construct is superseded. | ||
| 97 | | |+code|(% style="width:708px" %)Association to the [[Code>>doc:sdmx:Glossary.Code.WebHome]] that is used at the specific point in the [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]]. | ||
| 98 | | |+child|(% style="width:708px" %)Association to a child [[Code>>doc:sdmx:Glossary.Code.WebHome]] in the [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]]. | ||
| 99 | | |+level|(% style="width:708px" %)Association to a (% style="color:#e74c3c" %)Level(%%) where (% style="color:#e74c3c" %)levels(%%) have been defined for the [[Hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]]. | ||
| 100 | |[[Code>>doc:sdmx:Glossary.Code.WebHome]]| |(% style="width:708px" %)The [[Code>>doc:sdmx:Glossary.Code.WebHome]] to be used at this point in the [[hierarchy>>doc:sdmx:Glossary.Hierarchy.WebHome]]. | ||
| 101 | | |/items|(% style="width:708px" %)Association to the [[Code list>>doc:sdmx:Glossary.Code list.WebHome]] containing the [[Code>>doc:sdmx:Glossary.Code.WebHome]]. | ||
| 102 | |Codelist| |(% style="width:708px" %)The [[Code list>>doc:sdmx:Glossary.Code list.WebHome]] containing the [[Code>>doc:sdmx:Glossary.Code.WebHome]]. |