PrimaryKeyComponent#

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

Definition#

Role of a data structure component for content identification purposes

Explanatory notes#

Equivalent to a primary key attribute (i.e. column) in the relational model. It can be used in conjunction with a foreign key component 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 PrimaryKeyComponent

Package of Other Class

Other Class

Multiplicity of other class

Aggregation Kind

Inherited from

to

ForeignKeyComponent references PrimaryKeyComponent

1..1

- own package -

ForeignKeyComponent

0..*

none

own class

to

PrimaryKey isComposedOf PrimaryKeyComponent

1..*

- own package -

PrimaryKey

1..1

none

own class

from

PrimaryKeyComponent correspondsTo DataStructureComponent

0..1

- own package -

DataStructureComponent

1..1

none

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 PrimaryKeyComponent (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-PrimaryKeyComponent"
 5                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKeyComponent"
 6                  xmi:type="uml:Class">
 7   <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKeyComponent-ownedComment"
 8                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKeyComponent-ownedComment"
 9                  xmi:type="uml:Comment">
10      <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKeyComponent"/>
11      <body>Definition
12============
13Role of a data structure component for content identification purposes
14
15Explanatory notes
16===================
17Equivalent to a primary key attribute (i.e. column) in the relational model.
18It can be used in conjunction with a foreign key component to link data structures and their related datasets.</body>
19   </ownedComment>
20   <name>PrimaryKeyComponent</name>
21   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKeyComponent-identifier"
22                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKeyComponent-identifier"
23                    xmi:type="uml:Property">
24      <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKeyComponent-identifier-ownedComment"
25                     xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKeyComponent-identifier-ownedComment"
26                     xmi:type="uml:Comment">
27         <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKeyComponent-identifier"/>
28         <body>Identifier for objects requiring short- or long-lasting referencing and management.</body>
29      </ownedComment>
30      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKeyComponent-identifier-lowerValue"
31                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKeyComponent-identifier-lowerValue"
32                   xmi:type="uml:LiteralInteger"/>
33      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKeyComponent-identifier-upperValue"
34                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKeyComponent-identifier-upperValue"
35                   xmi:type="uml:LiteralUnlimitedNatural">
36         <value>1</value>
37      </upperValue>
38      <name>identifier</name>
39      <isID>true</isID>
40      <type xmi:idref="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-Identifier"/>
41   </ownedAttribute>
42   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKeyComponent-ownedAttribute"
43                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKeyComponent-ownedAttribute"
44                    xmi:type="uml:Property">
45      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKeyComponent-ownedAttribute-lowerValue"
46                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKeyComponent-ownedAttribute-lowerValue"
47                   xmi:type="uml:LiteralInteger">
48         <value>1</value>
49      </lowerValue>
50      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKeyComponent-ownedAttribute-upperValue"
51                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#PrimaryKeyComponent-ownedAttribute-upperValue"
52                   xmi:type="uml:LiteralUnlimitedNatural">
53         <value>1</value>
54      </upperValue>
55      <association xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKeyComponent_correspondsTo_DataStructureComponent"/>
56      <type xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-DataStructureComponent"/>
57   </ownedAttribute>
58</packagedElement>

Fragment for the class PrimaryKeyComponent (entire XML Schema)

 1<xs:element name="PrimaryKeyComponent"
 2            type="PrimaryKeyComponentXsdType"
 3            xml:id="PrimaryKeyComponent">
 4  <!-- based on the UML class DDICDIModels::DDICDILibrary::Classes::DataDescription::Components::PrimaryKeyComponent -->
 5  <xs:annotation>
 6    <xs:documentation>Definition
 7          ============
 8          Role of a data structure component for content identification purposes
 9          
10          Explanatory notes
11          ===================
12          Equivalent to a primary key attribute (i.e. column) in the relational model.
13          It can be used in conjunction with a foreign key component to link data structures and their related datasets.</xs:documentation>
14  </xs:annotation>
15</xs:element>
16<xs:complexType name="PrimaryKeyComponentXsdType"
17                xml:id="PrimaryKeyComponentXsdType">
18  <xs:annotation>
19    <xs:documentation>Definition
20          ============
21          Role of a data structure component for content identification purposes
22          
23          Explanatory notes
24          ===================
25          Equivalent to a primary key attribute (i.e. column) in the relational model.
26          It can be used in conjunction with a foreign key component to link data structures and their related datasets.</xs:documentation>
27  </xs:annotation>
28  <xs:sequence>
29    <xs:element name="identifier"
30                type="IdentifierXsdType"
31                minOccurs="0"
32                maxOccurs="1"
33                xml:id="PrimaryKeyComponent-identifier">
34      <xs:annotation>
35        <xs:documentation>Identifier for objects requiring short- or long-lasting referencing and management.</xs:documentation>
36      </xs:annotation>
37    </xs:element>
38    <xs:element name="PrimaryKeyComponent_correspondsTo_DataStructureComponent"
39                minOccurs="1"
40                maxOccurs="1"
41                xml:id="PrimaryKeyComponent_correspondsTo_DataStructureComponent">
42      <xs:annotation>
43        <xs:documentation></xs:documentation>
44      </xs:annotation>
45      <xs:complexType>
46        <xs:complexContent>
47          <xs:restriction base="AssociationReferenceXsdType">
48            <xs:sequence>
49              <xs:element name="ddiReference"
50                          type="InternationalRegistrationDataIdentifierXsdType"
51                          minOccurs="0"
52                          maxOccurs="1"
53                          xml:id="PrimaryKeyComponent_correspondsTo_DataStructureComponent-ddiReference"/>
54              <xs:element name="validType"
55                          minOccurs="0"
56                          maxOccurs="1"
57                          xml:id="PrimaryKeyComponent_correspondsTo_DataStructureComponent-validType">
58                <xs:simpleType>
59                  <xs:restriction base="xs:NMTOKEN">
60                    <xs:enumeration value="AttributeComponent"/>
61                    <xs:enumeration value="ContextualComponent"/>
62                    <xs:enumeration value="DataStructure"/>
63                    <xs:enumeration value="DataStructureComponent"/>
64                    <xs:enumeration value="DimensionComponent"/>
65                    <xs:enumeration value="DimensionalDataStructure"/>
66                    <xs:enumeration value="IdentifierComponent"/>
67                    <xs:enumeration value="KeyValueStructure"/>
68                    <xs:enumeration value="LongDataStructure"/>
69                    <xs:enumeration value="MeasureComponent"/>
70                    <xs:enumeration value="QualifiedMeasure"/>
71                    <xs:enumeration value="SyntheticIdComponent"/>
72                    <xs:enumeration value="VariableDescriptorComponent"/>
73                    <xs:enumeration value="VariableValueComponent"/>
74                    <xs:enumeration value="WideDataStructure"/>
75                  </xs:restriction>
76                </xs:simpleType>
77              </xs:element>
78            </xs:sequence>
79          </xs:restriction>
80        </xs:complexContent>
81      </xs:complexType>
82    </xs:element>
83  </xs:sequence>
84</xs:complexType>

Fragment for the class PrimaryKeyComponent (entire JSON Schema)

 1"cls-PrimaryKeyComponent": {
 2  "description": "http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/PrimaryKeyComponent",
 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": "PrimaryKeyComponent"
14    },
15    "identifier": {
16      "$comment": "cardinality 0..1 – from cdi:PrimaryKeyComponent",
17      "$ref": "#/defs/dt-Identifier"
18    },
19    "correspondsTo_DataStructureComponent": {
20      "description": "PrimaryKeyComponent_correspondsTo_DataStructureComponent",
21      "$comment": "cardinality 1..1",
22       "$ref": "#/defs/target-DataStructureComponent"
23    },
24    "references_OF_ForeignKeyComponent": {
25      "description": "ForeignKeyComponent_references_PrimaryKeyComponent",
26      "$comment": "cardinality 0..-1",
27      "anyOf": [
28        {
29          "$ref": "#/defs/target-ForeignKeyComponent"
30        },
31        {
32          "type": "array",
33          "items": {
34            "$ref": "#/defs/target-ForeignKeyComponent"
35          }
36        }
37      ]
38    },
39    "isComposedOf_OF_PrimaryKey": {
40      "description": "PrimaryKey_isComposedOf_PrimaryKeyComponent",
41      "$comment": "cardinality 1..1",
42      "$ref": "#/defs/target-PrimaryKey"
43    },
44    "sameAs": {
45      "$ref": "#/defs/owl:sameAs"
46    }
47  },
48  "required": ["correspondsTo_DataStructureComponent","@type"],
49  "additionalProperties": false
50},
51"target-PrimaryKeyComponent": {
52  "description": "all subclasses of http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/PrimaryKeyComponent",
53  "anyOf": [
54    { "$ref": "#/defs/cls-PrimaryKeyComponent" },
55    { "type": "string", "format": "iri-reference" }
56  ]
57},

