Zum Inhalt springen
RUMLRUML

Open Format for Digital Law

4.7 DataPoints

The type of the bounds of a DataPoint: `min` and `max` by data type, `minLength`, `maxLength` and `cardinality`.

min-max-by-data-type

Beschreibung`min` and `max` are numbers for `number` and `count`, and strings for `date`, `datetime` and `duration`.
Erwartungaccept
Ebeneschema
RUML4-7-data-points.fixtures/accept-min-max-by-data-type.ruml
Abschnitt§4.7.3
4-7-data-points.fixtures/accept-min-max-by-data-type.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"data": {
"dp_amount": {
"name": "Betrag",
"type": "number",
"validation": {
"min": 0,
"max": 100000
},
"binding": {
"type": "input"
}
},
"dp_children": {
"name": "Anzahl Kinder",
"type": "count",
"validation": {
"min": 1,
"max": 10
},
"binding": {
"type": "input"
}
},
"dp_birth_date": {
"name": "Geburtsdatum",
"type": "date",
"validation": {
"min": "1900-01-01",
"max": "2010-12-31"
},
"binding": {
"type": "input"
}
},
"dp_submitted_at": {
"name": "Eingang",
"type": "datetime",
"validation": {
"min": "2024-01-01T08:00:00+01:00",
"max": "2024-12-31T18:00:00+01:00"
},
"binding": {
"type": "input"
}
},
"dp_duration": {
"name": "Mindestalter",
"type": "duration",
"validation": {
"min": "P18Y",
"max": "P67Y"
},
"binding": {
"type": "input"
}
}
}
}
}
],
"metadata": {
"id": "3f6b2a1c-8d4e-4a7b-9c2d-1e0f3a4b5c6d",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"label": "Antrag"
}
}
}
}

time-bounds-without-offset

BeschreibungA `time` datapoint has the bounds `08:00` and `17:30:00`: without seconds and without an offset, like a `time` value.
Erwartungaccept
Ebeneschema
RUML4-7-data-points.fixtures/accept-time-bounds-without-offset.ruml
Abschnitt§4.7.1§4.7.3
4-7-data-points.fixtures/accept-time-bounds-without-offset.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"data": {
"dp_opening": {
"name": "Öffnungszeit",
"type": "time",
"validation": {
"min": "08:00",
"max": "17:30:00"
},
"binding": {
"type": "input"
}
}
}
}
}
],
"metadata": {
"id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
"label": "Antrag"
}
}
}
}

datetime-bounds-without-offset

BeschreibungA `datetime` datapoint has the bounds `2024-01-01T08:00` and `2024-12-31T17:30:00`: without seconds and without an offset, like a `datetime` value.
Erwartungaccept
Ebeneschema
RUML4-7-data-points.fixtures/accept-datetime-bounds-without-offset.ruml
Abschnitt§4.7.1§4.7.3
4-7-data-points.fixtures/accept-datetime-bounds-without-offset.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"data": {
"dp_deadline": {
"name": "Deadline",
"type": "datetime",
"validation": {
"min": "2024-01-01T08:00",
"max": "2024-12-31T17:30:00"
},
"binding": {
"type": "input"
}
}
}
}
}
],
"metadata": {
"id": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "5e6f7a8b-9c0d-4e1f-a2b3-c4d5e6f7a8b9",
"label": "Antrag"
}
}
}
}

date-min-as-number

BeschreibungA `date` datapoint has the number `1900` as `min`, not a date string.
Erwartungreject
Ebeneschema
RUML4-7-data-points.fixtures/reject-date-min-as-number.ruml
Abschnitt§4.7.3
Erwartete RegelverletzungenDP-14
Stelle/capabilities/0/payload/data/dp_birth_date/validation/min
4-7-data-points.fixtures/reject-date-min-as-number.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"data": {
"dp_birth_date": {
"name": "Geburtsdatum",
"type": "date",
"validation": {
"min": 1900,
"max": "2010-12-31"
},
"binding": {
"type": "input"
}
}
}
}
}
],
"metadata": {
"id": "d4c3b2a1-0f9e-4d8c-b7a6-5f4e3d2c1b0a",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "7b8c9d0e-1f2a-4b3c-8d4e-5f6a7b8c9d0e",
"label": "Antrag"
}
}
}
}

