CodeList

Fully qualified class name: DDICDIModels::DDICDILibrary::Classes::Representations::CodeList

Definition

List of codes and associated categories.

Examples

The codes “M” and “F” could point to “Male” and “Female” categories respectively. A code list for an occupational classification system like the International Standard Classification of Occupations (ISCO-08: https://www.ilo.org/public/english/bureau/stat/isco/isco08/) could use a classification relation structure to describe a hierarchy (Chief Executives and Administrative and Commercial Managers as subtypes of Managers).

Explanatory notes

List may be flat or hierarchical. A hierarchical structure may have an indexed order for intended presentation even though the content within levels of the hierarchy are conceptually unordered. For hierarchical structures classification item structure is used to provide additional information on the structure and organization of the categories. Note that a category set can be structured by a classification relation structure without the need for associating any codes with the categories. This allows for the creation of a category set, for example for a response domain, without an associated codelist.

Diagram

Inheritance
  ᐊ── Representations::CodeList
Attributes

Name

Inherited from

Description

Data Type

Multiplicity

Default value

allowsDuplicates

- own class -

If value is False, the members are unique within the collection - if True, there may be duplicates. (Note that a mathematical “bag” permits duplicates and is unordered - a “set” does not have duplicates and may be ordered.)

Boolean

1..1

identifier

Representations::EnumerationDomain

Identifier for objects requiring short- or long-lasting referencing and management.

Identifier

0..1

name

Representations::EnumerationDomain

Human understandable name (liguistic signifier, word, phrase, or mnemonic). May follow ISO/IEC 11179-5 naming principles, and have context provided to specify usage.

ObjectName

0..*

purpose

Representations::EnumerationDomain

Intent or reason for the object/the description of the object.

InternationalString

0..1

Associations

Direction

Association

Description

Multiplicity of CodeList

Package of Other Class

Other Class

Multiplicity of other class

Aggregation Kind

Inherited from

from

EnumerationDomain isDefinedBy Concept

The conceptual basis for the collection of members.

0..*

Conceptual

Concept

0..*

none

Representations::EnumerationDomain

from

EnumerationDomain references CategorySet

Category set associated with the enumeration.

0..*

Conceptual

CategorySet

0..1

none

Representations::EnumerationDomain

from

EnumerationDomain uses LevelStructure

Has meaningful level to which members belong.

0..*

- own package -

LevelStructure

0..1

none

Representations::EnumerationDomain

to

SentinelValueDomain takesValuesFrom EnumerationDomain

Any subtype of an enumeration domain enumerating the set of valid values.

0..1

- own package -

SentinelValueDomain

0..*

none

Representations::EnumerationDomain

to

SubstantiveValueDomain takesValuesFrom EnumerationDomain

Any subtype of an enumeration domain enumerating the set of valid values.

0..1

- own package -

SubstantiveValueDomain

0..*

none

Representations::EnumerationDomain

to

DimensionalKeyMember hasValueFrom CodeList

1..1

Dimensional

DimensionalKeyMember

0..*

none

- own class -

from

CodeList has Code

0..*

- own package -

Code

0..*

shared

- own class -

from

CodeList has CodePosition

1..1

- own package -

CodePosition

0..*

composite

- own class -

to

CodeListStructure structures CodeList

0..1

- own package -

CodeListStructure

0..1

none

- own class -

Syntax representations / encodings

All syntax representations except the Canonical XMI are provided as reference points for specific implementations, or for use as defaults if sufficient in the form presented.

Fragment for the class CodeList (entire model as XMI)

 1<packagedElement xmlns:StandardProfile="http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard"
 2                 xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML"
 3                 xmlns:xmi="http://www.omg.org/spec/XMI/20131001"
 4                 xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList"
 5                 xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#CodeList"
 6                 xmi:type="uml:Class">
 7   <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList-ownedComment"
 8                 xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#CodeList-ownedComment"
 9                 xmi:type="uml:Comment">
10      <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList"/>
11      <body>Definition 
12============ 
13List of codes and associated categories.  
14
15Examples 
16========== 
17The codes "M" and "F" could point to "Male" and "Female" categories respectively.  A code list for an occupational classification system like the International Standard Classification of Occupations (ISCO-08: https://www.ilo.org/public/english/bureau/stat/isco/isco08/) could use a classification relation structure to describe a hierarchy (Chief Executives and Administrative and Commercial Managers as subtypes of Managers).   
18
19Explanatory notes 
20=================== 
21List may be flat or hierarchical. A hierarchical structure may have an indexed order for intended presentation even though the content within levels of the hierarchy are conceptually unordered. For hierarchical structures classification item structure is used to provide additional information on the structure and organization of the categories. Note that a category set can be structured by a classification relation structure without the need for associating any codes with the categories. This allows for the creation of a category set, for example for a response domain, without an associated codelist.</body>
22   </ownedComment>
23   <name>CodeList</name>
24   <generalization xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList-generalization"
25                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#CodeList-generalization"
26                   xmi:type="uml:Generalization">
27      <general xmi:idref="DDICDIModels-DDICDILibrary-Classes-Representations-EnumerationDomain"/>
28   </generalization>
29   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList-allowsDuplicates"
30                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#CodeList-allowsDuplicates"
31                   xmi:type="uml:Property">
32      <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList-allowsDuplicates-ownedComment"
33                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#CodeList-allowsDuplicates-ownedComment"
34                    xmi:type="uml:Comment">
35         <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList-allowsDuplicates"/>
36         <body>If value is False, the members are unique within the collection - if True, there may be duplicates. (Note that a mathematical “bag” permits duplicates and is unordered - a “set” does not have duplicates and may be ordered.)</body>
37      </ownedComment>
38      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList-allowsDuplicates-lowerValue"
39                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#CodeList-allowsDuplicates-lowerValue"
40                  xmi:type="uml:LiteralInteger">
41         <value>1</value>
42      </lowerValue>
43      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList-allowsDuplicates-upperValue"
44                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#CodeList-allowsDuplicates-upperValue"
45                  xmi:type="uml:LiteralUnlimitedNatural">
46         <value>1</value>
47      </upperValue>
48      <name>allowsDuplicates</name>
49      <type href="http://www.eclipse.org/uml2/5.0.0/UML/PrimitiveTypes.xmi#Boolean"
50            xmi:type="uml:PrimitiveType"/>
51   </ownedAttribute>
52   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList-ownedAttribute_1"
53                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#CodeList-ownedAttribute_1"
54                   xmi:type="uml:Property">
55      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList-ownedAttribute_1-lowerValue"
56                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#CodeList-ownedAttribute_1-lowerValue"
57                  xmi:type="uml:LiteralInteger"/>
58      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList-ownedAttribute_1-upperValue"
59                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#CodeList-ownedAttribute_1-upperValue"
60                  xmi:type="uml:LiteralUnlimitedNatural">
61         <value>*</value>
62      </upperValue>
63      <aggregation>composite</aggregation>
64      <association xmi:idref="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList_has_CodePosition"/>
65      <type xmi:idref="DDICDIModels-DDICDILibrary-Classes-Representations-CodePosition"/>
66   </ownedAttribute>
67   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList-ownedAttribute_2"
68                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#CodeList-ownedAttribute_2"
69                   xmi:type="uml:Property">
70      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList-ownedAttribute_2-lowerValue"
71                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#CodeList-ownedAttribute_2-lowerValue"
72                  xmi:type="uml:LiteralInteger"/>
73      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList-ownedAttribute_2-upperValue"
74                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#CodeList-ownedAttribute_2-upperValue"
75                  xmi:type="uml:LiteralUnlimitedNatural">
76         <value>*</value>
77      </upperValue>
78      <aggregation>shared</aggregation>
79      <association xmi:idref="DDICDIModels-DDICDILibrary-Classes-Representations-CodeList_has_Code"/>
80      <type xmi:idref="DDICDIModels-DDICDILibrary-Classes-Representations-Code"/>
81   </ownedAttribute>
82</packagedElement>

Fragment for the class CodeList (entire XML Schema)

  1<xs:element name="CodeList"
  2            type="CodeListXsdType"
  3            xml:id="CodeList">
  4  <!-- based on the UML class DDICDIModels::DDICDILibrary::Classes::Representations::CodeList -->
  5  <xs:annotation>
  6    <xs:documentation>Definition 
  7          ============ 
  8          List of codes and associated categories.  
  9          
 10          Examples 
 11          ========== 
 12          The codes "M" and "F" could point to "Male" and "Female" categories respectively.  A code list for an occupational classification system like the International Standard Classification of Occupations (ISCO-08: https://www.ilo.org/public/english/bureau/stat/isco/isco08/) could use a classification relation structure to describe a hierarchy (Chief Executives and Administrative and Commercial Managers as subtypes of Managers).   
 13          
 14          Explanatory notes 
 15          =================== 
 16          List may be flat or hierarchical. A hierarchical structure may have an indexed order for intended presentation even though the content within levels of the hierarchy are conceptually unordered. For hierarchical structures classification item structure is used to provide additional information on the structure and organization of the categories. Note that a category set can be structured by a classification relation structure without the need for associating any codes with the categories. This allows for the creation of a category set, for example for a response domain, without an associated codelist.</xs:documentation>
 17  </xs:annotation>
 18</xs:element>
 19<xs:complexType name="CodeListXsdType"
 20                xml:id="CodeListXsdType">
 21  <xs:annotation>
 22    <xs:documentation>Definition 
 23          ============ 
 24          List of codes and associated categories.  
 25          
 26          Examples 
 27          ========== 
 28          The codes "M" and "F" could point to "Male" and "Female" categories respectively.  A code list for an occupational classification system like the International Standard Classification of Occupations (ISCO-08: https://www.ilo.org/public/english/bureau/stat/isco/isco08/) could use a classification relation structure to describe a hierarchy (Chief Executives and Administrative and Commercial Managers as subtypes of Managers).   
 29          
 30          Explanatory notes 
 31          =================== 
 32          List may be flat or hierarchical. A hierarchical structure may have an indexed order for intended presentation even though the content within levels of the hierarchy are conceptually unordered. For hierarchical structures classification item structure is used to provide additional information on the structure and organization of the categories. Note that a category set can be structured by a classification relation structure without the need for associating any codes with the categories. This allows for the creation of a category set, for example for a response domain, without an associated codelist.</xs:documentation>
 33  </xs:annotation>
 34  <xs:complexContent>
 35    <xs:extension base="EnumerationDomainXsdType">
 36      <xs:sequence>
 37        <xs:element name="allowsDuplicates"
 38                    type="xs:boolean"
 39                    minOccurs="1"
 40                    maxOccurs="1"
 41                    xml:id="CodeList-allowsDuplicates">
 42          <xs:annotation>
 43            <xs:documentation>If value is False, the members are unique within the collection - if True, there may be duplicates. (Note that a mathematical “bag” permits duplicates and is unordered - a “set” does not have duplicates and may be ordered.)</xs:documentation>
 44          </xs:annotation>
 45        </xs:element>
 46        <xs:element name="CodeList_has_CodePosition"
 47                    minOccurs="0"
 48                    maxOccurs="unbounded"
 49                    xml:id="CodeList_has_CodePosition">
 50          <xs:annotation>
 51            <xs:documentation></xs:documentation>
 52          </xs:annotation>
 53          <xs:complexType>
 54            <xs:complexContent>
 55              <xs:restriction base="AssociationReferenceXsdType">
 56                <xs:sequence>
 57                  <xs:element name="ddiReference"
 58                              type="InternationalRegistrationDataIdentifierXsdType"
 59                              minOccurs="0"
 60                              maxOccurs="1"
 61                              xml:id="CodeList_has_CodePosition-ddiReference"/>
 62                  <xs:element name="validType"
 63                              minOccurs="1"
 64                              maxOccurs="1"
 65                              xml:id="CodeList_has_CodePosition-validType">
 66                    <xs:simpleType>
 67                      <xs:restriction base="xs:NMTOKEN">
 68                        <xs:enumeration value="CodePosition"/>
 69                      </xs:restriction>
 70                    </xs:simpleType>
 71                  </xs:element>
 72                </xs:sequence>
 73              </xs:restriction>
 74            </xs:complexContent>
 75          </xs:complexType>
 76        </xs:element>
 77        <xs:element name="CodeList_has_Code"
 78                    minOccurs="0"
 79                    maxOccurs="unbounded"
 80                    xml:id="CodeList_has_Code">
 81          <xs:annotation>
 82            <xs:documentation></xs:documentation>
 83          </xs:annotation>
 84          <xs:complexType>
 85            <xs:complexContent>
 86              <xs:restriction base="AssociationReferenceXsdType">
 87                <xs:sequence>
 88                  <xs:element name="ddiReference"
 89                              type="InternationalRegistrationDataIdentifierXsdType"
 90                              minOccurs="0"
 91                              maxOccurs="1"
 92                              xml:id="CodeList_has_Code-ddiReference"/>
 93                  <xs:element name="validType"
 94                              minOccurs="0"
 95                              maxOccurs="unbounded"
 96                              xml:id="CodeList_has_Code-validType">
 97                    <xs:simpleType>
 98                      <xs:restriction base="xs:NMTOKEN">
 99                        <xs:enumeration value="Code"/>
100                      </xs:restriction>
101                    </xs:simpleType>
102                  </xs:element>
103                </xs:sequence>
104              </xs:restriction>
105            </xs:complexContent>
106          </xs:complexType>
107        </xs:element>
108      </xs:sequence>
109    </xs:extension>
110  </xs:complexContent>
111</xs:complexType>

Fragment for the class CodeList (main ontology)

 1# class CodeList
 2# based on the UML class DDICDIModels::DDICDILibrary::Classes::Representations::CodeList
 3cdi:CodeList
 4  a rdfs:Class, owl:Class, ucmis:Class;
 5  rdfs:label "CodeList";
 6  rdfs:comment "Definition \n============ \nList of codes and associated categories.  \n\nExamples \n========== \nThe codes \"M\" and \"F\" could point to \"Male\" and \"Female\" categories respectively.  A code list for an occupational classification system like the International Standard Classification of Occupations (ISCO-08: https://www.ilo.org/public/english/bureau/stat/isco/isco08/) could use a classification relation structure to describe a hierarchy (Chief Executives and Administrative and Commercial Managers as subtypes of Managers).   \n\nExplanatory notes \n=================== \nList may be flat or hierarchical. A hierarchical structure may have an indexed order for intended presentation even though the content within levels of the hierarchy are conceptually unordered. For hierarchical structures classification item structure is used to provide additional information on the structure and organization of the categories. Note that a category set can be structured by a classification relation structure without the need for associating any codes with the categories. This allows for the creation of a category set, for example for a response domain, without an associated codelist."@en;
 7  rdfs:subClassOf cdi:EnumerationDomain;
 8.
 9
10cdi:CodeList-allowsDuplicates
11  a rdf:Property, owl:DatatypeProperty, ucmis:Attribute;
12  rdfs:label "allowsDuplicates";
13  rdfs:comment "If value is False, the members are unique within the collection - if True, there may be duplicates. (Note that a mathematical “bag” permits duplicates and is unordered - a “set” does not have duplicates and may be ordered.)"@en;
14  rdfs:domain cdi:CodeList;
15  rdfs:range xsd:boolean;
16.
17
18
19cdi:CodeList_has_Code
20  a rdf:Property, owl:ObjectProperty, ucmis:Association;
21  # ASSOCIATION
22  rdfs:label "has";
23  skos:altLabel "CodeList_has_Code";
24  
25  rdfs:domain cdi:CodeList;
26  rdfs:range cdi:Code;
27.
28
29cdi:CodeList_has_CodePosition
30  a rdf:Property, owl:ObjectProperty, ucmis:Association;
31  # ASSOCIATION
32  rdfs:label "has";
33  skos:altLabel "CodeList_has_CodePosition";
34  
35  rdfs:domain cdi:CodeList;
36  rdfs:range cdi:CodePosition;
37.

Fragment for the class CodeList (main JSON-LD)

 1{
 2  "@context": [
 3    "EnumerationDomain.jsonld",
 4    {
 5      "cdi": "http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/",
 6      "xsd": "http://www.w3.org/2001/XMLSchema#",
 7      "CodeList": "cdi:CodeList",
 8      "allowsDuplicates": {
 9        "@id": "cdi:CodeList-allowsDuplicates",
10        "@type": "xsd:boolean"
11      },
12      
13      "has": {
14        "@id": "cdi:CodeList_has_Code",
15        "@type": "@id"      },
16      "has": {
17        "@id": "cdi:CodeList_has_CodePosition",
18        "@type": "@id"      },
19      "hasValueFrom_OF_DimensionalKeyMember": {
20        "@reverse": "cdi:DimensionalKeyMember_hasValueFrom_CodeList",
21        "@type": "@id"
22      },
23      "structures_OF_CodeListStructure": {
24        "@reverse": "cdi:CodeListStructure_structures_CodeList",
25        "@type": "@id"
26      },
27      " comment ": "tag:json-should-support-trailing-commas" 
28    }
29  ],
30  "generatedBy": "This code was generated by the Eclipse Acceleo project UCMIS M2T on 2024-03-16 23:40:12.",
31  "basedOn": "based on the UML data type DDICDIModels::DDICDILibrary::Classes::Representations::CodeList"
32}