PrimaryKey#

Fully qualified class name of the UML model DDI-CDI 1.0: DDICDIModels::DDICDILibrary::Classes::DataDescription::Components::PrimaryKey

Definition#

Role of a set of data structure components for content linkage purposes

Explanatory notes#

Equivalent to primary key in the relational model. A primary key essentially indicates which data structure components correspond to key members. It can also be used in conjunction with foreign key to link data structures and their related datasets.

Diagram#

Diagram

Attributes#

Attributes
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#

Associations
Associations#

Direction

Association

Description

Multiplicity of PrimaryKey

Package of Other Class

Other Class

Multiplicity of other class

Aggregation Kind

Inherited from

to

DataStructure has PrimaryKey

0..1

DataDescription

DataStructure

1..1

none

own class

from

PrimaryKey isComposedOf PrimaryKeyComponent

1..1

- own package -

PrimaryKeyComponent

1..*

composite

own class

Encodings#

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 PrimaryKey (entire model as XMI)

 1<packagedElement xmlns:StandardProfile="http://www.omg.org/spec/UML/20131001/StandardProfile"
 2                  xmlns:uml="http://www.omg.org/spec/UML/20131001"
 3                  xmlns:xmi="http://www.omg.org/spec/XMI/20131001"
 4                  xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKey"
 5                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKey"
 6                  xmi:type="uml:Class">
 7   <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKey-ownedComment"
 8                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKey-ownedComment"
 9                  xmi:type="uml:Comment">
10      <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKey"/>
11      <body>Definition
12============
13Role of a set of data structure components for content linkage purposes
14
15Explanatory notes
16===================
17Equivalent to primary key in the relational model.
18A primary key essentially indicates which data structure components correspond to key members.
19It can also be used in conjunction with foreign key to link data structures and their related datasets.</body>
20   </ownedComment>
21   <name>PrimaryKey</name>
22   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKey-identifier"
23                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKey-identifier"
24                    xmi:type="uml:Property">
25      <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKey-identifier-ownedComment"
26                     xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKey-identifier-ownedComment"
27                     xmi:type="uml:Comment">
28         <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKey-identifier"/>
29         <body>Identifier for objects requiring short- or long-lasting referencing and management.</body>
30      </ownedComment>
31      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKey-identifier-lowerValue"
32                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKey-identifier-lowerValue"
33                   xmi:type="uml:LiteralInteger"/>
34      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKey-identifier-upperValue"
35                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKey-identifier-upperValue"
36                   xmi:type="uml:LiteralUnlimitedNatural">
37         <value>1</value>
38      </upperValue>
39      <name>identifier</name>
40      <isID>true</isID>
41      <type xmi:idref="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-Identifier"/>
42   </ownedAttribute>
43   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKey-ownedAttribute"
44                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKey-ownedAttribute"
45                    xmi:type="uml:Property">
46      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKey-ownedAttribute-lowerValue"
47                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKey-ownedAttribute-lowerValue"
48                   xmi:type="uml:LiteralInteger">
49         <value>1</value>
50      </lowerValue>
51      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKey-ownedAttribute-upperValue"
52                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKey-ownedAttribute-upperValue"
53                   xmi:type="uml:LiteralUnlimitedNatural">
54         <value>*</value>
55      </upperValue>
56      <aggregation>composite</aggregation>
57      <association xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKey_isComposedOf_PrimaryKeyComponent"/>
58      <type xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKeyComponent"/>
59   </ownedAttribute>
60</packagedElement>

Fragment for the class PrimaryKey (entire XML Schema)

 1<xs:element name="PrimaryKey"
 2            type="PrimaryKeyXsdType"
 3            xml:id="PrimaryKey">
 4  <!-- based on the UML class DDICDIModels::DDICDILibrary::Classes::DataDescription::Components::PrimaryKey -->
 5  <xs:annotation>
 6    <xs:documentation>Definition
 7          ============
 8          Role of a set of data structure components for content linkage purposes
 9          
