ForeignKeyComponent#

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

Definition#

Role of a data structure component for content referencing purposes

Explanatory notes#

Equivalent to a foreign key attribute (i.e. column) in the relational model. It can be used in conjunction with a primary key component to link data structures and their related data sets.

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 ForeignKeyComponent

Package of Other Class

Other Class

Multiplicity of other class

Aggregation Kind

Inherited from

to

ForeignKey isComposedOf ForeignKeyComponent

1..*

- own package -

ForeignKey

1..1

none

own class

from

ForeignKeyComponent correspondsTo DataStructureComponent

0..1

- own package -

DataStructureComponent

1..1

none

own class

from

ForeignKeyComponent references PrimaryKeyComponent

0..*

- own package -

PrimaryKeyComponent

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 ForeignKeyComponent (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-ForeignKeyComponent"
 5                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#ForeignKeyComponent"
 6                  xmi:type="uml:Class">
 7   <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-ForeignKeyComponent-ownedComment"
 8                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#ForeignKeyComponent-ownedComment"
 9                  xmi:type="uml:Comment">
10      <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-ForeignKeyComponent"/>
11      <body>Definition
12============
13Role of a data structure component for content referencing purposes
14
15Explanatory notes
16===================
17Equivalent to a foreign key attribute (i.e. column) in the relational model.
18It can be used in conjunction with a primary key component to link data structures and their related data sets.</body>
19   </ownedComment>
20   <name>ForeignKeyComponent</name>
21   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-ForeignKeyComponent-identifier"
22                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#ForeignKeyComponent-identifier"
23                    xmi:type="uml:Property">
24      <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-ForeignKeyComponent-identifier-ownedComment"
25                     xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#ForeignKeyComponent-identifier-ownedComment"
26                     xmi:type="uml:Comment">
27         <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-ForeignKeyComponent-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-ForeignKeyComponent-identifier-lowerValue"
31                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#ForeignKeyComponent-identifier-lowerValue"
32                   xmi:type="uml:LiteralInteger"/>
33      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-ForeignKeyComponent-identifier-upperValue"
34                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#ForeignKeyComponent-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-ForeignKeyComponent-ownedAttribute_1"
43                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#ForeignKeyComponent-ownedAttribute_1"
44                    xmi:type="uml:Property">
45      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-ForeignKeyComponent-ownedAttribute_1-lowerValue"
46                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#ForeignKeyComponent-ownedAttribute_1-lowerValue"
47                   xmi:type="uml:LiteralInteger">
48         <value>1</value>
49      </lowerValue>
50      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-ForeignKeyComponent-ownedAttribute_1-upperValue"
51                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#ForeignKeyComponent-ownedAttribute_1-upperValue"
52                   xmi:type="uml:LiteralUnlimitedNatural">
53         <value>1</value>
54      </upperValue>
55      <association xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-ForeignKeyComponent_references_PrimaryKeyComponent"/>
56      <type xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-PrimaryKeyComponent"/>
57   </ownedAttribute>
58   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-ForeignKeyComponent-ownedAttribute_2"
59                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#ForeignKeyComponent-ownedAttribute_2"
60                    xmi:type="uml:Property">
61      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-ForeignKeyComponent-ownedAttribute_2-lowerValue"
62                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#ForeignKeyComponent-ownedAttribute_2-lowerValue"
63                   xmi:type="uml:LiteralInteger">
64         <value>1</value>
65      </lowerValue>
66      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-ForeignKeyComponent-ownedAttribute_2-upperValue"
67                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#ForeignKeyComponent-ownedAttribute_2-upperValue"
68                   xmi:type="uml:LiteralUnlimitedNatural">
69         <value>1</value>
70      </upperValue>
71      <association xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-ForeignKeyComponent_correspondsTo_DataStructureComponent"/>
72      <type xmi:idref="DDICDIModels-DDICDILibrary-Classes-DataDescription-Components-DataStructureComponent"/>
73   </ownedAttribute>
74</packagedElement>

Fragment for the class ForeignKeyComponent (entire XML Schema)

  1<xs:element name="ForeignKeyComponent"
  2            type="ForeignKeyComponentXsdType"
  3            xml:id="ForeignKeyComponent">
  4  <!-- based on the UML class DDICDIModels::DDICDILibrary::Classes::DataDescription::Components::ForeignKeyComponent -->
  5  <xs:annotation>
  6    <xs:documentation>Definition
  7          ============
  8          Role of a data structure component for content referencing purposes
  9          
 10          Explanatory notes
 11          ===================
 12          Equivalent to a foreign key attribute (i.e. column) in the relational model.
 13          It can be used in conjunction with a primary key component to link data structures and their related data sets.</xs:documentation>
 14  </xs:annotation>
 15</xs:element>
 16<xs:complexType name="ForeignKeyComponentXsdType"
 17                xml:id="ForeignKeyComponentXsdType">
 18  <xs:annotation>
 19    <xs:documentation>Definition
 20          ============
 21          Role of a data structure component for content referencing purposes
 22          
 23          Explanatory notes
 24          ===================
 25          Equivalent to a foreign key attribute (i.e. column) in the relational model.
 26          It can be used in conjunction with a primary key component to link data structures and their related data sets.</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="ForeignKeyComponent-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="ForeignKeyComponent_references_PrimaryKeyComponent"
 39                minOccurs="1"
 40                maxOccurs="1"
 41                xml:id="ForeignKeyComponent_references_PrimaryKeyComponent">
 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="ForeignKeyComponent_references_PrimaryKeyComponent-ddiReference"/>
 54              <xs:element name="validType"
 55                          minOccurs="0"
 56                          maxOccurs="unbounded"
 57                          xml:id="ForeignKeyComponent_references_PrimaryKeyComponent-validType">
 58                <xs:simpleType>
 59                  <xs:restriction base="xs:NMTOKEN">
 60                    <xs:enumeration value="PrimaryKeyComponent"/>
 61                  </xs:restriction>
 62                </xs:simpleType>
 63              </xs:element>
 64            </xs:sequence>
 65          </xs:restriction>
 66        </xs:complexContent>
 67      </xs:complexType>
 68    </xs:element>
 69    <xs:element name="ForeignKeyComponent_correspondsTo_DataStructureComponent"
 70                minOccurs="1"
 71                maxOccurs="1"
 72                xml:id="ForeignKeyComponent_correspondsTo_DataStructureComponent">
 73      <xs:annotation>
 74        <xs:documentation></xs:documentation>
 75      </xs:annotation>
 76      <xs:complexType>
 77        <xs:complexContent>
 78          <xs:restriction base="AssociationReferenceXsdType">
 79            <xs:sequence>
 80              <xs:element name="ddiReference"
 81                          type="InternationalRegistrationDataIdentifierXsdType"
 82                          minOccurs="0"
 83                          maxOccurs="1"
 84                          xml:id="ForeignKeyComponent_correspondsTo_DataStructureComponent-ddiReference"/>
 85              <xs:element name="validType"
 86                          minOccurs="0"
 87                          maxOccurs="1"
 88                          xml:id="ForeignKeyComponent_correspondsTo_DataStructureComponent-validType">
 89                <xs:simpleType>
 90                  <xs:restriction base="xs:NMTOKEN">
 91                    <xs:enumeration value="AttributeComponent"/>
 92                    <xs:enumeration value="ContextualComponent"/>
 93                    <xs:enumeration value="DataStructure"/>
 94                    <xs:enumeration value="DataStructureComponent"/>
 95                    <xs:enumeration value="DimensionComponent"/>
 96                    <xs:enumeration value="DimensionalDataStructure"/>
 97                    <xs:enumeration value="IdentifierComponent"/>
 98                    <xs:enumeration value="KeyValueStructure"/>
 99                    <xs:enumeration value="LongDataStructure"/>
100                    <xs:enumeration value="MeasureComponent"/>
101                    <xs:enumeration value="QualifiedMeasure"/>
102                    <xs:enumeration value="SyntheticIdComponent"/>
103                    <xs:enumeration value="VariableDescriptorComponent"/>
104                    <xs:enumeration value="VariableValueComponent"/>
105                    <xs:enumeration value="WideDataStructure"/>
106                  </xs:restriction>
107                </xs:simpleType>
108              </xs:element>
109            </xs:sequence>
110          </xs:restriction>
111        </xs:complexContent>
112      </xs:complexType>
113    </xs:element>
114  </xs:sequence>
115</xs:complexType>

Fragment for the class ForeignKeyComponent (entire JSON Schema)

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

Fragment for the class ForeignKeyComponent (main ontology)

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

Fragment for the class ForeignKeyComponent (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:ForeignKeyComponent-identifier",
 9        "@type": "@id",
10        "@context": "Identifier.jsonld"
11      },
12      
13      "correspondsTo_DataStructureComponent": {
14        "@id": "cdi:ForeignKeyComponent_correspondsTo_DataStructureComponent",
15        "@type": "@id",
16        "@context": "DataStructureComponent.jsonld"
17      },
18      "references": {
19        "@id": "cdi:ForeignKeyComponent_references_PrimaryKeyComponent",
20        "@type": "@id",
21        "@context": "PrimaryKeyComponent.jsonld"
22      },
23      "isComposedOf_OF_ForeignKey": {
24        "@reverse": "cdi:ForeignKey_isComposedOf_ForeignKeyComponent",
25        "@type": "@id",
26        "@context": "ForeignKey.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::ForeignKeyComponent"
33}

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

 1# class ForeignKeyComponent
 2# based on the UML class DDICDIModels::DDICDILibrary::Classes::DataDescription::Components::ForeignKeyComponent
 3<#ForeignKeyComponent> a sh:NodeShape;
 4    sh:targetClass cdi:ForeignKeyComponent;
 5	sh:message "See http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/ForeignKeyComponent";
 6	sh:closed true;
 7	sh:ignoredProperties ( owl:sameAs );
 8    sh:property [
 9			sh:path rdf:type;
10			sh:in (   cdi:ForeignKeyComponent
11			 ) ;
12    ];
13    # attributes
14    sh:property <#ForeignKeyComponent-identifier>;
15    # associations from ForeignKeyComponent
16    sh:property <#ForeignKeyComponent_correspondsTo_DataStructureComponent>;
17    sh:property <#ForeignKeyComponent_references_PrimaryKeyComponent>;
18    # associations to ForeignKeyComponent
19    sh:property <#rev_ForeignKey_isComposedOf_ForeignKeyComponent>;
20
21
22
23.
24
25<#ForeignKeyComponent-identifier> a sh:PropertyShape ;
26    sh:path cdi:ForeignKeyComponent-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<#ForeignKeyComponent_correspondsTo_DataStructureComponent> a sh:PropertyShape ;
35    sh:path cdi:ForeignKeyComponent_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_ForeignKeyComponent_correspondsTo_DataStructureComponent> a sh:PropertyShape ;
58    sh:path [ sh:inversePath cdi:ForeignKeyComponent_correspondsTo_DataStructureComponent ];
59    sh:maxCount 1;
60.
61<#ForeignKeyComponent_references_PrimaryKeyComponent> a sh:PropertyShape ;
62    sh:path cdi:ForeignKeyComponent_references_PrimaryKeyComponent;
63	sh:node [ sh:property [ sh:path rdf:type; sh:minCount 1; sh:in (
64        cdi:PrimaryKeyComponent
65      
66    ) ]];
67    sh:minCount 1;
68    sh:maxCount 1;
69.
70<#rev_ForeignKeyComponent_references_PrimaryKeyComponent> a sh:PropertyShape ;
71    sh:path [ sh:inversePath cdi:ForeignKeyComponent_references_PrimaryKeyComponent ];
72.

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

 1# class ForeignKeyComponent
 2# based on the UML class DDICDIModels::DDICDILibrary::Classes::DataDescription::Components::ForeignKeyComponent
 3cdi:ForeignKeyComponentShape CLOSED {
 4	a [cdi:ForeignKeyComponent];
 5	cdi:ForeignKeyComponent-identifier	@cdi:IdentifierShape?;
 6	^cdi:ForeignKey_isComposedOf_ForeignKeyComponent @cdi:ForeignKeyShape ;
 7	cdi:ForeignKeyComponent_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;
 8	
 9	cdi:ForeignKeyComponent_references_PrimaryKeyComponent	@cdi:PrimaryKeyComponentShape ;
10	
11	}