Fragment for the class PrimaryKeyComponent (main ontology)

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

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

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

 1# class PrimaryKeyComponent
 2# based on the UML class DDICDIModels::DDICDILibrary::Classes::DataDescription::Components::PrimaryKeyComponent
 3<#PrimaryKeyComponent> a sh:NodeShape;
 4    sh:targetClass cdi:PrimaryKeyComponent;
 5	sh:message "See http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/PrimaryKeyComponent";
 6	sh:closed true;
 7	sh:ignoredProperties ( owl:sameAs );
 8    sh:property [
 9			sh:path rdf:type;
10			sh:in (   cdi:PrimaryKeyComponent
11			 ) ;
12    ];
13    # attributes
14    sh:property <#PrimaryKeyComponent-identifier>;
15    # associations from PrimaryKeyComponent
16    sh:property <#PrimaryKeyComponent_correspondsTo_DataStructureComponent>;
17    # associations to PrimaryKeyComponent
18    sh:property <#rev_ForeignKeyComponent_references_PrimaryKeyComponent>;
19    sh:property <#rev_PrimaryKey_isComposedOf_PrimaryKeyComponent>;
20
21
22
23.
24
25<#PrimaryKeyComponent-identifier> a sh:PropertyShape ;
26    sh:path cdi:PrimaryKeyComponent-identifier;
27    sh:node [ sh:property [ sh:path rdf:type; sh:minCount 1; sh:in (
28        cdi:Identifier
29      
30    ) ]];
31    sh:maxCount 1;
32.
33
34<#PrimaryKeyComponent_correspondsTo_DataStructureComponent> a sh:PropertyShape ;
35    sh:path cdi:PrimaryKeyComponent_correspondsTo_DataStructureComponent;
36	sh:node [ sh:property [ sh:path rdf:type; sh:minCount 1; sh:in (
37        cdi:DataStructureComponent
38        cdi:AttributeComponent
39        cdi:ContextualComponent
40        cdi:DataStructure
41        cdi:DimensionalDataStructure
42        cdi:KeyValueStructure
43        cdi:LongDataStructure
44        cdi:WideDataStructure
45        cdi:DimensionComponent
46        cdi:IdentifierComponent
47        cdi:MeasureComponent
48        cdi:QualifiedMeasure
49        cdi:SyntheticIdComponent
50        cdi:VariableDescriptorComponent
51        cdi:VariableValueComponent
52      
53    ) ]];
54    sh:minCount 1;
55    sh:maxCount 1;
56.
57<#rev_PrimaryKeyComponent_correspondsTo_DataStructureComponent> a sh:PropertyShape ;
58    sh:path [ sh:inversePath cdi:PrimaryKeyComponent_correspondsTo_DataStructureComponent ];
59    sh:maxCount 1;
60.

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

 1# class PrimaryKeyComponent
 2# based on the UML class DDICDIModels::DDICDILibrary::Classes::DataDescription::Components::PrimaryKeyComponent
 3cdi:PrimaryKeyComponentShape CLOSED {
 4	a [cdi:PrimaryKeyComponent];
 5	cdi:PrimaryKeyComponent-identifier	@cdi:IdentifierShape?;
 6	^cdi:ForeignKeyComponent_references_PrimaryKeyComponent @cdi:ForeignKeyComponentShape *;
 7	^cdi:PrimaryKey_isComposedOf_PrimaryKeyComponent @cdi:PrimaryKeyShape ;
 8	cdi:PrimaryKeyComponent_correspondsTo_DataStructureComponent	@cdi:DataStructureComponentShape OR @cdi:AttributeComponentShape OR @cdi:ContextualComponentShape OR @cdi:DataStructureShape OR @cdi:DimensionComponentShape OR @cdi:IdentifierComponentShape OR @cdi:MeasureComponentShape OR @cdi:SyntheticIdComponentShape OR @cdi:VariableDescriptorComponentShape OR @cdi:VariableValueComponentShape;
 9	
10	}