Code

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

Definition

The characters used as a symbol to designate a category within a codelist or classification. (Formally, a sign for which the signifier is non-linguistic alphanumeric string.)

Examples

The letter M might stand for the category “Male” in the codeList called “Gender”.

Explanatory notes

A non-linguistic alphanumeric string is one which does not correspond to a word in natural language. For use in a codelist. The representation property (value) is expressed as it would be found in a data file. Multiple representations may relate to the same category but should be expressed as separate codes. It should not be confused with a classification item which is a placeholder for a position in a statistical classification.

Diagram

Attributes

Name

Inherited from

Description

Data Type

Multiplicity

Default value

identifier

- own class -

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

Identifier

0..1

Associations

Direction

Association

Description

Multiplicity of Code

Package of Other Class

Other Class

Multiplicity of other class

Aggregation Kind

Inherited from

from

Code denotes Category

A definition for the code. Specialization of denotes for categories.

0..*

Conceptual

Category

1..1

none

- own class -

from

Code uses Notation

0..*

DataDescription

Notation

1..1

none

- own class -

to

CodeList has Code

0..*

- own package -

CodeList

0..*

none

- own class -

to

CodePosition indexes Code

0..1

- own package -

CodePosition

0..*

none

- own class -

to

CodeRelationship hasSource Code

0..*

- own package -

CodeRelationship

0..*

none

- own class -

to

CodeRelationship hasTarget Code

Note that this can be realized as a collection to support tuples.

0..*

- own package -

CodeRelationship