number-min-as-string

BeschreibungA `number` datapoint has the string `"0"` as `min`, not a number.
Erwartungreject
Ebeneschema
RUML4-7-data-points.fixtures/reject-number-min-as-string.ruml
Abschnitt§4.7.3
Erwartete RegelverletzungenDP-14
Stelle/capabilities/0/payload/data/dp_amount/validation/min
4-7-data-points.fixtures/reject-number-min-as-string.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"data": {
"dp_amount": {
"name": "Betrag",
"type": "number",
"validation": {
"min": "0",
"max": 100000
},
"binding": {
"type": "input"
}
}
}
}
}
],
"metadata": {
"id": "2a3b4c5d-6e7f-4a8b-9c0d-1e2f3a4b5c6d",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "e9f8a7b6-c5d4-4e3f-a2b1-c0d9e8f7a6b5",
"label": "Antrag"
}
}
}
}

time-min-malformed

BeschreibungA `time` datapoint has `8:00` as `min`; the hour needs two digits.
Erwartungreject
Ebeneschema
RUML4-7-data-points.fixtures/reject-time-min-malformed.ruml
Abschnitt§4.7.3
Erwartete RegelverletzungenDP-14
Stelle/capabilities/0/payload/data/dp_opening/validation/min
4-7-data-points.fixtures/reject-time-min-malformed.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"data": {
"dp_opening": {
"name": "Öffnungszeit",
"type": "time",
"validation": {
"min": "8:00",
"max": "17:30"
},
"binding": {
"type": "input"
}
}
}
}
}
],
"metadata": {
"id": "6c5d4e3f-2a1b-4c0d-9e8f-7a6b5c4d3e2f",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "0f1e2d3c-4b5a-4968-8778-695a4b3c2d1e",
"label": "Antrag"
}
}
}
}

length-and-cardinality-bounds

Beschreibung`minLength` is `0` and `cardinality.min` is `0`, `cardinality.max` is `1`: the lowest values allowed.
Erwartungaccept
Ebeneschema
RUML4-7-data-points.fixtures/accept-length-and-cardinality-bounds.ruml
Abschnitt§4.7§4.7.3
4-7-data-points.fixtures/accept-length-and-cardinality-bounds.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"sets": {
"set_kind": {
"name": "Kind",
"fields": {
"dp_vorname": {
"name": "Vorname",
"type": "string",
"binding": {
"type": "input"
}
}
}
}
},
"data": {
"dp_postal_code": {
"name": "Postleitzahl",
"type": "string",
"validation": {
"minLength": 0,
"maxLength": 5
},
"binding": {
"type": "input"
}
},
"dp_children": {
"name": "Kinder",
"type": "object",
"set": "set_kind",
"cardinality": {
"min": 0,
"max": 1
},
"binding": {
"type": "input"
}
}
}
}
}
],
"metadata": {
"id": "a3b4c5d6-e7f8-4a9b-8c0d-1e2f3a4b5c6d",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e",
"label": "Antrag"
}
}
}
}

min-length-negative

Beschreibung`minLength` is `-1`.
Erwartungreject
Ebeneschema
RUML4-7-data-points.fixtures/reject-min-length-negative.ruml
Abschnitt§4.7.3
Erwartete RegelverletzungenDP-08
Stelle/capabilities/0/payload/data/dp_postal_code/validation/minLength
4-7-data-points.fixtures/reject-min-length-negative.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"data": {
"dp_postal_code": {
"name": "Postleitzahl",
"type": "string",
"validation": {
"minLength": -1,
"maxLength": 5
},
"binding": {
"type": "input"
}
}
}
}
}
],
"metadata": {
"id": "c5d6e7f8-a9b0-4c1d-8e2f-3a4b5c6d7e8f",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "d6e7f8a9-b0c1-4d2e-9f3a-4b5c6d7e8f9a",
"label": "Antrag"
}
}
}
}

max-length-fraction