10          Explanatory notes
11          ===================
12          Equivalent to primary key in the relational model.
13          A primary key essentially indicates which data structure components correspond to key members.
14          It can also be used in conjunction with foreign key to link data structures and their related datasets.</xs:documentation>
15  </xs:annotation>
16</xs:element>
17<xs:complexType name="PrimaryKeyXsdType"
18                xml:id="PrimaryKeyXsdType">
19  <xs:annotation>
20    <xs:documentation>Definition
21          ============
22          Role of a set of data structure components for content linkage purposes
23          
24          Explanatory notes
25          ===================
26          Equivalent to primary key in the relational model.
27          A primary key essentially indicates which data structure components correspond to key members.
28          It can also be used in conjunction with foreign key to link data structures and their related datasets.</xs:documentation>
29  </xs:annotation>
30  <xs:sequence>
31    <xs:element name="identifier"
32                type="IdentifierXsdType"
33                minOccurs="0"
34                maxOccurs="1"
35                xml:id="PrimaryKey-identifier">
36      <xs:annotation>
37        <xs:documentation>Identifier for objects requiring short- or long-lasting referencing and management.</xs:documentation>
38      </xs:annotation>
39    </xs:element>
40    <xs:element name="PrimaryKey_isComposedOf_PrimaryKeyComponent"
41                minOccurs="1"
42                maxOccurs="unbounded"
43                xml:id="PrimaryKey_isComposedOf_PrimaryKeyComponent">
44      <xs:annotation>
45        <xs:documentation></xs:documentation>
46      </xs:annotation>
47      <xs:complexType>
48        <xs:complexContent>
49          <xs:restriction base="AssociationReferenceXsdType">
50            <xs:sequence>
51              <xs:element name="ddiReference"
52                          type="InternationalRegistrationDataIdentifierXsdType"
53                          minOccurs="0"
54                          maxOccurs="1"
55                          xml:id="PrimaryKey_isComposedOf_PrimaryKeyComponent-ddiReference"/>
56              <xs:element name="validType"
57                          minOccurs="1"
58                          maxOccurs="1"
59                          xml:id="PrimaryKey_isComposedOf_PrimaryKeyComponent-validType">
60                <xs:simpleType>
61                  <xs:restriction base="xs:NMTOKEN">
62                    <xs:enumeration value="PrimaryKeyComponent"/>
63                  </xs:restriction>
64                </xs:simpleType>
65              </xs:element>
66            </xs:sequence>
67          </xs:restriction>
68        </xs:complexContent>
69      </xs:complexType>
70    </xs:element>
71  </xs:sequence>
72</xs:complexType>

Fragment for the class PrimaryKey (entire JSON Schema)

 1"cls-PrimaryKey": {
 2  "description": "http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/PrimaryKey",
 3  "type": "object",
 4  "properties": {
 5    "@context": {
 6      "$ref": "#/defs/at-context"
 7    },
 8    "@id": {
 9      "type": "string",
10      "format": "iri-reference"
11    },
12    "@type": {
13      "const": "PrimaryKey"
14    },
15    "identifier": {
16      "$comment": "cardinality 0..1 – from cdi:PrimaryKey",
17      "$ref": "#/defs/dt-Identifier"
18    },
19    "isComposedOf": {
20      "description": "PrimaryKey_isComposedOf_PrimaryKeyComponent",
21      "$comment": "cardinality 1..-1",
22      "anyOf": [
23        {
24          "$ref": "#/defs/target-PrimaryKeyComponent"
25        },
26        {
27          "type": "array",
28          "items": {
29            "$ref": "#/defs/target-PrimaryKeyComponent"
30          }
31        }
32      ]
33    },
34    "has_PrimaryKey_OF_DataStructure": {
35      "description": "DataStructure_has_PrimaryKey",
36      "$comment": "cardinality 1..1",
37      "$ref": "#/defs/target-DataStructure"
38    },
39    "sameAs": {
40      "$ref": "#/defs/owl:sameAs"
41    }
42  },
43  "required": ["isComposedOf","@type"],
44  "additionalProperties": false
45},
46"target-PrimaryKey": {
47  "description": "all subclasses of http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/PrimaryKey",
48  "anyOf": [
49    { "$ref": "#/defs/cls-PrimaryKey" },
50    { "type": "string", "format": "iri-reference" }
51  ]
52},

Fragment for the class PrimaryKey (main ontology)

 1# class PrimaryKey
 2# based on the UML class DDICDIModels::DDICDILibrary::Classes::DataDescription::Components::PrimaryKey
 3cdi:PrimaryKey
 4  a rdfs:Class, owl:Class, ucmis:Class;
 5  rdfs:label "PrimaryKey";
 6  rdfs:comment "Definition\n============\nRole of a set of data structure components for content linkage purposes\n\nExplanatory notes\n===================\nEquivalent to primary key in the relational model.\nA primary key essentially indicates which data structure components correspond to key members.\nIt can also be used in conjunction with foreign key to link data structures and their related datasets."@en;
 7  
 8.
 9