0..*

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 Code (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-Code"
 5                 xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Code"
 6                 xmi:type="uml:Class">
 7   <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-Code-ownedComment"
 8                 xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Code-ownedComment"
 9                 xmi:type="uml:Comment">
10      <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-Representations-Code"/>
11      <body>Definition 
12============ 
13The characters used as a symbol to designate a category within a codelist or classification. (Formally, a sign for which the signifier is non-linguistic alphanumeric string.)   
14
15Examples 
16========== 
17The letter M might stand for the category "Male" in the codeList called "Gender".  
18
19Explanatory notes 
20=================== 
21A non-linguistic alphanumeric string is one which does not correspond to a word in natural language. For use in a codelist. The representation property (value) is expressed as it would be found in a data file. Multiple representations may relate to the same category but should be expressed as separate codes.  It should not be confused with a classification item which is a placeholder for a position in a statistical classification.</body>
22   </ownedComment>
23   <name>Code</name>
24   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-Code-identifier"
25                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Code-identifier"
26                   xmi:type="uml:Property">
27      <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-Code-identifier-ownedComment"
28                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Code-identifier-ownedComment"
29                    xmi:type="uml:Comment">
30         <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-Representations-Code-identifier"/>
31         <body>Identifier for objects requiring short- or long-lasting referencing and management.</body>
32      </ownedComment>
33      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-Code-identifier-lowerValue"
34                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Code-identifier-lowerValue"
35                  xmi:type="uml:LiteralInteger"/>
36      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-Code-identifier-upperValue"
37                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Code-identifier-upperValue"
38                  xmi:type="uml:LiteralUnlimitedNatural">
39         <value>1</value>
40      </upperValue>
41      <name>identifier</name>
42      <isID>true</isID>
43      <type xmi:idref="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-Identifier"/>
44   </ownedAttribute>
45   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-Code-ownedAttribute_1"
46                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Code-ownedAttribute_1"
47                   xmi:type="uml:Property">
48      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-Code-ownedAttribute_1-lowerValue"
49                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Code-ownedAttribute_1-lowerValue"
50                  xmi:type="uml:LiteralInteger">
51         <value>1</value>
52      </lowerValue>
53      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-Code-ownedAttribute_1-upperValue"
54                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Code-ownedAttribute_1-upperValue"
55                  xmi:type="uml:LiteralUnlimitedNatural">
56         <value>1</value>
57      </upperValue>
58      <association xmi:idref="DDICDIModels-DDICDILibrary-Classes-Conceptual-Code_denotes_Category"/>
59      <type xmi:idref="DDICDIModels-DDICDILibrary-Classes-Conceptual-Category"/>
60   </ownedAttribute>
61   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-Code-ownedAttribute_2"
62                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Code-ownedAttribute_2"
63                   xmi:type="uml:Property">
64      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-Code-ownedAttribute_2-lowerValue"
65                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Code-ownedAttribute_2-lowerValue"
66                  xmi:type="uml:LiteralInteger">
67         <value>1</value>
68      </lowerValue>
69      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Representations-Code-ownedAttribute_2-upperValue"
70                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Code-ownedAttribute_2-upperValue"
71                  xmi:type="uml:LiteralUnlimitedNatural">
72         <value>1</value>
73      </upperValue>
74      <association xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Code_uses_Notation"/>
75      <type xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Notation"/>
76   </ownedAttribute>
77</packagedElement>

Fragment for the class Code (entire XML Schema)

  1<xs:element name="Code"
  2            type="CodeXsdType"
  3            xml:id="Code">
  4  <!-- based on the UML class DDICDIModels::DDICDILibrary::Classes::Representations::Code -->
  5  <xs:annotation>
  6    <xs:documentation>Definition 
  7          ============ 
  8          The characters used as a symbol to designate a category within a codelist or classification. (Formally, a sign for which the signifier is non-linguistic alphanumeric string.)   
  9          
 10          Examples 
 11          ========== 
 12          The letter M might stand for the category "Male" in the codeList called "Gender".  
 13          
 14          Explanatory notes 
 15          =================== 
 16          A non-linguistic alphanumeric string is one which does not correspond to a word in natural language. For use in a codelist. The representation property (value) is expressed as it would be found in a data file. Multiple representations may relate to the same category but should be expressed as separate codes.  It should not be confused with a classification item which is a placeholder for a position in a statistical classification.</xs:documentation>
 17  </xs:annotation>
 18</xs:element>
 19<xs:complexType name="CodeXsdType"
 20                xml:id="CodeXsdType">
 21  <xs:annotation>
 22    <xs:documentation>Definition 
 23          ============ 
 24          The characters used as a symbol to designate a category within a codelist or classification. (Formally, a sign for which the signifier is non-linguistic alphanumeric string.)   
 25          
 26          Examples 
 27          ========== 
 28          The letter M might stand for the category "Male" in the codeList called "Gender".  
 29          
 30          Explanatory notes 
 31          =================== 
 32          A non-linguistic alphanumeric string is one which does not correspond to a word in natural language. For use in a codelist. The representation property (value) is expressed as it would be found in a data file. Multiple representations may relate to the same category but should be expressed as separate codes.  It should not be confused with a classification item which is a placeholder for a position in a statistical classification.</xs:documentation>
 33  </xs:annotation>
 34  <xs:sequence>
 35    <xs:element name="identifier"
 36                type="IdentifierXsdType"
 37                minOccurs="0"
 38                maxOccurs="1"
 39                xml:id="Code-identifier">
 40      <xs:annotation>
 41        <xs:documentation>Identifier for objects requiring short- or long-lasting referencing and management.</xs:documentation>
 42      </xs:annotation>
 43    </xs:element>
 44    <xs:element name="Code_denotes_Category"
 45                minOccurs="1"
 46                maxOccurs="1"
 47                xml:id="Code_denotes_Category">
 48      <xs:annotation>
 49        <xs:documentation>A definition for the code. Specialization of denotes for categories.</xs:documentation>
 50      </xs:annotation>
 51      <xs:complexType>
 52        <xs:complexContent>
 53          <xs:restriction base="AssociationReferenceXsdType">
 54            <xs:sequence>
 55              <xs:element name="ddiReference"
 56                          type="InternationalRegistrationDataIdentifierXsdType"
 57                          minOccurs="0"
 58                          maxOccurs="1"
 59                          xml:id="Code_denotes_Category-ddiReference"/>
 60              <xs:element name="validType"
 61                          minOccurs="0"
 62                          maxOccurs="unbounded"
 63                          xml:id="Code_denotes_Category-validType">
 64                <xs:simpleType>
 65                  <xs:restriction base="xs:NMTOKEN">
 66                    <xs:enumeration value="Category"/>
 67                  </xs:restriction>
 68                </xs:simpleType>
 69              </xs:element>
 70            </xs:sequence>
 71          </xs:restriction>
 72        </xs:complexContent>
 73      </xs:complexType>
 74    </xs:element>
 75    <xs:element name="Code_uses_Notation"
 76                minOccurs="1"
 77                maxOccurs="1"
 78                xml:id="Code_uses_Notation">
 79      <xs:annotation>
 80        <xs:documentation></xs:documentation>
 81      </xs:annotation>
 82      <xs:complexType>
 83        <xs:complexContent>
 84          <xs:restriction base="AssociationReferenceXsdType">
 85            <xs:sequence>
 86              <xs:element name="ddiReference"
 87                          type="InternationalRegistrationDataIdentifierXsdType"
 88                          minOccurs="0"
 89                          maxOccurs="1"
 90                          xml:id="Code_uses_Notation-ddiReference"/>
 91              <xs:element name="validType"
 92                          minOccurs="0"
 93                          maxOccurs="unbounded"
 94                          xml:id="Code_uses_Notation-validType">
 95                <xs:simpleType>
 96                  <xs:restriction base="xs:NMTOKEN">
 97                    <xs:enumeration value="Notation"/>
 98                  </xs:restriction>
 99                </xs:simpleType>
100              </xs:element>
101            </xs:sequence>
102          </xs:restriction>
103        </xs:complexContent>
104      </xs:complexType>
105    </xs:element>
106  </xs:sequence>
107</xs:complexType>

Fragment for the class Code (main ontology)

 1# class Code
 2# based on the UML class DDICDIModels::DDICDILibrary::Classes::Representations::Code
 3cdi:Code
 4  a rdfs:Class, owl:Class, ucmis:Class;
 5  rdfs:label "Code";
 6  rdfs:comment "Definition \n============ \nThe characters used as a symbol to designate a category within a codelist or classification. (Formally, a sign for which the signifier is non-linguistic alphanumeric string.)   \n\nExamples \n========== \nThe letter M might stand for the category \"Male\" in the codeList called \"Gender\".  \n\nExplanatory notes \n=================== \nA non-linguistic alphanumeric string is one which does not correspond to a word in natural language. For use in a codelist. The representation property (value) is expressed as it would be found in a data file. Multiple representations may relate to the same category but should be expressed as separate codes.  It should not be confused with a classification item which is a placeholder for a position in a statistical classification."@en;
 7  
 8.
 9
10cdi:Code-identifier
11  a rdf:Property, owl:ObjectProperty, ucmis:Attribute;
12  rdfs:label "identifier";
13  rdfs:comment "Identifier for objects requiring short- or long-lasting referencing and management."@en;
14  rdfs:domain cdi:Code;
15  rdfs:range cdi:Identifier;
16.
17
18
19cdi:Code_denotes_Category
20  a rdf:Property, owl:ObjectProperty, ucmis:Association;
21  # ASSOCIATION
22  rdfs:label "denotes";
23  skos:altLabel "Code_denotes_Category";
24  rdfs:comment "A definition for the code. Specialization of denotes for categories."@en;
25  rdfs:domain cdi:Code;
26  rdfs:range cdi:Category;
27.
28
29cdi:Code_uses_Notation
30  a rdf:Property, owl:ObjectProperty, ucmis:Association;
31  # ASSOCIATION
32  rdfs:label "uses";
33  skos:altLabel "Code_uses_Notation";
34  
35  rdfs:domain cdi:Code;
36  rdfs:range cdi:Notation;
37.

Fragment for the class Code (main JSON-LD)

 1{
 2  "@context": [
 3    {
 4      "cdi": "http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/",
 5      "xsd": "http://www.w3.org/2001/XMLSchema#",
 6      "Code": "cdi:Code",
 7      "identifier": {
 8        "@id": "cdi:Code-identifier",
 9        "@type": "@id",
10        "@context": "Identifier.jsonld"
11      },
12      
13      "denotes": {
14        "@id": "cdi:Code_denotes_Category",
15        "@type": "@id"      },
16      "uses": {
17        "@id": "cdi:Code_uses_Notation",
18        "@type": "@id"      },
19      "has_OF_CodeList": {
20        "@reverse": "cdi:CodeList_has_Code",
21        "@type": "@id"
22      },
23      "indexes_OF_CodePosition": {
24        "@reverse": "cdi:CodePosition_indexes_Code",
25        "@type": "@id"
26      },
27      "hasSource_OF_CodeRelationship": {
28        "@reverse": "cdi:CodeRelationship_hasSource_Code",
29        "@type": "@id"
30      },
31      "hasTarget_OF_CodeRelationship": {
32        "@reverse": "cdi:CodeRelationship_hasTarget_Code",
33        "@type": "@id"
34      },
35      " comment ": "tag:json-should-support-trailing-commas" 
36    }
37  ],
38  "generatedBy": "This code was generated by the Eclipse Acceleo project UCMIS M2T on 2024-03-16 23:40:12.",
39  "basedOn": "based on the UML data type DDICDIModels::DDICDILibrary::Classes::Representations::Code"
40}