Beschreibung`maxLength` is `5.5`, not an integer.
Erwartungreject
Ebeneschema
RUML4-7-data-points.fixtures/reject-max-length-fraction.ruml
Abschnitt§4.7.3
Erwartete RegelverletzungenDP-08
Stelle/capabilities/0/payload/data/dp_postal_code/validation/maxLength
4-7-data-points.fixtures/reject-max-length-fraction.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"data": {
"dp_postal_code": {
"name": "Postleitzahl",
"type": "string",
"validation": {
"minLength": 5,
"maxLength": 5.5
},
"binding": {
"type": "input"
}
}
}
}
}
],
"metadata": {
"id": "e7f8a9b0-c1d2-4e3f-8a4b-5c6d7e8f9a0b",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "f8a9b0c1-d2e3-4f4a-9b5c-6d7e8f9a0b1c",
"label": "Antrag"
}
}
}
}

cardinality-max-zero

Beschreibung`cardinality.max` is `0`; a repeated object allows at least one instance.
Erwartungreject
Ebeneschema
RUML4-7-data-points.fixtures/reject-cardinality-max-zero.ruml
Abschnitt§4.7
Erwartete RegelverletzungenDP-08
Stelle/capabilities/0/payload/data/dp_children/cardinality/max
4-7-data-points.fixtures/reject-cardinality-max-zero.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"sets": {
"set_kind": {
"name": "Kind",
"fields": {
"dp_vorname": {
"name": "Vorname",
"type": "string",
"binding": {
"type": "input"
}
}
}
}
},
"data": {
"dp_children": {
"name": "Kinder",
"type": "object",
"set": "set_kind",
"cardinality": {
"min": 0,
"max": 0
},
"binding": {
"type": "input"
}
}
}
}
}
],
"metadata": {
"id": "a9b0c1d2-e3f4-4a5b-8c6d-7e8f9a0b1c2d",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "b0c1d2e3-f4a5-4b6c-9d7e-8f9a0b1c2d3e",
"label": "Antrag"
}
}
}
}

ids-without-prefix

BeschreibungDataPoints, a set and its field have ids without a prefix; one id begins with an underscore.
Erwartungaccept
Ebeneschema
RUML4-7-data-points.fixtures/accept-ids-without-prefix.ruml
Abschnitt§4.7§4.7.4
4-7-data-points.fixtures/accept-ids-without-prefix.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"sets": {
"child": {
"name": "Child",
"fields": {
"first_name": {
"name": "First name",
"type": "string",
"binding": {
"type": "input"
}
}
}
}
},
"data": {
"_children": {
"name": "Children",
"type": "object",
"set": "child",
"cardinality": {
"min": 0,
"max": 1
},
"binding": {
"type": "input"
}
},
"postal_code": {
"name": "Postal code",
"type": "string",
"validation": {
"minLength": 0,
"maxLength": 5
},
"binding": {
"type": "input"
}
}
}
}
}
],
"metadata": {
"id": "4e1b7c2a-9d3f-4a6b-8e5c-2f1d0a9b8c7e",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e",
"label": "Application"
}
}
}
}

set-id-with-space

BeschreibungA set has an id that contains a space.
Erwartungreject
Ebeneschema
RUML4-7-data-points.fixtures/reject-set-id-with-space.ruml
Abschnitt§4.7.4
Erwartete RegelverletzungenDP-02
Stelle/capabilities/0/payload/sets/child type
4-7-data-points.fixtures/reject-set-id-with-space.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"sets": {
"child type": {
"name": "Child",
"fields": {
"dp_first_name": {
"name": "First name",
"type": "string",
"binding": {
"type": "input"
}
}
}
}
},
"data": {
"dp_postal_code": {
"name": "Postal code",
"type": "string",
"validation": {
"minLength": 0,
"maxLength": 5
},
"binding": {
"type": "input"
}
},
"dp_children": {
"name": "Children",
"type": "object",
"set": "child type",
"cardinality": {
"min": 0,
"max": 1
},
"binding": {
"type": "input"
}
}
}
}
}
],
"metadata": {
"id": "5f2c8d3b-0e4a-4b7c-9f6d-3a2e1b0c9d8f",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e",
"label": "Application"
}
}
}
}

