Primitive and Simple Data Types

Predefined Simple Data Types

The metamodel of the Asset Administration Shell uses some of the predefined simple data types of the XML Schema Definition (XSD) as its basic data types [1]. See Table 7 for an overview of the used types. Their definition is outside the scope of this document.

The meaning and format of xsd types is specified in XML Schema 1.0 (https://www.w3.org/TR/xmlschema-2). The simple type "langString" is specified in the Resource Description Framework (RDF) [2].

See Clause Constraints for Types for constraints on types.

Table 1. Simple Data Types Used in Metamodel
Source Basic Data Type Value Range Sample Values

xsd

string

Character string (but not all Unicode character strings)

"Hello world", "Καλημέρα κόσμε",
"ハローワールド""

xsd

base64Binary

base64-encoded binary data

"a3Vtb3dhc2hlcmU="

xsd

boolean

true, false

true, false

xsd

dateType

Date and time with or without time zone

"2000-01-01T14:23:00",
"2000-01-01T14:23:00.66372+14:00"[3]

xsd

duration

Duration of time

"-P1Y2M3DT1H",
"PT1H5M0S"

rdf

langString

Strings with language tags

"Hello"@en,
"Hallo"@de

Note: this is written in RDF/Turtle syntax, only "Hello" and "Hallo" are the actual values.

Primitive Data Types

Table 8 lists the Primitives used in the metamodel. Primitive data types start with a capital letter.

Note: see Clause Constraints for Types for constraints on types.

Table 2. Primitive Data Types Used in Metamodel

Primitive

ID

Definition

Value Examples

BlobType

https://admin-shell.io/aas/3/0/BlobType

base64binary

to represent file content (binaries and non-binaries)

<?xml version="1.0" encoding="UTF-8"?>

<schema elementFormDefault="qualified" targetNamespace="http://www.admin-shell.io/aas/2/0" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:aas="http://www.admin-shell.io/aas/2/0" />

MZ_________ÿÿ__¸_______@___________________________________€_____º__´ Í!¸_LÍ!This program cannot be run in DOS mode.$_______PE__L___Rö\^________à_

ContentType

admin-shell.io/aas/3/0/ContentType

string with max 100 and min 1 characters

Note: any content type as in RFC2046.

A media type (also MIME type and content type) […] is a two-part identifier for file formats and format contents transmitted on the Internet. The Internet Assigned Numbers Authority (IANA) is the official authority for the standardization and publication of these classifications. Media types were originally defined in Request for Comments 2045 in November 1996 as a part of MIME specification, for denoting type of email message content and attachments.[4]


4. Wikipedia.org, date: 2018-04-09

application/pdf

image/jpeg

Identifier

https://admin-shell.io/aas/3/1/Identifier

string with max 2048 and min 1 characters

https://cust/123456

0173-1#02-BAA120#008

LabelType

https://admin-shell.io/aas/3/0/LabelType

string with max 64 and min 1 characters

"ABC1234"

LangStringSet

https://admin-shell.io/aas/3/0/LangStringSet

Array of elements of type langString

Note 1: langString is a RDF data type.

Note 2: a langString is a string value tagged with a language code.

Realization depends on the serialization rules for a technology.

In xml:

<aas:langString lang="EN">This is a multi-language value in English</aas:langString>

<aas:langString lang="DE"> Das ist ein Multi-Language-Wert in Deutsch </aas:langString>

In rdf:

"This is a multi-language value in English"@en ;

"Das ist ein Multi-Language-Wert in Deutsch"@de

In JSON:

"description": [

  \{

      "language":"en",

         "text": "This is a multi-language value in English."

  },

  \{

"language":"de",

"text": "Das ist ein Multi-Language-Wert in Deutsch."

   }

]

MessageTopicType

https://admin-shell.io/aas/3/0/MessageTopicType

string with max 128 and min 1 characters

MultiLanguageNameType

https://admin-shell.io/aas/3/1/MultiLanguageNameType

Each langString within the array of strings has a max 128 of and a min of 1 characters (as for NameType).

See LangStringSet

MultiLanguageTextType

https://admin-shell.io/3/0/MultiLanguageTextType

Each string within langString has a max of 1,023 and min of 1 characters.

See LangStringSet

NameType

https://admin-shell.io/aas/3/0/NameType

string with max 128 and min 1 characters

"ManufacturerPartId"

PathType

https://admin-shell.io/aas/3/1/PathType

string with max 2048 and min 1 characters

conformant to a URI as per RFC 2396

Note: Values with this restriction are also conformant to the xsd datatype anyURI.

"A wide range of internationalized resource identifiers can be specified when an anyURI is called for, and still be understood as URIs per RFC 2396 and its successor(s)."

./Specification.pdf

file:c:/local/Specification.pdf

http://www.example.org

FTP://unicode.org

RevisionType

https://admin-shell.io/aas/3/0/RevisionType

string with max 4 and min 1 characters following the following regular expression:

^([0-9]|[1-9][0-9]*)$

"0"

"7"

"567"

QualifierType

https://admin-shell.io/aas/3/0/QualifierType

NameType

"ExpressionSemantic" (as specified in DIN SPEC 92000:2019-09, see [16])

"life cycle qual" (as specified in IEC 61360-7 - IEC/SC 3D - Common Data Dictionary (CDD - V2.0015.0004)

VersionType

https://admin-shell.io/aas/3/0/VersionType

string with max 4 and min 1 characters

following the following regular expression:

^([0-9]|[1-9][0-9]*)$

"1"

"9999"

ValueDataType

https://admin-shell.io/aas/3/0/ValueDataType

any xsd atomic type as specified via DataTypeDefXsd

"This is a string value"

10

1.5

2020-04-01

True

Enumeration for Submodel Element Value Types

Enumerations are primitive data types. Most of the enumerations are defined in the context of their class. This clause defines enumerations for submodel element value types[5].

The predefined types used to define the type of values of properties and other values use the names and the semantics of XML Schema Definition (XSD)[6]. Additionally, the type "langString" with the semantics as defined in the Resource Description Framework (RDF)[7] is used. "langString" is a string value tagged with a language code.

Note 1: RDF[8] uses XML Schema Built-in data types from Version 1.1 but recommends to use only a subset of xsd data types. That is why they are excluded from the allowed data types in DataTypeDefXsd.

  • XSD BuildIn List types are not supported (ENTITIES, IDREFS and NMTOKENS).

  • XSD string BuildIn types are not supported (normalizedString, token, language, NCName, ENTITY, ID, IDREF).

  • The following XSD primitive types are not supported: NOTATION, QName.

Note 2: additionally, the following RDF types are not supported in DataTypeDefXsd: HTML and XMLLiteral.

DefTypeDefRdf Enumeration
Figure 1. DefTypeDefRdf Enumeration

The enumeration is derived from Figure 54.

Data TypeDefXsd Enumeration
Figure 2. Data TypeDefXsd Enumeration

Table 9 depicts example values and the value range of the different data type"

shows the data types which can be used for submodel element values. The data types are defined according to the W3C XML Schema (https://www.w3.org/TR/xmlschema-2/#built-in-datatypes and https://www.w3.org/TR/xmlschema-2/#built-in-derived). "Value Range" further explains the possible range of data values for this data type. The right column shows related examples for values of the corresponding data type.

Table 3. Data Types with Examples [9]
Data Type Value Range Sample Values

Core types

xs:string

Character string (but not all Unicode character strings)

"Hello world"

"Καλημέρα κόσμε"

"こんにちは世界"

xs:boolean

true, false

true, false

xs:decimal

Arbitrary-precision decimal numbers

-1.23

126789672374892739424.543233

+100000.00, 210

xs:integer

Arbitrary-size integer numbers

-1

0

126789675432332938792837429837429837429

+100000

IEEE floating-point numbers

xs:double

64-bit floating point numbers incl. ±Inf, ±0, NaN

-1.0

+0.0

-0.0

234.567e8

-INF

NaN

xs:float

32-bit floating point numbers incl. ±Inf, ±0, NaN

-1.0

+0.0

-0.0

234.567e8

-INF

NaN

Time and dates

xs:date

Dates (yyyy-mm-dd) with or without time zone

"2000-01-01"

"2000-01-01Z"

"2000-01-01+12:05"

xs:time

Times (hh:mm:ss.sss…​) with or without time zone

"14:23:00"

"14:23:00.527634Z"

"14:23:00+03:00"

xs:dateTime

Date and time with or without time zone

"2000-01-01T14:23:00"

"2000-01-01T14:23:00.66372+14:00"[10]


10. Corresponds to xs:dateTimeStamp in XML Schema 1.1

Recurring and partial dates

xs:gYear

Gregorian calendar year

"2000"

"2000+03:00"

xs:gMonth

Gregorian calendar month

"--04"

"--04+03:00"

xs:gDay

Gregorian calendar day of the month

"---04"

"---04+03:00"

xs:gYearMonth

Gregorian calendar year and month

"2000-01"

"2000-01+03:00"

xs:gMonthDay

Gregorian calendar month and day

"--01-01"

"--01-01+03:00"

xs:duration

Duration of time

"P30D"

"-P1Y2M3DT1H", "PT1H5M0S"

Limited-range integer numbers

xs:byte

-128…+127 (8 bit)

-1, 0

127

xs:short

-32768…+32767 (16 bit)

-1, 0

32767

xs:int

2147483648…+2147483647 (32 bit)

-1, 0

2147483647

xs:long

-9223372036854775808…+9223372036854775807 (64 bit)

-1

0, 9223372036854775807

xs:unsignedByte

0…255 (8 bit)

0

1

255

xs:unsignedShort

0…65535 (16 bit)

0

1

65535

xs:unsignedInt

0…4294967295 (32 bit)

0

1

4294967295

xs:unsignedLong

0…18446744073709551615 (64 bit)

0

1

18446744073709551615

xs:positiveInteger

Integer numbers >0

1

7345683746578364857368475638745

xs:nonNegativeInteger

Integer numbers ≥0

0

1

734568374657836485736847563

xs:negativeInteger

Integer numbers <0

-1

  • 23487263847628376482736487263

xs:nonPositiveInteger

Integer numbers ≤0

-1

0

-938458374985739874987989873

Encoded binary data

xs:hexBinary

Hex-encoded binary data

"6b756d6f77617368657265"

xs:base64Binary

Base64-encoded binary data

"a3Vtb3dhc2hlcmU="

Miscellaneous types

xs:anyURI

Absolute or relative URIs and IRIs

https://customer.com/demo/aas/1/1/1234859590

"urn:example:company:1.0.0"

rdf:langString

Strings with language tags

"Hello"@en

"Hallo"@de

Note: this is written in RDF/Turtle syntax, @en and de are the language tags.

Enumeration:

DataTypeDefXsd

Explanation:

Enumeration listing selected xsd anySimpleTypes of XML Schema 1.0

Set of:

 — 

ID:

https://admin-shell.io/aas/3/1/DataTypeDefXsd

Literal

Explanation

xs:anyURI

see: https://www.w3.org/TR/xmlschema-2/#anyURI

xs:base64Binary

see: https://www.w3.org/TR/xmlschema-2/#base64Binary

xs:boolean

see https://www.w3.org/TR/xmlschema-2/#boolean

xs:byte

see https://www.w3.org/TR/xmlschema-2/#byte

xs:date

see https://www.w3.org/TR/xmlschema-2/#date

xs:dateTime

see https://www.w3.org/TR/xmlschema-2/#dateTime

xs:decimal

see https://www.w3.org/TR/xmlschema-2/#decimal

xs:double

see https://www.w3.org/TR/xmlschema-2/#double

xs:duration

see https://www.w3.org/TR/xmlschema-2/#duration

xs:float

see https://www.w3.org/TR/xmlschema-2/#float

xs:gDay

see https://www.w3.org/TR/xmlschema-2/#gDay

xs:gMonth

see https://www.w3.org/TR/xmlschema-2/#gMonth

xs:gMonthDay

see https://www.w3.org/TR/xmlschema-2/#gMonthDay

xs:gYear

see https://www.w3.org/TR/xmlschema-2/#gYear

xs:gYearMonth

see https://www.w3.org/TR/xmlschema-2/#gYearMonth

xs:hexBinary

see https://www.w3.org/TR/xmlschema-2/#hexBinary

xs:int

see https://www.w3.org/TR/xmlschema-2/#int

xs:integer

see https://www.w3.org/TR/xmlschema-2/#integer

xs:long

see https://www.w3.org/TR/xmlschema-2/#long

xs:negativeInteger

see https://www.w3.org/TR/xmlschema-2/#negativeInteger

xs:nonNegativeInteger

see: https://www.w3.org/TR/xmlschema-2/#nonNegativeInteger

xs:nonPositiveInteger

see: https://www.w3.org/TR/xmlschema-2/#nonPositiveInteger

xs:positiveInteger

see: https://www.w3.org/TR/xmlschema-2/#positiveInteger

xs:short

see: https://www.w3.org/TR/xmlschema-2/#short

xs:string

see: https://www.w3.org/TR/xmlschema-2/#string

xs:time

see: https://www.w3.org/TR/xmlschema-2/#time

xs:unsignedByte

see: https://www.w3.org/TR/xmlschema-2/#unsignedShort

xs:unsignedInt

see: https://www.w3.org/TR/xmlschema-2/#unsignedInt

xs:unsignedLong

see: https://www.w3.org/TR/xmlschema-2/#unsignedLong

xs:unsignedShort

see: https://www.w3.org/TR/xmlschema-2/#unsignedShort

xs:yearMonthDuration

see: https://www.w3.org/TR/xmlschema-2/#yearMonthDuration

Enumeration:

DataTypeDefRdf

Explanation:

Enumeration listing all RDF types

Set of:

 — 

ID:

https://admin-shell.io/aas/3/0/DataTypeDefRdf

Literal

Explanation

rdf:langString

String with a language tag

RDF requires IETF BCP 47[11] language tags. Simple two-letter language tags for locales like "de" conformant to ISO 639-1 are allowed, as well as language tags plus extension like "de-DE" for country code, dialect, etc. like in "en-US" for English (United States) or "en-GB" for English (United Kingdom). IETF language tags are referencing ISO 639, ISO 3166 and ISO 15924.

image55
Figure 3. Built-In Types of XML Schema Definition 1.0 (XSD)[12]