10cdi:PrimaryKey-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:PrimaryKey;
15  rdfs:range cdi:Identifier;
16.
17
18
19cdi:PrimaryKey_isComposedOf_PrimaryKeyComponent
20  a rdf:Property, owl:ObjectProperty, ucmis:Association;
21  # ASSOCIATION
22  rdfs:label "isComposedOf";
23  skos:altLabel "PrimaryKey_isComposedOf_PrimaryKeyComponent";
24  
25  rdfs:domain cdi:PrimaryKey;
26  rdfs:range cdi:PrimaryKeyComponent;
27.

Fragment for the class PrimaryKey (entire 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
 7      "identifier": {
 8        "@id": "cdi:PrimaryKey-identifier",
 9        "@type": "@id",
10        "@context": "Identifier.jsonld"
11      },
12      
13      "isComposedOf": {
14        "@id": "cdi:PrimaryKey_isComposedOf_PrimaryKeyComponent",
15        "@type": "@id",
16        "@context": "PrimaryKeyComponent.jsonld"
17      },
18      "has_PrimaryKey_OF_DataStructure": {
19        "@reverse": "cdi:DataStructure_has_PrimaryKey",
20        "@type": "@id",
21        "@context": "DataStructure.jsonld"
22      },
23      " comment ": "tag:json-should-support-trailing-commas"
24    }
25  ],
26  "generatedBy": "This code was generated by the Eclipse Acceleo project UCMIS M2T on 2025-08-29 14:34:50.",
27  "basedOn": "based on the UML data type DDICDIModels::DDICDILibrary::Classes::DataDescription::Components::PrimaryKey"
28}

Fragment for the class PrimaryKey (entire SHACL - Shapes Constraint Language)

 1# class PrimaryKey
 2# based on the UML class DDICDIModels::DDICDILibrary::Classes::DataDescription::Components::PrimaryKey
 3<#PrimaryKey> a sh:NodeShape;
 4    sh:targetClass cdi:PrimaryKey;
 5	sh:message "See http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/PrimaryKey";
 6	sh:closed true;
 7	sh:ignoredProperties ( owl:sameAs );
 8    sh:property [
 9			sh:path rdf:type;
10			sh:in (   cdi:PrimaryKey
11			 ) ;
12    ];
13    # attributes
14    sh:property <#PrimaryKey-identifier>;
15    # associations from PrimaryKey
16    sh:property <#PrimaryKey_isComposedOf_PrimaryKeyComponent>;
17    # associations to PrimaryKey
18    sh:property <#rev_DataStructure_has_PrimaryKey>;
19
20
21
22.
23
24<#PrimaryKey-identifier> a sh:PropertyShape ;
25    sh:path cdi:PrimaryKey-identifier;
26    sh:node [ sh:property [ sh:path rdf:type; sh:minCount 1; sh:in (
27        cdi:Identifier
28      
29    ) ]];
30    sh:maxCount 1;
31.
32
33<#PrimaryKey_isComposedOf_PrimaryKeyComponent> a sh:PropertyShape ;
34    sh:path cdi:PrimaryKey_isComposedOf_PrimaryKeyComponent;
35	sh:node [ sh:property [ sh:path rdf:type; sh:minCount 1; sh:in (
36        cdi:PrimaryKeyComponent
37      
38    ) ]];
39    sh:minCount 1;
40.
41<#rev_PrimaryKey_isComposedOf_PrimaryKeyComponent> a sh:PropertyShape ;
42    sh:path [ sh:inversePath cdi:PrimaryKey_isComposedOf_PrimaryKeyComponent ];
43    sh:minCount 1;
44    sh:maxCount 1;
45.

Fragment for the class PrimaryKey (entire ShEx - Shape Expressions)

1# class PrimaryKey
2# based on the UML class DDICDIModels::DDICDILibrary::Classes::DataDescription::Components::PrimaryKey
3cdi:PrimaryKeyShape CLOSED {
4	a [cdi:PrimaryKey];
5	cdi:PrimaryKey-identifier	@cdi:IdentifierShape?;
6	^cdi:DataStructure_has_PrimaryKey @cdi:DataStructureShape OR @cdi:DimensionalDataStructureShape OR @cdi:KeyValueStructureShape OR @cdi:LongDataStructureShape OR @cdi:WideDataStructureShape;
7	cdi:PrimaryKey_isComposedOf_PrimaryKeyComponent	@cdi:PrimaryKeyComponentShape +;
8	
9	}