From 2a6a682f3c243299a3365f92953639c6832328a5 Mon Sep 17 00:00:00 2001 From: Martin Stemmer <52048213+Martin187187@users.noreply.github.com> Date: Tue, 7 Apr 2026 14:08:56 +0200 Subject: [PATCH 1/2] update filter implementation --- .../ROOT/partials/bnf/access-rule-model.bnf | 1 + .../ROOT/partials/bnf/access-rules.bnf | 45 +++++++++--- .../aas-queries-and-access-rules-schema.json | 36 +++++++++- .../ROOT/partials/json/access-rule-model.json | 68 +++++++++++-------- 4 files changed, 112 insertions(+), 38 deletions(-) diff --git a/documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rule-model.bnf b/documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rule-model.bnf index d9c94fe..9ab74ec 100644 --- a/documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rule-model.bnf +++ b/documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rule-model.bnf @@ -13,3 +13,4 @@ ( )* ( ( "FORMULA:" ) | ( ) ) ( "FILTER:" )? + ( "FILTERLIST:" ( )* )? diff --git a/documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rules.bnf b/documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rules.bnf index c27f7f7..caeded5 100644 --- a/documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rules.bnf +++ b/documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rules.bnf @@ -13,9 +13,10 @@ ( )* ( ( "FORMULA:" ) | ( ) ) ( "FILTER:" )? + ( "FILTERLIST:" ( )* )? ::= - + ( ( "CONDITION:" ) | ( ) ) ::= @@ -72,10 +73,10 @@ ::= "REFERABLE" "$sme" "." - - ::= - "FRAGMENT" "$sme" "." ( )+ + ::= + "FRAGMENT" + ::= "DESCRIPTOR" ("$aasdesc" | "$smdesc") @@ -199,18 +200,44 @@ ::= "true" | "false" ::= | | | | | - ::= "$aas#" ( "idShort" | "id" | "assetInformation.assetKind" | "assetInformation.assetType" | "assetInformation.globalAssetId" | "assetInformation." | "submodels" ( "[" ( [0-9]* ) "]" ) "." ) - ::= "$sm#" ( | "idShort" | "id" ) - ::= "$sme" ( "." )? "#" ( | "idShort" | "value" | "valueType" | "language" ) - ::= "$cd#" ( "idShort" | "id" ) - ::= "$aasdesc#" ( "idShort" | "id" | "assetKind" | "assetType" | "globalAssetId" | | "endpoints" ( "[" ( [0-9]* ) "]" ) "." | "submodelDescriptors" ( "[" ( [0-9]* ) "]" ) "." ) + + ::= "$aas#" + ::= "$sm#" + ::= "$sme" ( "." )? "#" + ::= "$cd#" + ::= "$aasdesc#" ::= "$smdesc#" + + ::= "idShort" | "id" | "assetInformation.assetKind" | "assetInformation.assetType" | "assetInformation.globalAssetId" | "assetInformation." | "submodels" ( "[" ( [0-9]* ) "]" ) "." + ::= | "idShort" | "id" + ::= | "idShort" | "value" | "valueType" | "language" + ::= "idShort" | "id" + ::= "idShort" | "id" | "assetKind" | "assetType" | "globalAssetId" | | "endpoints" ( "[" ( [0-9]* ) "]" ) "." | "submodelDescriptors" ( "[" ( [0-9]* ) "]" ) "." ::= ( | "idShort" | "id" | "endpoints" ( "[" ( [0-9]* ) "]" ) "." ) ::= "interface" | "protocolinformation.href" ::= ( "type" | "keys" ( "[" ( [0-9]* ) "]" ) ( ".type" | ".value" ) ) ::= ( "semanticId" | "semanticId." ) ::= ( "specificAssetIds" ( "[" ( [0-9]* ) "]" ) ( ".name" | ".value" | ".externalSubjectId" | ".externalSubjectId." ) ) + + + ::= | | | | | + + ::= "$aas#" ( "idShort" | "assetInformation.assetType" | "assetInformation.globalAssetId" | "assetInformation." | "submodels" ( "[" ( [0-9]* ) "]" ) ("." )? ) + ::= "$sm#" ( | "idShort" | "id" ) + ::= "$sme" ( "." )? ( "#" ( | "idShort" | "value" | "valueType" | "language" ))? + ::= "$cd#" ( "idShort" ) + ::= "$aasdesc#" ( "idShort" | "description" | "displayName" | "extension" | "administration" | "assetKind" | "assetType" | "globalAssetId" | | | "submodelDescriptors[" ( [0-9]* ) "]" ("." )? ) + ::= "$smdesc#" + + ::= "specificAssetIds" ( "[" ( [0-9]* ) "]" ) (".externalSubjectId" | ".externalSubjectId." )? + ::= ( | "idShort" | ) + ::= "endpoints" ( "[" ( [0-9]* ) "]" ) + + ::= "semanticId" | "semanticId." + ::= "keys[" ( [0-9]* ) "]" + + ::= ( ("[" ( [0-9]* ) "]" )* ( "." )* ) ::= ( ( [a-z] | [A-Z] ) (( [a-z] | [A-Z] | [0-9] | "_" | "-" )* ( [a-z] | [A-Z] | [0-9] | "_" ) )? ) diff --git a/documentation/IDTA-01004/modules/ROOT/partials/json/aas-queries-and-access-rules-schema.json b/documentation/IDTA-01004/modules/ROOT/partials/json/aas-queries-and-access-rules-schema.json index 97d3ba8..3a15b94 100644 --- a/documentation/IDTA-01004/modules/ROOT/partials/json/aas-queries-and-access-rules-schema.json +++ b/documentation/IDTA-01004/modules/ROOT/partials/json/aas-queries-and-access-rules-schema.json @@ -8,10 +8,14 @@ "type": "string", "pattern": "^[A-Za-z0-9/\\*\\[\\]\\(\\) _@#\\\\+\\-\\.,:\\$\\^]+$" }, - "FieldIdentifierAAS": { + "FieldIdentifier": { "type": "string", "pattern": "^(?:\\$aas#(?:idShort|id|assetInformation\\.assetKind|assetInformation\\.assetType|assetInformation\\.globalAssetId|assetInformation\\.specificAssetIds\\[[0-9]*\\]\\.(?:name|value|externalSubjectId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?)|submodels\\[[0-9]*\\]\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))|\\$sm#(?:semanticId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?|idShort|id)|\\$sme(?:\\.[A-Za-z](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?(?:\\[[0-9]*\\])*(?:\\.[A-Za-z](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?(?:\\[[0-9]*\\])*)*)?#(?:semanticId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?|idShort|value|valueType|language)|\\$cd#(?:idShort|id)|\\$aasdesc#(?:idShort|id|assetKind|assetType|globalAssetId|specificAssetIds\\[[0-9]*\\]\\.(?:name|value|externalSubjectId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?)|endpoints\\[[0-9]*\\]\\.(?:interface|protocolinformation\\.href)|submodelDescriptors\\[[0-9]*\\]\\.(?:semanticId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?|idShort|id|endpoints\\[[0-9]*\\]\\.(?:interface|protocolinformation\\.href)))|\\$smdesc#(?:semanticId(?:\\.(?:type|keys\\[[0-9]*\\]\\.(?:type|value)))?|idShort|id|endpoints\\[[0-9]*\\]\\.(?:interface|protocolinformation\\.href)))$" }, + "FragmentFieldIdentifier": { + "type": "string", + "pattern": "^(?:\\$aas#(?:idShort|assetInformation\\.assetType|assetInformation\\.globalAssetId|assetInformation\\.specificAssetIds\\[[0-9]*\\](?:\\.externalSubjectId(?:\\.keys\\[[0-9]*\\])?)?|submodels\\[[0-9]*\\](?:\\.keys\\[[0-9]*\\])?)|\\$sm#(?:semanticId(?:\\.keys\\[[0-9]*\\])?|idShort|id)|\\$sme(?:\\.[A-Za-z](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?(?:\\[[0-9]*\\])*(?:\\.[A-Za-z](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?(?:\\[[0-9]*\\])*)*)?(?:#(?:semanticId(?:\\.keys\\[[0-9]*\\])?|idShort|value|valueType|language))?|\\$cd#idShort|\\$aasdesc#(?:idShort|description|displayName|extension|administration|assetKind|assetType|globalAssetId|specificAssetIds\\[[0-9]*\\](?:\\.externalSubjectId(?:\\.keys\\[[0-9]*\\])?)?|endpoints\\[[0-9]*\\]|submodelDescriptors\\[[0-9]*\\](?:\\.(?:semanticId(?:\\.keys\\[[0-9]*\\])?|idShort|endpoints\\[[0-9]*\\]))?)|\\$smdesc#(?:semanticId(?:\\.keys\\[[0-9]*\\])?|idShort|endpoints\\[[0-9]*\\]))$" + }, "hexLiteralPattern": { "type": "string", "pattern": "^16#[0-9A-F]+$" @@ -653,6 +657,12 @@ "FILTER": { "$ref": "#/definitions/SecurityQueryFilter", "additionalProperties": false + }, + "FILTERLIST": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityQueryFilter" + } } }, "allOf": [ @@ -705,7 +715,7 @@ "type": "object", "properties": { "FRAGMENT": { - "type": "string" + "$ref": "#/definitions/FragmentFieldIdentifier" }, "CONDITION": { "$ref": "#/definitions/logicalExpression" @@ -731,6 +741,22 @@ ], "additionalProperties": false }, + "QueryFilter": { + "type": "object", + "properties": { + "$fragment": { + "$ref": "#/definitions/FragmentFieldIdentifier" + }, + "$condition": { + "$ref": "#/definitions/logicalExpression" + } + }, + "required": [ + "$fragment", + "$condition" + ], + "additionalProperties": false + }, "Query": { "type": "object", "properties": { @@ -740,6 +766,12 @@ }, "$condition": { "$ref": "#/definitions/logicalExpression" + }, + "$filters": { + "type": "array", + "items": { + "$ref": "#/definitions/QueryFilter" + } } }, "required": [ diff --git a/documentation/IDTA-01004/modules/ROOT/partials/json/access-rule-model.json b/documentation/IDTA-01004/modules/ROOT/partials/json/access-rule-model.json index e792552..6830cd5 100644 --- a/documentation/IDTA-01004/modules/ROOT/partials/json/access-rule-model.json +++ b/documentation/IDTA-01004/modules/ROOT/partials/json/access-rule-model.json @@ -173,41 +173,55 @@ "FILTER": { "$ref": "#/definitions/SecurityQueryFilter", "additionalProperties": false - } - }, - "oneOf": [ - { - "required": [ - "ACL" - ] }, - { - "required": [ - "USEACL" - ] + "FILTERLIST": { + "type": "array", + "items": { + "$ref": "#/definitions/SecurityQueryFilter" + } } - ], - "oneOf": [ + }, + "allOf": [ { - "required": [ - "OBJECTS" + "oneOf": [ + { + "required": [ + "ACL" + ] + }, + { + "required": [ + "USEACL" + ] + } ] }, { - "required": [ - "USEOBJECTS" - ] - } - ], - "oneOf": [ - { - "required": [ - "FORMULA" + "oneOf": [ + { + "required": [ + "OBJECTS" + ] + }, + { + "required": [ + "USEOBJECTS" + ] + } ] }, { - "required": [ - "USEFORMULA" + "oneOf": [ + { + "required": [ + "FORMULA" + ] + }, + { + "required": [ + "USEFORMULA" + ] + } ] } ], @@ -217,7 +231,7 @@ "type": "object", "properties": { "FRAGMENT": { - "type": "string" + "$ref": "#/definitions/FragmentFieldIdentifier" }, "CONDITION": { "$ref": "#/definitions/logicalExpression" From 64bb15fd297874776d4da92dcce9d6d8d8582465 Mon Sep 17 00:00:00 2001 From: Martin Stemmer <52048213+Martin187187@users.noreply.github.com> Date: Wed, 8 Apr 2026 13:22:50 +0200 Subject: [PATCH 2/2] added missing parameters --- documentation/IDTA-01004/modules/ROOT/pages/changelog.adoc | 1 + .../IDTA-01004/modules/ROOT/partials/bnf/access-rules.bnf | 2 +- .../IDTA-01004/modules/ROOT/partials/bnf/objects.bnf | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/documentation/IDTA-01004/modules/ROOT/pages/changelog.adoc b/documentation/IDTA-01004/modules/ROOT/pages/changelog.adoc index f6a1370..1f5bab1 100644 --- a/documentation/IDTA-01004/modules/ROOT/pages/changelog.adoc +++ b/documentation/IDTA-01004/modules/ROOT/pages/changelog.adoc @@ -17,6 +17,7 @@ Major Changes: * changed: with more detailed definition in BNF Grammar and JSON Schema * changed: , , , with more detailed definition in BNF Grammar and JSON Schema +* added: Query Filter and FragmentFieldIdentifiers (https://github.com/admin-shell-io/aas-specs-api/issues/517) Minor Changes: diff --git a/documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rules.bnf b/documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rules.bnf index caeded5..9c858a0 100644 --- a/documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rules.bnf +++ b/documentation/IDTA-01004/modules/ROOT/partials/bnf/access-rules.bnf @@ -16,7 +16,7 @@ ( "FILTERLIST:" ( )* )? ::= - + ( "FRAGMENT:" ) ( ( "CONDITION:" ) | ( ) ) ::= diff --git a/documentation/IDTA-01004/modules/ROOT/partials/bnf/objects.bnf b/documentation/IDTA-01004/modules/ROOT/partials/bnf/objects.bnf index d9ec093..d1b7a7d 100644 --- a/documentation/IDTA-01004/modules/ROOT/partials/bnf/objects.bnf +++ b/documentation/IDTA-01004/modules/ROOT/partials/bnf/objects.bnf @@ -14,8 +14,8 @@ "REFERABLE" "$sme" "." ::= - "FRAGMENT" "$sme" "." ( )+ - + "FRAGMENT" + ::= "DESCRIPTOR" ("$aasdesc" | "$smdesc")