TypedString#

Fully qualified datatype name of the UML model DDI-CDI 1.0: DDICDIModels::DDICDILibrary::DataTypes::StructuredDataTypes::TypedString

Definition#

TypedString combines a type with content defined as a simple string. May be used wherever a simple string needs to support a type definition to clarify its content.

Examples#

Content is a regular expression and the typeOfContent attribute is used to define the syntax of the regular expression content.

Explanatory notes#

This is a generic type + string where property name and documentation should be used to define any specification for the content. If international structured string content is required use TypedStructuredString.

Diagram#

Diagram

Attributes#

Attributes
Attributes#

Name

Inherited from

Description

Data Type

Multiplicity

Default value

content

- own datatype -

Content of the property expressed as a simple string.

String

1..1

typeOfContent

- own datatype -

Optional use of a controlled vocabulary to specifically type the associated content.

ControlledVocabularyEntry

0..1

Usage#

Usage
Usage#

Type

Package

Classifier

Attribute

Class

DataDescription

InstanceValue

content

Class

DataDescription

Notation

content

Class

Representations

ValueAndConceptDescription

regularExpression

DataType

StructuredDataTypes

Command

commandContent

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 data type TypedString (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-DataTypes-StructuredDataTypes-TypedString"
 5                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#TypedString"
 6                  xmi:type="uml:DataType">
 7   <ownedComment xmi:id="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-TypedString-ownedComment"
 8                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#TypedString-ownedComment"
 9                  xmi:type="uml:Comment">
10      <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-TypedString"/>
11      <body>Definition
12============
13TypedString combines a type with content defined as a simple string. May be used wherever a simple string needs to support a type definition to clarify its content.
14
15Examples
16==========
17Content is a regular expression and the typeOfContent attribute is used to define the syntax of the regular expression content.
18
19Explanatory notes
20===================
21This is a generic type + string where property name and documentation should be used to define any specification for the content. If international structured string content is required use TypedStructuredString.</body>
22   </ownedComment>
23   <name>TypedString</name>
24   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-TypedString-content"
25                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#TypedString-content"
26                    xmi:type="uml:Property">
27      <ownedComment xmi:id="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-TypedString-content-ownedComment"
28                     xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#TypedString-content-ownedComment"
29                     xmi:type="uml:Comment">
30         <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-TypedString-content"/>
31         <body>Content of the property expressed as a simple string.</body>
32      </ownedComment>
33      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-TypedString-content-lowerValue"
34                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#TypedString-content-lowerValue"
35                   xmi:type="uml:LiteralInteger">
36         <value>1</value>
37      </lowerValue>
38      <upperValue xmi:id="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-TypedString-content-upperValue"
39                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#TypedString-content-upperValue"
40                   xmi:type="uml:LiteralUnlimitedNatural">
41         <value>1</value>
42      </upperValue>
43      <name>content</name>
44      <type href="http://www.omg.org/spec/UML/20131001/PrimitiveTypes.xmi#String"
45             xmi:type="uml:PrimitiveType"/>
46   </ownedAttribute>
47   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-TypedString-typeOfContent"
48                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#TypedString-typeOfContent"
49                    xmi:type="uml:Property">
50      <ownedComment xmi:id="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-TypedString-typeOfContent-ownedComment"
51                     xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#TypedString-typeOfContent-ownedComment"
52                     xmi:type="uml:Comment">
53         <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-TypedString-typeOfContent"/>
54         <body>Optional use of a controlled vocabulary to specifically type the associated content.</body>
55      </ownedComment>
56      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-TypedString-typeOfContent-lowerValue"
57                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#TypedString-typeOfContent-lowerValue"
58                   xmi:type="uml:LiteralInteger"/>
59      <upperValue xmi:id="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-TypedString-typeOfContent-upperValue"
60                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#TypedString-typeOfContent-upperValue"
61                   xmi:type="uml:LiteralUnlimitedNatural">
62         <value>1</value>
63      </upperValue>
64      <name>typeOfContent</name>
65      <type xmi:idref="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-ControlledVocabularyEntry"/>
66   </ownedAttribute>
67</packagedElement>

Fragment for the data type TypedString (entire XML Schema)

 1<xs:element name="TypedString"
 2            type="TypedStringXsdType"
 3            xml:id="TypedString">
 4  <!-- based on the UML data type DDICDIModels::DDICDILibrary::DataTypes::StructuredDataTypes::TypedString -->
 5  <xs:annotation>
 6    <xs:documentation>Definition
 7          ============
 8          TypedString combines a type with content defined as a simple string. May be used wherever a simple string needs to support a type definition to clarify its content.
 9          
10          Examples
11          ==========
12          Content is a regular expression and the typeOfContent attribute is used to define the syntax of the regular expression content.
13          
14          Explanatory notes
15          ===================
16          This is a generic type + string where property name and documentation should be used to define any specification for the content. If international structured string content is required use TypedStructuredString.</xs:documentation>
17  </xs:annotation>
18</xs:element>
19<xs:complexType name="TypedStringXsdType"
20                xml:id="TypedStringXsdType">
21  <xs:annotation>
22    <xs:documentation>Definition
23          ============
24          TypedString combines a type with content defined as a simple string. May be used wherever a simple string needs to support a type definition to clarify its content.
25          
26          Examples
27          ==========
28          Content is a regular expression and the typeOfContent attribute is used to define the syntax of the regular expression content.
29          
30          Explanatory notes
31          ===================
32          This is a generic type + string where property name and documentation should be used to define any specification for the content. If international structured string content is required use TypedStructuredString.</xs:documentation>
33  </xs:annotation>
34  <xs:sequence>
35    <xs:element name="content"
36                type="xs:string"
37                minOccurs="1"
38                maxOccurs="1"
39                xml:id="TypedString-content">
40      <xs:annotation>
41        <xs:documentation>Content of the property expressed as a simple string.</xs:documentation>
42      </xs:annotation>
43    </xs:element>
44    <xs:element name="typeOfContent"
45                type="ControlledVocabularyEntryXsdType"
46                minOccurs="0"
47                maxOccurs="1"
48                xml:id="TypedString-typeOfContent">
49      <xs:annotation>
50        <xs:documentation>Optional use of a controlled vocabulary to specifically type the associated content.</xs:documentation>
51      </xs:annotation>
52    </xs:element>
53  </xs:sequence>
54</xs:complexType>

Fragment for the data type TypedString (entire JSON Schema)

 1"dt-TypedString": {
 2  "description": "http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/TypedString",
 3  "type": ["object"],
 4  "properties": {
 5    "content": {
 6      "$comment": "cardinality 1..1 – from cdi:TypedString",
 7      "$ref": "#/defs/xsd:string"
 8    },
 9    "typeOfContent": {
10      "$comment": "cardinality 0..1 – from cdi:TypedString",
11      "$ref": "#/defs/dt-ControlledVocabularyEntry"
12    },
13    "@type": {
14      "const": "TypedString"
15    }
16  },
17  "required": ["content","@type"],
18  "additionalProperties": false
19},

Fragment for the data type TypedString (main ontology)

 1# datatype TypedString
 2# based on the UML data type DDICDIModels::DDICDILibrary::DataTypes::StructuredDataTypes::TypedString
 3cdi:TypedString
 4  a rdfs:Class, owl:Class, ucmis:StructuredDataType;
 5  rdfs:label "TypedString";
 6  rdfs:comment "Definition\n============\nTypedString combines a type with content defined as a simple string. May be used wherever a simple string needs to support a type definition to clarify its content.\n\nExamples\n==========\nContent is a regular expression and the typeOfContent attribute is used to define the syntax of the regular expression content.\n\nExplanatory notes\n===================\nThis is a generic type + string where property name and documentation should be used to define any specification for the content. If international structured string content is required use TypedStructuredString."@en;
 7  
 8  owl:hasKey (cdi:TypedString-content cdi:TypedString-typeOfContent);
 9.
10
11cdi:TypedString-content
12  a rdf:Property, owl:DatatypeProperty, ucmis:Attribute;
13  rdfs:label "content";
14  rdfs:comment "Content of the property expressed as a simple string."@en;
15  rdfs:domain cdi:TypedString;
16  rdfs:range xsd:string;
17.
18
19cdi:TypedString-typeOfContent
20  a rdf:Property, owl:ObjectProperty, ucmis:Attribute;
21  rdfs:label "typeOfContent";
22  rdfs:comment "Optional use of a controlled vocabulary to specifically type the associated content."@en;
23  rdfs:domain cdi:TypedString;
24  rdfs:range cdi:ControlledVocabularyEntry;
25.

Fragment for the data type TypedString (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      "content": {
 8        "@id": "cdi:TypedString-content",
 9        "@type": "xsd:string"
10      },
11      "typeOfContent": {
12        "@id": "cdi:TypedString-typeOfContent",
13        "@type": "@id",
14        "@context": "ControlledVocabularyEntry.jsonld"
15      },
16      
17      " comment ": "tag:json-should-support-trailing-commas" 
18    }
19  ],
20  "generatedBy": "This code was generated by the Eclipse Acceleo project UCMIS M2T on 2025-08-29 14:34:57.",
21  "basedOn": "based on the UML data type DDICDIModels::DDICDILibrary::DataTypes::StructuredDataTypes::TypedString"
22}