field-id-with-space

BeschreibungA field of a set has an id that contains a space.
Erwartungreject
Ebeneschema
RUML4-7-data-points.fixtures/reject-field-id-with-space.ruml
Abschnitt§4.7.4
Erwartete RegelverletzungenDP-02
Stelle/capabilities/0/payload/sets/set_child/fields/first name
4-7-data-points.fixtures/reject-field-id-with-space.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"sets": {
"set_child": {
"name": "Child",
"fields": {
"first name": {
"name": "First name",
"type": "string",
"binding": {
"type": "input"
}
}
}
}
},
"data": {
"dp_postal_code": {
"name": "Postal code",
"type": "string",
"validation": {
"minLength": 0,
"maxLength": 5
},
"binding": {
"type": "input"
}
},
"dp_children": {
"name": "Children",
"type": "object",
"set": "set_child",
"cardinality": {
"min": 0,
"max": 1
},
"binding": {
"type": "input"
}
}
}
}
}
],
"metadata": {
"id": "6a3d9e4c-1f5b-4c8d-8a7e-4b3f2c1d0e9a",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e",
"label": "Application"
}
}
}
}

datapoint-id-with-capital

BeschreibungA DataPoint has an id that contains capital letters.
Erwartungreject
Ebeneschema
RUML4-7-data-points.fixtures/reject-datapoint-id-with-capital.ruml
Abschnitt§4.7
Erwartete RegelverletzungenDP-02
Stelle/capabilities/0/payload/data/dp_PostalCode
4-7-data-points.fixtures/reject-datapoint-id-with-capital.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"sets": {
"set_child": {
"name": "Child",
"fields": {
"dp_first_name": {
"name": "First name",
"type": "string",
"binding": {
"type": "input"
}
}
}
}
},
"data": {
"dp_PostalCode": {
"name": "Postal code",
"type": "string",
"validation": {
"minLength": 0,
"maxLength": 5
},
"binding": {
"type": "input"
}
},
"dp_children": {
"name": "Children",
"type": "object",
"set": "set_child",
"cardinality": {
"min": 0,
"max": 1
},
"binding": {
"type": "input"
}
}
}
}
}
],
"metadata": {
"id": "7b4e0f5d-2a6c-4d9e-9b8f-5c4a3d2e1f0b",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e",
"label": "Application"
}
}
}
}

datapoint-id-starting-with-digit

BeschreibungA DataPoint has an id that begins with a digit.
Erwartungreject
Ebeneschema
RUML4-7-data-points.fixtures/reject-datapoint-id-starting-with-digit.ruml
Abschnitt§4.7
Erwartete RegelverletzungenDP-02
Stelle/capabilities/0/payload/data/1st_postal_code
4-7-data-points.fixtures/reject-datapoint-id-starting-with-digit.ruml
{
"$format": "RUML",
"$specVersion": "1.0",
"capabilities": [
{
"id": "ruml:datapoints",
"required": true,
"payload": {
"sets": {
"set_child": {
"name": "Child",
"fields": {
"dp_first_name": {
"name": "First name",
"type": "string",
"binding": {
"type": "input"
}
}
}
}
},
"data": {
"1st_postal_code": {
"name": "Postal code",
"type": "string",
"validation": {
"minLength": 0,
"maxLength": 5
},
"binding": {
"type": "input"
}
},
"dp_children": {
"name": "Children",
"type": "object",
"set": "set_child",
"cardinality": {
"min": 0,
"max": 1
},
"binding": {
"type": "input"
}
}
}
}
}
],
"metadata": {
"id": "8c5f1a6e-3b7d-4e0f-8c9a-6d5b4e3f2a1c",
"version": "1.0.0",
"created": "2024-01-01T00:00:00Z",
"modified": "2024-01-01T00:00:00Z",
"status": "inForce",
"validFrom": "2024-01-01T00:00:00Z"
},
"rulemap": {
"nodes": {
"1": {
"id": "b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e",
"label": "Application"
}
}
}
}