Fragment for the data type TypedString (entire SHACL - Shapes Constraint Language)

 1# datatype TypedString
 2# based on the UML data type DDICDIModels::DDICDILibrary::DataTypes::StructuredDataTypes::TypedString
 3<#TypedString> a sh:NodeShape;
 4    sh:targetClass cdi:TypedString;
 5	sh:message "See http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/TypedString";
 6	sh:closed true;
 7	sh:ignoredProperties ( owl:sameAs );
 8    sh:property [
 9			sh:path rdf:type;
10			sh:in (   cdi:TypedString
11			 ) ;
12    ];
13    # attributes
14    sh:property <#TypedString-content>;
15    sh:property <#TypedString-typeOfContent>;
16
17
18
19.
20
21<#TypedString-content> a sh:PropertyShape ;
22    sh:path cdi:TypedString-content;
23    sh:datatype xsd:string;
24    sh:minCount 1;
25    sh:maxCount 1;
26.
27<#TypedString-typeOfContent> a sh:PropertyShape ;
28    sh:path cdi:TypedString-typeOfContent;
29    sh:node [ sh:property [ sh:path rdf:type; sh:minCount 1; sh:in (
30        cdi:ControlledVocabularyEntry
31      
32    ) ]];
33    sh:maxCount 1;
34.

Fragment for the data type TypedString (entire ShEx - Shape Expressions)

1# datatype TypedString
2# based on the UML data type DDICDIModels::DDICDILibrary::DataTypes::StructuredDataTypes::TypedString
3cdi:TypedStringShape CLOSED {
4	a [cdi:TypedString];
5	cdi:TypedString-content	xsd:string;
6	cdi:TypedString-typeOfContent	@cdi:ControlledVocabularyEntryShape?;
7	}