From 9a173d018043fc8e9cfb9f7b60c1e49acf547405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arno=20Wei=C3=9F?= <86715435+arnoweiss@users.noreply.github.com> Date: Wed, 19 Jul 2023 08:33:41 +0200 Subject: [PATCH] Remove validation (#152) * Delete Validator * Adjust Readme --- README.md | 21 +- validator/pom.xml | 45 - .../v3/model/validator/ShaclValidator.java | 151 - .../model/validator/ValidationException.java | 28 - .../aas4j/v3/model/validator/Validator.java | 24 - .../v3/model/validator/ValidatorUtil.java | 45 - .../src/main/resources/constraint_shapes.ttl | 451 --- validator/src/main/resources/jsonExample.json | 524 --- validator/src/main/resources/ontology.ttl | 2100 ------------ validator/src/main/resources/shapes.ttl | 1258 -------- .../resources/test_demo_full_example.json | 2802 ----------------- .../dataformat/core/ValidateModelsTest.java | 55 - .../dataformat/json/JsonFullExampleTest.java | 46 - .../model/validator/ConstraintTestHelper.java | 73 - .../v3/model/validator/TestAASc_006.java | 83 - .../v3/model/validator/TestAASc_008.java | 108 - .../v3/model/validator/TestAASd_002.java | 80 - .../v3/model/validator/TestAASd_003.java | 51 - .../v3/model/validator/TestAASd_005.java | 54 - .../v3/model/validator/TestAASd_006.java | 78 - .../v3/model/validator/TestAASd_007.java | 78 - .../v3/model/validator/TestAASd_008.java | 66 - .../v3/model/validator/TestAASd_014.java | 156 - .../v3/model/validator/TestAASd_015.java | 99 - .../v3/model/validator/TestAASd_020.java | 88 - .../v3/model/validator/TestAASd_021.java | 122 - .../v3/model/validator/TestAASd_023.java | 86 - .../v3/model/validator/TestAASd_026.java | 60 - .../v3/model/validator/TestAASd_051.java | 62 - .../v3/model/validator/TestAASd_052a.java | 104 - .../v3/model/validator/TestAASd_053.java | 99 - .../v3/model/validator/TestAASd_054.java | 105 - .../v3/model/validator/TestAASd_055.java | 158 - .../v3/model/validator/TestAASd_056.java | 98 - .../v3/model/validator/TestAASd_057.java | 153 - .../v3/model/validator/TestAASd_058.java | 98 - .../v3/model/validator/TestAASd_060.java | 98 - .../v3/model/validator/TestAASd_063.java | 95 - .../v3/model/validator/TestAASd_064.java | 93 - .../v3/model/validator/TestAASd_067.java | 138 - .../v3/model/validator/TestAASd_068.java | 195 -- .../v3/model/validator/TestAASd_069.java | 151 - .../v3/model/validator/TestAASd_076.java | 99 - .../v3/model/validator/TestAASd_077.java | 90 - .../v3/model/validator/TestAASd_080.java | 79 - .../v3/model/validator/TestAASd_081.java | 79 - .../v3/model/validator/TestAASd_090.java | 105 - .../validator/TestAASd_092_059_ENTITY.java | 110 - .../TestAASd_093_059_COLLECTION.java | 111 - .../v3/model/validator/TestAASd_100.java | 59 - .../v3/model/validator/TestAASd_65a.java | 169 - .../v3/model/validator/TestAASd_66a.java | 167 - 52 files changed, 15 insertions(+), 11532 deletions(-) delete mode 100644 validator/pom.xml delete mode 100644 validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ShaclValidator.java delete mode 100644 validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ValidationException.java delete mode 100644 validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/Validator.java delete mode 100644 validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ValidatorUtil.java delete mode 100644 validator/src/main/resources/constraint_shapes.ttl delete mode 100644 validator/src/main/resources/jsonExample.json delete mode 100644 validator/src/main/resources/ontology.ttl delete mode 100644 validator/src/main/resources/shapes.ttl delete mode 100644 validator/src/main/resources/test_demo_full_example.json delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/ValidateModelsTest.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonFullExampleTest.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ConstraintTestHelper.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASc_006.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASc_008.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_002.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_003.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_005.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_006.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_007.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_008.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_014.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_015.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_020.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_021.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_023.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_026.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_051.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_052a.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_053.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_054.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_055.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_056.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_057.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_058.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_060.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_063.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_064.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_067.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_068.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_069.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_076.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_077.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_080.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_081.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_090.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_092_059_ENTITY.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_093_059_COLLECTION.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_100.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_65a.java delete mode 100644 validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_66a.java diff --git a/README.md b/README.md index fd16fcf29..8a85ddbcb 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,14 @@ # Eclipse AAS4J -> :newspaper: The _`Eclipse AAS4J 1.0.0-milestone-03`_ release is available on Maven Central Repository and includes the following artifacts implementing the _AAS Specs – Part 1 V3.0 (final)_: `dataformat-core`, `dataformat-aasx`, `dataformat-xml`, `dataformat-json`, `dataformat-parent`, and `model`. +> :newspaper: The _`Eclipse AAS4J 1.0.0-milestone-03`_ release is available on Maven Central Repository and includes the +> following artifacts implementing the _AAS Specs – Part 1 V3.0 (final)_: `dataformat-core`, `dataformat-aasx`, +> `dataformat-xml`, `dataformat-json`, `dataformat-parent`, and `model`. -[Eclipse AA4J](https://projects.eclipse.org/projects/dt.aas4j) implements the specification of the Asset Administration Shell (AAS) such as metamodels, submodels, serialization and deserialization modules, validators, and transformation libraries based on the AAS specifications. It also contains all classes and properties as defined by the document 'Details of the Asset Administration Shell' published on [Industrial Digital Twin Association (IDTA)](https://industrialdigitaltwin.org/en/). +[Eclipse AA4J](https://projects.eclipse.org/projects/dt.aas4j) implements the specification of the Asset Administration +Shell (AAS) such as metamodels, submodels, serialization and deserialization modules, validators, and transformation +libraries based on the AAS specifications. It also contains all classes and properties as defined by the document +'Specification of the Asset Administration Shell Part 1: Meta-Model' published on +[Industrial Digital Twin Association (IDTA)](https://industrialdigitaltwin.org/wp-content/uploads/2023/04/IDTA-01001-3-0_SpecificationAssetAdministrationShell_Part1_Metamodel.pdf). Note: AAS libraries for java previously available in [admin-shell-io](https://github.com/admin-shell-io). @@ -10,8 +16,10 @@ Note: AAS libraries for java previously available in [admin-shell-io](https://gi [Eclipse AA4J](https://projects.eclipse.org/projects/dt.aas4j) consists of the following components: - AAS Model -- Dataformat Library -- Validator +- Dataformat AASX +- Dataformat Core +- Dataformat JSON +- Dataformat XML # AAS Model @@ -57,10 +65,11 @@ The project contains several modules: - `dataformat-json` JSON de-/serializer - `dataformat-xml` XML de-/serializer - `model` Meta-model classes be instantiated -- `validator` Validator against the semantic restrictions of the AAS meta-model [AAS4J's predecessor](https://github.com/admin-shell-io/java-serializer) contained serialization modules for AutomationML and OPC UA for which however no longer up-to-date specifications exist. Implementation is halted until the specs have been updated. +Additionally, the RDF serializer and the validator have been removed temporarily from this repo but are planned to be +reintroduced in the future. Additionally, the sources that are used for generating the static documentation using [DocFX](https://dotnet.github.io/docfx/) in the `gh-pages` branch are located in the `docs` folder. @@ -89,7 +98,7 @@ This project was initiated by SAP and Fraunhofer to provide a foundation for the ## License Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. -Copyright 2021 SAP SE or an SAP affiliate company and Eclipse AAS4J contributors. +Copyright 2023 SAP SE or an SAP affiliate company and Eclipse AAS4J contributors. The serializers contained in this repository provide the functionalities to serialize and deserialize instances of the Asset Administration Shell (AAS) data model from and to the AAS Java Model library. It is licensed under the Apache License 2.0 (see [LICENSE](https://github.com/eclipse-aas4j/aas4j/blob/main/LICENSE)). diff --git a/validator/pom.xml b/validator/pom.xml deleted file mode 100644 index babb5d505..000000000 --- a/validator/pom.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - dataformat-parent - org.eclipse.digitaltwin.aas4j - ${revision} - - 4.0.0 - validator - Asset Administration Shell Validator - - - - ${groupId} - dataformat-rdf - ${revision} - - - ${groupId} - dataformat-json - ${revision} - test - - - ${groupId} - dataformat-core - ${revision} - tests - test - - - org.apache.jena - jena-shacl - ${jena.version} - - - org.slf4j - slf4j-simple - ${slf4j.version} - test - - - \ No newline at end of file diff --git a/validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ShaclValidator.java b/validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ShaclValidator.java deleted file mode 100644 index e39ed231b..000000000 --- a/validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ShaclValidator.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.StandardCharsets; -import java.util.HashMap; -import java.util.stream.Collectors; - -import org.apache.jena.graph.compose.Union; -import org.apache.jena.rdf.model.Model; -import org.apache.jena.rdf.model.ModelFactory; -import org.apache.jena.riot.RDFLanguages; -import org.apache.jena.riot.RiotException; -import org.apache.jena.shacl.Shapes; -import org.apache.jena.shacl.ValidationReport; -import org.apache.jena.shacl.validation.ReportEntry; -import org.apache.jena.util.FileUtils; -import org.slf4j.LoggerFactory; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.rdf.Serializer; - - -public class ShaclValidator implements Validator{ - - private final static org.slf4j.Logger logger = LoggerFactory.getLogger(ShaclValidator.class); - private final Shapes shapes; - private final Model ontologyModel; - - private static ShaclValidator validator; - - private static final Serializer serializer = new Serializer(); - - - /** - * Function to get the validator object. Initializes if it does not exist yet. Note that initialization might take a long time and should be done prior to incoming messages - * @return ShaclValidator object to validate RDF - */ - public static ShaclValidator getInstance() { - if(validator == null) - { - validator = new ShaclValidator(); - } - return validator; - } - - /** - * Function to validate Objects against SHACL shapes. - * @param obj Object to be validated alongside the information model against the shape files - */ - @Override - public void validate(Object obj) throws ValidationException { - //Perform the validation - //The data graph is the information model plus the message, hence let's create a Union graph - try { - ValidationReport report = validateGetReport(obj); - - if (!report.conforms()) { - throw new ValidationException(report.getEntries().stream().map(ReportEntry::toString).collect(Collectors.joining("\n"))); - } - } - catch (IOException e) - { - throw new ValidationException("Validation process could not be completed.", e); - } - } - - /** - * Function to validate Objects against SHACL shapes. - * @param obj Object to be validated alongside the information model against the shape files - */ - public ValidationReport validateGetReport(Object obj) throws IOException { - String rdfSerialization; - - //Turn object into JSON-LD - rdfSerialization = serializer.serialize(obj, RDFLanguages.JSONLD, new HashMap<>()); - - ShaclValidator val = getInstance(); - //Ontology is already loaded. Now we need to parse the message. - Model messageModel = ModelFactory.createDefaultModel(); - - //Read JSON-LD String into a model - try { - messageModel.read(new ByteArrayInputStream(rdfSerialization.getBytes(StandardCharsets.UTF_8)), null, "JSONLD"); - } - catch (RiotException e) - { - throw new IOException("The message is no valid JSON-LD and could therefore not be checked for information model compliance.", e); - } - - //Perform the validation - //The data graph is the information model plus the message, hence let's create a Union graph - return org.apache.jena.shacl.ShaclValidator.get().validate(val.shapes, new Union(messageModel.getGraph(), val.ontologyModel.getGraph())); - } - - - /** - * Function to explicitly initialize the ShaclValidator object. This can be used to avoid long initialization times when a message comes in - */ - @Override - public void initialize() { - if(validator == null) - { - validator = new ShaclValidator(); - } - } - - - private ShaclValidator() { - logger.info("Initializing SHACL shapes."); - - //Initialize an empty model into which we will be loading the shapes - Model shapesModel = ModelFactory.createDefaultModel(); - - //All loaded, let's parse! - //shapes = Shapes.parse(shapesModel); - InputStream shapesInputStream = getClass().getClassLoader().getResourceAsStream("shapes.ttl"); - InputStream ontologyInputStream = getClass().getClassLoader().getResourceAsStream("ontology.ttl"); - InputStream constraintShapesInputStream = getClass().getClassLoader().getResourceAsStream("constraint_shapes.ttl"); - shapesModel.read(shapesInputStream, null, FileUtils.langTurtle); - shapesModel.read(constraintShapesInputStream, null, FileUtils.langTurtle); - shapes = Shapes.parse(shapesModel); - ontologyModel = ModelFactory.createDefaultModel(); - - logger.info("Loading ontology"); - - - //Load the input stream into the ontology model - ontologyModel.read(ontologyInputStream, null, FileUtils.langTurtle); - logger.info("Initialization of SHACL shapes complete."); - } - - - -} - diff --git a/validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ValidationException.java b/validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ValidationException.java deleted file mode 100644 index 9e66a69c6..000000000 --- a/validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ValidationException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -public class ValidationException extends Exception { - - public ValidationException(String msg) { - super(msg); - } - - public ValidationException(String msg, Throwable err) { - super(msg, err); - } - -} diff --git a/validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/Validator.java b/validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/Validator.java deleted file mode 100644 index 77d236bbd..000000000 --- a/validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/Validator.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -public interface Validator { - - void validate(Object obj) throws ValidationException; - - void initialize(); - -} diff --git a/validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ValidatorUtil.java b/validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ValidatorUtil.java deleted file mode 100644 index a28740020..000000000 --- a/validator/src/main/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ValidatorUtil.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - - -import org.apache.commons.io.IOUtils; - -import java.io.IOException; -import java.io.InputStream; -import java.io.StringWriter; - -/** - * Helper class for Serializer Tests - * - * @author sbader - * - */ -public class ValidatorUtil { - - public static String readResourceToString(String resourceName) throws IOException { - ClassLoader classloader = Thread.currentThread().getContextClassLoader(); - InputStream is = classloader.getResourceAsStream(resourceName); - StringWriter writer = new StringWriter(); - IOUtils.copy(is, writer, "UTF-8"); - return writer.toString(); - } - - public static String stripWhitespaces(String input) { - return input.replaceAll("\\s+", ""); - } - -} diff --git a/validator/src/main/resources/constraint_shapes.ttl b/validator/src/main/resources/constraint_shapes.ttl deleted file mode 100644 index d87cba5f1..000000000 --- a/validator/src/main/resources/constraint_shapes.ttl +++ /dev/null @@ -1,451 +0,0 @@ -# -# Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -@prefix dash: . -@prefix dc: . -@prefix dcterms: . -@prefix owl: . -@prefix rdf: . -@prefix rdfs: . -@prefix skos: . -@prefix vann: . -@prefix xsd: . -@prefix sh: . -@prefix aas: . -@base . - - -# AASd-002 -aas:IdShortShape a sh:NodeShape ; - sh:targetClass aas:Referable ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:message "(IdShortShape): idShort of Referables shall only feature letters, digits, underscore (\"_\"); starting mandatory with a letter. I.e. [a-zA-Z][a-zA-Z0-9_]+."^^xsd:string ; - sh:pattern "^[a-zA-Z]\\w*$"^^xsd:string ; - ] ; -. - - -# AASd-005 -aas:RevisionRequiresVersionShape - a sh:NodeShape ; - sh:targetClass aas:AdministrativeInformation ; - sh:message "(RevisionRequiresVersionShape): AASd-005 - A revision requires a version." ^^xsd:string ; - sh:or ( - [ - sh:property [ - sh:path ; - sh:minCount 0 ; - sh:maxCount 0 ; - ] - ] - [ - sh:and ( - sh:property [ - sh:path ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] - sh:property [ - sh:path ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] - ) - ] - ) -. - -# AASd-006 -aas:AASd-006Shape a sh:NodeShape ; - sh:targetClass aas:Qualifier ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "If both, the value and the valueId of a Qualifier are present then the value needs to be identical to the value of the referenced coded value in Qualifier/valueId." ; - sh:select """ - SELECT ?qualifier ?value - WHERE { - ?qualifier ?value . - ?qualifier ?valueId . - ?valueId ?key . - ?key ?keyValue . - - FILTER (?value != ?keyValue) - } - """ ; - ] ; -. - -# AASd-007Shape -aas:AASd-007Shape a sh:NodeShape ; -sh:targetClass aas:Property; -sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "If both, the Property/value and the Property/valueId are present then the value of Property/value needs to be identical to the value of the referenced coded value in Property/valueId." ; - sh:prefixes rdf: ; - sh:select """ - SELECT ?property ?value WHERE { - ?property a . - ?property ?value . - ?property ?valueId . - ?valueId ?key . - ?key ?keyValue . - - FILTER (?value != ?keyValue) - }""" ; -] . - -# AASd-008 -aas:AASd-008Shape a sh:NodeShape ; - sh:targetClass aas:Operation ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:ModelingKind ; - sh:minCount 1 ; - sh:minCount 1 ; - sh:hasValue ; - sh:message "(Operation.kind = Template):The submodel element value of an operation variable shall be of kind=Template."^^xsd:string ; - ] ; -. - -# AASd-014 -aas:SelfManagedEntityRequiresAssetIdShape a sh:NodeShape ; - rdfs:subClassOf aas:SubmodelElementShape ; - sh:targetClass aas:Entity ; - sh:message "(SelfManagedEntityRequiresAssetIdShape): AASd-014 - Either the attribute globalAssetId or specificAssetId of an Entity must be set if Entity/entityType is set to “SelfManagedEntity”. They are not existing otherwise." ^^xsd:string ; - - sh:xone( - [ - sh:and( - [ - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:minCount 1; - sh:maxCount 1; - sh:pattern "SelfManagedEntity"; - ]; - ] - [ - sh:xone( - [ - sh:property [ - sh:path ; - sh:minCount 1; - sh:maxCount 1; - ]; - ] - [ - sh:property [ - sh:path ; - sh:minCount 1; - sh:maxCount 1; - ]; - ] - ) - ] - ) - ] - [ - sh:and( - [ - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:minCount 1; - sh:maxCount 1; - sh:pattern "CoManagedEntity"; - ]; - ] - [ - sh:property [ - sh:path ; - sh:minCount 0; - sh:maxCount 0; - ]; - ] - [ - sh:property [ - sh:path ; - sh:minCount 0; - sh:maxCount 0; - ]; - ] - ) - ] -) -. - -# AASd-015 -aas:AASd-015Shape a sh:NodeShape ; - sh:targetClass aas:AccessControl; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "(AASd-015Shape) - The data element SubjectAttributes/subjectAttribute shall be part of the submodel that is referenced within the “selectableSubjectAttributes” attribute of “AccessControl”" ; - sh:select """ - SELECT ?submodelElement WHERE { - ?accessControl ?submodel . - ?submodel ?submodelElement . - ?submodelElement ?subjectAttribute . - ?subjectAttribute ?dataElement . - }""" - ] ; -. - -# AASd-020 -aas:AASd-020Shape a sh:NodeShape ; - sh:targetClass aas:Qualifier ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "(AASd-020Shape) - The value of Qualifier/value shall be consistent to the data type as defined in Qualifier/valueType." ; - sh:select """ - SELECT ?this ?value ?claimedValueType WHERE { - ?this ?value . - ?this ?claimedValueType . - - # reference for the constructor functions: https://www.w3.org/TR/2013/REC-sparql11-query-20130321/#FunctionMapping - BIND(IF( (?value), true, false) AS ?isDateTime) - BIND(IF( (?value), true, false) AS ?isBoolean) - BIND(IF( (?value), true, false) AS ?isInteger) - BIND(IF( (?value), true, false) AS ?isDouble) - BIND(IF( (?value), true, false) AS ?isLong) - BIND(IF( (?value), true, false) AS ?isFloat) - BIND( isURI(?value) AS ?isUri) - BIND( isIRI(?value) AS ?isIri) - BIND(IF( (?value), true, false) AS ?isString) - - FILTER( ?claimedValueType = "integer" || ?claimedValueType = "int" || ?claimedValueType = "boolean" || ?claimedValueType = "dateTime" || ?claimedValueType = "double" || ?claimedValueType = "long" || ?claimedValueType = "float" || ?claimedValueType = "uri" || ?claimedValueType = "iri" || ?claimedValueType = "string" ) - - FILTER( IF( ?claimedValueType = "dateTime", IF(BOUND(?isDateTime), false, true), true ) ) - FILTER( IF( ?claimedValueType = "boolean", IF(BOUND(?isBoolean), false, true), true ) ) - FILTER( IF( ?claimedValueType = "long", IF(BOUND(?isLong), false, true), true ) ) - FILTER( IF( ?claimedValueType = "float", IF(BOUND(?isFloat), false, true), true ) ) - FILTER( IF( ?claimedValueType = "integer" || ?claimedValueType = "int", IF(BOUND(?isInteger), false, true), true ) ) - FILTER( IF( ?claimedValueType = "double", IF(BOUND(?isDouble), false, true), true ) ) - FILTER( IF( ?claimedValueType = "string", IF(BOUND(?isString), false, true), true ) ) - FILTER( IF( ?claimedValueType = "uri", IF(?isUri, false, true), true ) ) - FILTER( IF( ?claimedValueType = "iri", IF(?isIri, false, true), true ) ) - } - """ - ] - ]; -. - -# AASd-021 -aas:AASd-021Shape a sh:NodeShape ; - sh:targetClass aas:Qualifiable ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "(AASd-021Shape) - Every Qualifiable can only have one Qualifier with the same Qualifier/type." ; - sh:select """ - SELECT ?qualifiable WHERE { - ?qualifiable ?qualifier1 . - ?qualifiable ?qualifier2 . - ?qualifier1 ?valueType1 . - ?qualifier2 ?valueType2 . - FILTER (str(?valueType1) = str(?valueType2) ) - } - """ - ] - ]; -. - -# AASd-023 -#aas:AASd-023Shape a sh:NodeShape ; - #sh:targetClass aas:AssetInformation; - #sh:sparql [ - #a sh:SPARQLConstraint ; - #sh:message "AssetInformation/globalAssetId either is a reference to an Asset object or a global reference." ; - #sh:select """ - #SELECT ?keyType - #WHERE { - #?assetInformation a . - #?assetInformation ?globalAssetId . - #?globalAssetId ?key . - #?key ?keyType . - #FILTER (?keyType != && ?keyType != ) - - #} - #""" ; -#] . - -# AASd-026 -# aas:AASd-026Shape a sh:NodeShape ; - #sh:targetClass aas:SubmodelElementCollection ; - #sh:prefixes xsd: ; - #sh:sparql [ - #a sh:SPARQLConstraint ; - #sh:message "If allowDuplicates==false then it is not allowed that the collection contains several elements with the same semantics (i.e. the same semanticId)." ; - #sh:select """ - #SELECT ?keyType - #WHERE { - #?SubmodelElementCollection a . - #?SubmodelElementCollection ?SubmodelElementCollectionIdShort . - #?SubmodelElementCollection "False"^^xsd:boolean. - - #?SubmodelElementCollection ?Value1 . - #?Value1 ?Value1SemanticId . - #?Value1SemanticId ?Value1Key . - #?Value1Key ?Value1KeyType . - #?Value1Key ?Value1KeyValue . - #?Value1Key ?Value1KeyIdType . - - #?SubmodelElementCollection ?Value2 . - #?Value2 ?Value2SemanticId . - #?Value2SemanticId ?Value2Key . - #?Value2Key ?Value2KeyType . - #?Value2Key ?Value2KeyValue . - #?Value2Key ?Value2KeyIdType . - - - #FILTER (?Value1SemanticId = ?Value2SemanticId ) - - #} - # """ ; - #] . - -# AASd-051 -aas:ConceptDescriptionAllowedCategories a sh:NodeShape ; - sh:targetClass aas:ConceptDescription ; - - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:minCount 0 ; - sh:pattern "^VALUE|^PROPERTY|^REFERENCE|^DOCUMENT|^CAPABILITY|^RELATIONSHIP|^COLLECTION|^FUNCTION|^EVENT|^ENTITY|^APPLICATION_CLASS|^QUALIFIER|^VIEW"; - sh:message "A ConceptDescription shall have one of the following categories: VALUE, PROPERTY, REFERENCE, DOCUMENT, CAPABILITY, RELATIONSHIP, COLLECTION, FUNCTION, EVENT, ENTITY, APPLICATION_CLASS, QUALIFIER, VIEW." ^^xsd:string ; - ] ; -. - - -# AASc-006 -aas:ConceptDescriptionWithCategoryDocumentAndIEC61360CorrectDataType a sh:NodeShape ; - sh:targetClass aas:ConceptDescription; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "For a ConceptDescription with category DOCUMENT using data specification template IEC61360 (http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/2/0) - DataSpecificationIEC61360/dataType shall be one of the following values: String or URL." ; - - sh:select """ - SELECT ?conceptDescription - WHERE { - ?element a . - ?conceptDescription "DOCUMENT" . - ?conceptDescription ?embeddedDataSpecification . - ?embeddedDataSpecification ?dataSpecification . - ?dataSpecification ?dataType . - FILTER(?dataType != && ?dataType != ) - } - """ ; -] . - -# AASc-008 -aas:ConceptDescriptionDefinitionInEnglishIfNotValueCategory a sh:NodeShape ; - sh:targetClass aas:ConceptDescription ; - - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "For all ConceptDescriptions except for ConceptDescriptions of category VALUE using data specification template IEC61360 (https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360/definition) - DataSpecificationIEC61360/definition is mandatory and shall be defined at least in English." ; - sh:prefixes rdf: ; - sh:select """ - SELECT ?dataSpecification - WHERE { - ?conceptDescription a . - MINUS { - ?conceptDescription a . - ?conceptDescription ?embeddedDataSpecificationEn . - ?embeddedDataSpecificationEn ?dataSpecificationEn . - ?dataSpecificationEn ?preferredNameEn . - FILTER(LANGMATCHES(LANG(?preferredNameEn), "en")) - } - ?conceptDescription ?category . - FILTER (?category != "VALUE") - ?conceptDescription ?embeddedDataSpecification . - ?embeddedDataSpecification ?dataSpecification . - } - """ ; -] . - - - -# AASd-077 -aas:UniqueExtensionNames a sh:NodeShape ; - sh:targetClass aas:HasExtensions ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "The name of an extension within HasExtensions needs to be unique." ; - - sh:select """ - SELECT ?extensionName - WHERE { - ?extension1 a . - ?extension1 ?extension1Name . - - ?extension2 a . - ?extension2 ?extension2Name . - - ?hasExtensions ?extension1 . - ?hasExtensions ?extension2 . - - FILTER(?extension1Name = ?extension2Name ) - } - """ ; -] . - -# AASd-090 -aas:DataElementExcludingFileAndBlobCorrectCategory a sh:NodeShape ; - sh:targetClass aas:DataElement; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "For data elements Referable/category shall be one of the following values: CONSTANT, PARAMETER or VARIABLE. Exception: File and Blob data elements." ; - sh:prefixes rdf: ; - sh:select """ - SELECT ?element - WHERE { - ?subclass + . - FILTER(?subclass != && ?subclass != ) - ?element a ?subclass . - ?element ?category . - FILTER(?category != "CONSTANT" && ?category != "PARAMETER" && ?category != "VARIABLE") - } - """ ; -] . - - -# AASd-100 -aas:ReferableShape a sh:NodeShape ; - sh:targetClass aas:Referable ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:minCount 0 ; - sh:pattern "^(?!\\s*$).+" ; - sh:message "(Referable.category):An attribute with data type \"string\" is not allowed to be empty."^^xsd:string ; - ] ; -. diff --git a/validator/src/main/resources/jsonExample.json b/validator/src/main/resources/jsonExample.json deleted file mode 100644 index ae9fddb49..000000000 --- a/validator/src/main/resources/jsonExample.json +++ /dev/null @@ -1,524 +0,0 @@ -{ - "assetAdministrationShells": [ - { - "modelType": { - "name": "AssetAdministrationShell" - }, - "idShort": "ExampleMotor", - "identification": { - "idType": "Iri", - "id": "http://customer.com/aas/9175_7013_7091_9168" - }, - "assetInformation": { - "assetKind": "Instance", - "globalAssetId": { - "keys": [ - { - "type": "Asset", - "value": "http://customer.com/assets/KHBVZJSQKIY", - "idType": "Iri" - } - ] - }, - "specificAssetIds": [ - { - "key": "EquipmentID", - "value": "538fd1b3-f99f-4a52-9c75-72e9fa921270", - "subjectId": { - "keys": [ - { - "type": "GlobalReference", - "value": "http://customer.com/Systems/ERP/012", - "idType": "Iri" - } - ] - } - }, - { - "key": "DeviceID", - "value": "QjYgPggjwkiHk4RrQiYSLg==", - "subjectId": { - "keys": [ - { - "type": "GlobalReference", - "value": "http://customer.com/Systems/IoT/1", - "idType": "Iri" - } - ] - } - } - ], - "thumbnail": { - "modelType": { - "name": "File" - }, - "kind": "Instance", - "idShort": "thumbnail", - "mimeType": "image/png", - "value": "https://github.com/admin-shell/io/blob/master/verwaltungsschale-detail-part1.png" - } - }, - "submodels": [ - { - "keys": [ - { - "type": "Submodel", - "value": "http.//i40.customer.com/type/1/1/7A7104BDAB57E184", - "idType": "Iri" - } - ] - }, - { - "keys": [ - { - "type": "Submodel", - "value": "http://i40.customer.com/instance/1/1/AC69B1CB44F07935", - "idType": "Iri" - } - ] - }, - { - "keys": [ - { - "type": "Submodel", - "value": "http://i40.customer.com/type/1/1/1A7B62B529F19152", - "idType": "Iri" - } - ] - } - ] - } - ], - "assets": [ - { - "modelType": { - "name": "Asset" - }, - "identification": { - "idType": "Iri", - "id": "http://customer.com/assets/KHBVZJSQKIY" - } - } - ], - "submodels": [ - { - "modelType": { - "name": "Submodel" - }, - "semanticId": { - "keys": [ - { - "type": "GlobalReference", - "value": "0173-1#01-AFZ615#016", - "idType": "Irdi" - } - ] - }, - "kind": "Instance", - "idShort": "TechnicalData", - "identification": { - "idType": "Iri", - "id": "http://i40.customer.com/type/1/1/7A7104BDAB57E184" - }, - "submodelElements": [ - { - "modelType": { - "name": "Property" - }, - "kind": "Instance", - "semanticId": { - "keys": [ - { - "type": "ConceptDescription", - "value": "0173-1#02-BAA120#008", - "idType": "Irdi" - } - ] - }, - "idShort": "MaxRotationSpeed", - "category": "PARAMETER", - "value": "5000", - "valueType": "integer" - } - ] - }, - { - "modelType": { - "name": "Submodel" - }, - "kind": "Instance", - "idShort": "Documentation", - "identification": { - "idType": "Iri", - "id": "http://i40.customer.com/type/1/1/1A7B62B529F19152" - }, - "submodelElements": [ - { - "modelType": { - "name": "SubmodelElementCollection" - }, - "kind": "Instance", - "semanticId": { - "keys": [ - { - "type": "ConceptDescription", - "value": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Document", - "idType": "Iri" - } - ] - }, - "idShort": "OperatingManual", - "value": [ - { - "modelType": { - "name": "Property" - }, - "kind": "Instance", - "semanticId": { - "keys": [ - { - "type": "ConceptDescription", - "value": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Description/Title", - "idType": "Iri" - } - ] - }, - "idShort": "Title", - "value": "OperatingManual", - "valueType": "langString" - }, - { - "modelType": { - "name": "File" - }, - "kind": "Instance", - "semanticId": { - "keys": [ - { - "type": "ConceptDescription", - "value": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/StoredDocumentRepresentation/DigitalFile", - "idType": "Iri" - } - ] - }, - "idShort": "DigitalFile_PDF", - "mimeType": "application/pdf", - "value": "/aasx/OperatingManual.pdf" - } - ], - "ordered": false, - "allowDuplicates": false - } - ] - }, - { - "modelType": { - "name": "Submodel" - }, - "kind": "Instance", - "idShort": "OperationalData", - "identification": { - "idType": "Iri", - "id": "http://i40.customer.com/instance/1/1/AC69B1CB44F07935" - }, - "submodelElements": [ - { - "modelType": { - "name": "Property" - }, - "kind": "Instance", - "semanticId": { - "keys": [ - { - "type": "ConceptDescription", - "value": "http://customer.com/cd/1/1/18EBD56F6B43D895", - "idType": "Iri" - } - ] - }, - "idShort": "RotationSpeed", - "category": "Variable", - "value": "4370", - "valueType": "integer" - } - ] - } - ], - "conceptDescriptions": [ - { - "modelType": { - "name": "ConceptDescription" - }, - "idShort": "Title", - "identification": { - "idType": "Iri", - "id": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Description/Title" - }, - "embeddedDataSpecifications": [ - { - "dataSpecification": { - "keys": [ - { - "type": "GlobalReference", - "value": "http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/2/0", - "idType": "Iri" - } - ] - }, - "dataSpecificationContent": { - "preferredName": [ - { - "language": "EN", - "text": "Title" - } - ], - "shortName": [ - { - "language": "EN", - "text": "Title" - }, - { - "language": "DE", - "text": "Titel" - } - ], - "unit": "ExampleUnit", - "sourceOfDefinition": "ExampleDefinition", - "dataType": "StringTranslatable", - "definition": [ - { - "language": "EN", - "text": "Language-dependent title of the document.." - } - ] - } - } - ] - }, - { - "modelType": { - "name": "ConceptDescription" - }, - "idShort": "DigitalFile", - "identification": { - "idType": "Iri", - "id": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/StoredDocumentRepresentation/DigitalFile" - }, - "embeddedDataSpecifications": [ - { - "dataSpecification": { - - - "keys": [ - { - "type": "GlobalReference", - "value": "http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/2/0", - "idType": "Iri" - } - ] - - }, - "dataSpecificationContent": { - "preferredName": [ - { - "language": "EN", - "text": "DigitalFile" - } - ], - "shortName": [ - { - "language": "EN", - "text": "DigitalFile" - }, - { - "language": "DE", - "text": "DigitaleDatei" - } - ], - "unit": "ExampleUnit", - "sourceOfDefinition": "ExampleDefinition", - "dataType": "String", - "definition": [ - { - "language": "EN", - "text": "A file that represents the Document Version. In addition to the obligatory PDF file, other files can be specified. " - } - ] - } - } - ] - }, - { - "modelType": { - "name": "ConceptDescription" - }, - "idShort": "MaxRotationSpeed", - "category": "PROPERTY", - "administration": { - "version": "2", - "revision": "2.1" - }, - "identification": { - "idType": "Irdi", - "id": "0173-1#02-BAA120#008" - }, - "embeddedDataSpecifications": [ - { - "dataSpecification": { - "keys": [{ - "type": "GlobalReference", - "value": "http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/2/0", - "idType": "Iri" - } - ] - }, - "dataSpecificationContent": { - "preferredName": [ - { - "language": "en", - "text": "Max.rotationspeed" - } - ], - "shortName": [], - "unit": "1/min", - "unitId": { - "keys": [ - { - "type": "GlobalReference", - "value": "0173-1#05-AAA650#002", - "idType": "Irdi" - } - ] - }, - "sourceOfDefinition": "ExampleDefinition", - "dataType": "RealMeasure", - "definition": [ - { - "language": "de", - "text": "HöchstezulässigeDrehzahl,mitwelcherderMotoroderdieSpeiseinheitbetriebenwerdendarf" - }, - { - "language": "en", - "text": "Greatestpermissiblerotationspeedwithwhichthemotororfeedingunitmaybeoperated" - } - ] - } - } - ] - }, - { - "modelType": { - "name": "ConceptDescription" - }, - "idShort": "RotationSpeed", - "category": "PROPERTY", - "identification": { - "idType": "Iri", - "id": "http://customer.com/cd/1/1/18EBD56F6B43D895" - }, - "embeddedDataSpecifications": [ - { - "dataSpecification": { - "keys": [ - { - "type": "GlobalReference", - "value": "http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/2/0", - "idType": "Iri" - } - ] - }, - "dataSpecificationContent": { - "preferredName": [ - { - "language": "EN", - "text": "Actualrotationspeed" - } - ], - "shortName": [ - { - "language": "DE", - "text": "AktuelleDrehzahl" - }, - { - "language": "EN", - "text": "ActualRotationSpeed" - } - ], - "unit": "1/min", - "unitId": { - "keys": [ - { - "type": "GlobalReference", - "value": "0173-1#05-AAA650#002", - "idType": "Irdi" - } - ] - }, - "sourceOfDefinition": "ExampleDefinition", - "dataType": "RealMeasure", - "definition": [ - { - "language": "DE", - "text": "Aktuelle Drehzahl, mitwelcher der Motor oder die Speiseinheit betrieben wird" - }, - { - "language": "EN", - "text": "Actual rotationspeed with which the motor or feedingunit is operated" - } - ] - } - } - ] - }, - { - "modelType": { - "name": "ConceptDescription" - }, - "idShort": "Document", - "identification": { - "idType": "Iri", - "id": "http://www.vdi2770.com/blatt1/Entwurf/Okt18/cd/Document" - }, - "embeddedDataSpecifications": [ - { - "dataSpecification": { - - "keys": [ - { - "type": "GlobalReference", - "value": "http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/2/0", - "idType": "Iri" - } - ] - - }, - "dataSpecificationContent": { - "preferredName": [{ - "language": "EN", - "text": "Document" - }], - "shortName": [ - { - "language": "EN", - "text": "Document" - }, - { - "language": "DE", - "text": "Dokument" - } - ], - "unit": "ExampleUnit", - "sourceOfDefinition": "[ISO15519-1:2010]", - "dataType": "String", - "definition": [ - { - "language": "EN", - "text": "Fixed and ordered set of information intended for human use that can be managed and exchanged as a unit between users and the system." - } - ] - } - } - ] - } - ] -} \ No newline at end of file diff --git a/validator/src/main/resources/ontology.ttl b/validator/src/main/resources/ontology.ttl deleted file mode 100644 index 450038c20..000000000 --- a/validator/src/main/resources/ontology.ttl +++ /dev/null @@ -1,2100 +0,0 @@ -@prefix aas: . -@prefix owl: . -@prefix rdf: . -@prefix rdfs: . -@prefix xs: . -@base . - - rdf:type owl:Ontology ; - owl:versionInfo "V3.0RC02" ; - rdfs:comment "This ontology represents the data model for the Asset Administration Shell according to the specification 'Details of the Asset Administration Shell - Part 1 - Version V3.0RC02'."@en ; - rdfs:isDefinedBy ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements -aas:AasSubmodelElements rdf:type owl:Class ; - rdfs:label "Aas Submodel Elements"^^xs:string ; - rdfs:comment "Enumeration of all possible elements of a 'SubmodelElementList'."@en ; - owl:oneOf ( - - - - - - - - - - - - - - - - - - ) ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/AnnotatedRelationshipElement - rdf:type aas:AasSubmodelElements ; - rdfs:label "Annotated Relationship Element"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/BasicEventElement - rdf:type aas:AasSubmodelElements ; - rdfs:label "Basic Event Element"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/Blob - rdf:type aas:AasSubmodelElements ; - rdfs:label "Blob"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/Capability - rdf:type aas:AasSubmodelElements ; - rdfs:label "Capability"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/DataElement - rdf:type aas:AasSubmodelElements ; - rdfs:label "Data Element"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/Entity - rdf:type aas:AasSubmodelElements ; - rdfs:label "Entity"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/EventElement - rdf:type aas:AasSubmodelElements ; - rdfs:label "Event Element"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/File - rdf:type aas:AasSubmodelElements ; - rdfs:label "File"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/MultiLanguageProperty - rdf:type aas:AasSubmodelElements ; - rdfs:label "Multi Language Property"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/Operation - rdf:type aas:AasSubmodelElements ; - rdfs:label "Operation"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/Property - rdf:type aas:AasSubmodelElements ; - rdfs:label "Property"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/Range - rdf:type aas:AasSubmodelElements ; - rdfs:label "Range"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/ReferenceElement - rdf:type aas:AasSubmodelElements ; - rdfs:label "Reference Element"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/RelationshipElement - rdf:type aas:AasSubmodelElements ; - rdfs:label "Relationship Element"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/SubmodelElement - rdf:type aas:AasSubmodelElements ; - rdfs:label "Submodel Element"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/SubmodelElementCollection - rdf:type aas:AasSubmodelElements ; - rdfs:label "Submodel Element Collection"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AasSubmodelElements/SubmodelElementList - rdf:type aas:AasSubmodelElements ; - rdfs:label "Submodel Element List"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/AdministrativeInformation -aas:AdministrativeInformation rdf:type owl:Class ; - rdfs:subClassOf aas:HasDataSpecification ; - rdfs:label "Administrative Information"^^xs:string ; - rdfs:comment "Administrative meta-information for an element like version information."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/AdministrativeInformation/revision - rdf:type owl:DatatypeProperty ; - rdfs:label "has revision"^^xs:string ; - rdfs:domain aas:AdministrativeInformation ; - rdfs:range xs:string ; - rdfs:comment "Revision of the element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/AdministrativeInformation/version - rdf:type owl:DatatypeProperty ; - rdfs:label "has version"^^xs:string ; - rdfs:domain aas:AdministrativeInformation ; - rdfs:range xs:string ; - rdfs:comment "Version of the element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/AnnotatedRelationshipElement -aas:AnnotatedRelationshipElement rdf:type owl:Class ; - rdfs:subClassOf aas:RelationshipElement ; - rdfs:label "Annotated Relationship Element"^^xs:string ; - rdfs:comment "An annotated relationship element is a relationship element that can be annotated with additional data elements."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/AnnotatedRelationshipElement/annotations - rdf:type owl:ObjectProperty ; - rdfs:label "has annotations"^^xs:string ; - rdfs:domain aas:AnnotatedRelationshipElement ; - rdfs:range aas:DataElement ; - rdfs:comment "A data element that represents an annotation that holds for the relationship between the two elements"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/AssetAdministrationShell -aas:AssetAdministrationShell rdf:type owl:Class ; - rdfs:subClassOf aas:Identifiable ; - rdfs:subClassOf aas:HasDataSpecification ; - rdfs:label "Asset Administration Shell"^^xs:string ; - rdfs:comment "An asset administration shell."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/AssetAdministrationShell/assetInformation - rdf:type owl:ObjectProperty ; - rdfs:label "has asset information"^^xs:string ; - rdfs:domain aas:AssetAdministrationShell ; - rdfs:range aas:AssetInformation ; - rdfs:comment "Meta-information about the asset the AAS is representing."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/AssetAdministrationShell/derivedFrom - rdf:type owl:ObjectProperty ; - rdfs:label "has derived from"^^xs:string ; - rdfs:domain aas:AssetAdministrationShell ; - rdfs:range aas:Reference ; - rdfs:comment "The reference to the AAS the AAS was derived from."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/AssetAdministrationShell/submodels - rdf:type owl:ObjectProperty ; - rdfs:label "has submodels"^^xs:string ; - rdfs:domain aas:AssetAdministrationShell ; - rdfs:range aas:Reference ; - rdfs:comment "References to submodels of the AAS."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/AssetInformation -aas:AssetInformation rdf:type owl:Class ; - rdfs:label "Asset Information"^^xs:string ; - rdfs:comment "In 'AssetInformation' identifying meta data of the asset that is represented by an AAS is defined."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/AssetInformation/assetKind - rdf:type owl:ObjectProperty ; - rdfs:label "has asset kind"^^xs:string ; - rdfs:domain aas:AssetInformation ; - rdfs:range aas:AssetKind ; - rdfs:comment "Denotes whether the Asset is of kind 'Type' or 'Instance'."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/AssetInformation/defaultThumbnail - rdf:type owl:ObjectProperty ; - rdfs:label "has default thumbnail"^^xs:string ; - rdfs:domain aas:AssetInformation ; - rdfs:range aas:Resource ; - rdfs:comment "Thumbnail of the asset represented by the Asset Administration Shell."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/AssetInformation/globalAssetId - rdf:type owl:ObjectProperty ; - rdfs:label "has global asset id"^^xs:string ; - rdfs:domain aas:AssetInformation ; - rdfs:range aas:Reference ; - rdfs:comment "Global identifier of the asset the AAS is representing."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/AssetInformation/specificAssetIds - rdf:type owl:ObjectProperty ; - rdfs:label "has specific asset ids"^^xs:string ; - rdfs:domain aas:AssetInformation ; - rdfs:range aas:SpecificAssetId ; - rdfs:comment "Additional domain-specific, typically proprietary identifier for the asset like e.g., serial number etc."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/AssetKind -aas:AssetKind rdf:type owl:Class ; - rdfs:label "Asset Kind"^^xs:string ; - rdfs:comment "Enumeration for denoting whether an asset is a type asset or an instance asset."@en ; - owl:oneOf ( - - - ) ; -. - -### https://admin-shell.io/aas/3/0/RC02/AssetKind/Instance - rdf:type aas:AssetKind ; - rdfs:label "Instance"^^xs:string ; - rdfs:comment "concrete, clearly identifiable component of a certain type"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/AssetKind/Type - rdf:type aas:AssetKind ; - rdfs:label "Type"^^xs:string ; - rdfs:comment "hardware or software element which specifies the common attributes shared by all instances of the type"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/BasicEventElement -aas:BasicEventElement rdf:type owl:Class ; - rdfs:subClassOf aas:EventElement ; - rdfs:label "Basic Event Element"^^xs:string ; - rdfs:comment "A basic event element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/BasicEventElement/direction - rdf:type owl:ObjectProperty ; - rdfs:label "has direction"^^xs:string ; - rdfs:domain aas:BasicEventElement ; - rdfs:range aas:Direction ; - rdfs:comment "Direction of event."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/BasicEventElement/lastUpdate - rdf:type owl:DatatypeProperty ; - rdfs:label "has last update"^^xs:string ; - rdfs:domain aas:BasicEventElement ; - rdfs:range xs:string ; - rdfs:comment "Timestamp in UTC, when the last event was received (input direction) or sent (output direction)."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/BasicEventElement/maxInterval - rdf:type owl:DatatypeProperty ; - rdfs:label "has max interval"^^xs:string ; - rdfs:domain aas:BasicEventElement ; - rdfs:range xs:string ; - rdfs:comment "For input direction: not applicable."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/BasicEventElement/messageBroker - rdf:type owl:ObjectProperty ; - rdfs:label "has message broker"^^xs:string ; - rdfs:domain aas:BasicEventElement ; - rdfs:range aas:Reference ; - rdfs:comment "Information, which outer message infrastructure shall handle messages for the 'EventElement'. Refers to a 'Submodel', 'SubmodelElementList', 'SubmodelElementCollection' or 'Entity', which contains 'DataElement''s describing the proprietary specification for the message broker."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/BasicEventElement/messageTopic - rdf:type owl:DatatypeProperty ; - rdfs:label "has message topic"^^xs:string ; - rdfs:domain aas:BasicEventElement ; - rdfs:range xs:string ; - rdfs:comment "Information for the outer message infrastructure for scheduling the event to the respective communication channel."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/BasicEventElement/minInterval - rdf:type owl:DatatypeProperty ; - rdfs:label "has min interval"^^xs:string ; - rdfs:domain aas:BasicEventElement ; - rdfs:range xs:string ; - rdfs:comment "For input direction, reports on the maximum frequency, the software entity behind the respective Referable can handle input events."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/BasicEventElement/observed - rdf:type owl:ObjectProperty ; - rdfs:label "has observed"^^xs:string ; - rdfs:domain aas:BasicEventElement ; - rdfs:range aas:Reference ; - rdfs:comment "Reference to the 'Referable', which defines the scope of the event. Can be 'AssetAdministrationShell', 'Submodel', or 'SubmodelElement'."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/BasicEventElement/state - rdf:type owl:ObjectProperty ; - rdfs:label "has state"^^xs:string ; - rdfs:domain aas:BasicEventElement ; - rdfs:range aas:StateOfEvent ; - rdfs:comment "State of event."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Blob -aas:Blob rdf:type owl:Class ; - rdfs:subClassOf aas:DataElement ; - rdfs:label "Blob"^^xs:string ; - rdfs:comment "A 'Blob' is a data element that represents a file that is contained with its source code in the value attribute."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Blob/contentType - rdf:type owl:DatatypeProperty ; - rdfs:label "has content type"^^xs:string ; - rdfs:domain aas:Blob ; - rdfs:range xs:string ; - rdfs:comment "Content type of the content of the 'Blob'."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Blob/value - rdf:type owl:DatatypeProperty ; - rdfs:label "has value"^^xs:string ; - rdfs:domain aas:Blob ; - rdfs:range xs:base64Binary ; - rdfs:comment "The value of the 'Blob' instance of a blob data element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Capability -aas:Capability rdf:type owl:Class ; - rdfs:subClassOf aas:SubmodelElement ; - rdfs:label "Capability"^^xs:string ; - rdfs:comment "A capability is the implementation-independent description of the potential of an asset to achieve a certain effect in the physical or virtual world."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/ConceptDescription -aas:ConceptDescription rdf:type owl:Class ; - rdfs:subClassOf aas:Identifiable ; - rdfs:subClassOf aas:HasDataSpecification ; - rdfs:label "Concept Description"^^xs:string ; - rdfs:comment "The semantics of a property or other elements that may have a semantic description is defined by a concept description."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/ConceptDescription/isCaseOf - rdf:type owl:ObjectProperty ; - rdfs:label "has is case of"^^xs:string ; - rdfs:domain aas:ConceptDescription ; - rdfs:range aas:Reference ; - rdfs:comment "Reference to an external definition the concept is compatible to or was derived from."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataElement -aas:DataElement rdf:type owl:Class ; - rdfs:subClassOf aas:SubmodelElement ; - rdfs:label "Data Element"^^xs:string ; - rdfs:comment "A data element is a submodel element that is not further composed out of other submodel elements."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationContent -aas:DataSpecificationContent rdf:type owl:Class ; - rdfs:label "Data Specification Content"^^xs:string ; - rdfs:comment "Data specification content is part of a data specification template and defines which additional attributes shall be added to the element instance that references the data specification template and meta information about the template itself."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360 -aas:DataSpecificationIEC61360 rdf:type owl:Class ; - rdfs:subClassOf aas:DataSpecificationContent ; - rdfs:label "Data Specification IEC 61360"^^xs:string ; - rdfs:comment "Content of data specification template for concept descriptions for properties, values and value lists conformant to IEC 61360."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360/dataType - rdf:type owl:ObjectProperty ; - rdfs:label "has data type"^^xs:string ; - rdfs:domain aas:DataSpecificationIEC61360 ; - rdfs:range aas:DataTypeIEC61360 ; - rdfs:comment "Data Type"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360/definition - rdf:type owl:ObjectProperty ; - rdfs:label "has definition"^^xs:string ; - rdfs:domain aas:DataSpecificationIEC61360 ; - rdfs:range rdf:langString ; - rdfs:comment "Definition in different languages"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360/levelType - rdf:type owl:ObjectProperty ; - rdfs:label "has level type"^^xs:string ; - rdfs:domain aas:DataSpecificationIEC61360 ; - rdfs:range aas:LevelType ; - rdfs:comment "Set of levels."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360/preferredName - rdf:type owl:ObjectProperty ; - rdfs:label "has preferred name"^^xs:string ; - rdfs:domain aas:DataSpecificationIEC61360 ; - rdfs:range rdf:langString ; - rdfs:comment "Preferred name"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360/shortName - rdf:type owl:ObjectProperty ; - rdfs:label "has short name"^^xs:string ; - rdfs:domain aas:DataSpecificationIEC61360 ; - rdfs:range rdf:langString ; - rdfs:comment "Short name"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360/sourceOfDefinition - rdf:type owl:DatatypeProperty ; - rdfs:label "has source of definition"^^xs:string ; - rdfs:domain aas:DataSpecificationIEC61360 ; - rdfs:range xs:string ; - rdfs:comment "Source of definition"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360/symbol - rdf:type owl:DatatypeProperty ; - rdfs:label "has symbol"^^xs:string ; - rdfs:domain aas:DataSpecificationIEC61360 ; - rdfs:range xs:string ; - rdfs:comment "Symbol"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360/unit - rdf:type owl:DatatypeProperty ; - rdfs:label "has unit"^^xs:string ; - rdfs:domain aas:DataSpecificationIEC61360 ; - rdfs:range xs:string ; - rdfs:comment "Unit"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360/unitId - rdf:type owl:ObjectProperty ; - rdfs:label "has unit id"^^xs:string ; - rdfs:domain aas:DataSpecificationIEC61360 ; - rdfs:range aas:Reference ; - rdfs:comment "Unique unit id"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360/value - rdf:type owl:DatatypeProperty ; - rdfs:label "has value"^^xs:string ; - rdfs:domain aas:DataSpecificationIEC61360 ; - rdfs:range xs:string ; - rdfs:comment "Value"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360/valueFormat - rdf:type owl:DatatypeProperty ; - rdfs:label "has value format"^^xs:string ; - rdfs:domain aas:DataSpecificationIEC61360 ; - rdfs:range xs:string ; - rdfs:comment "Value Format"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360/valueList - rdf:type owl:ObjectProperty ; - rdfs:label "has value list"^^xs:string ; - rdfs:domain aas:DataSpecificationIEC61360 ; - rdfs:range aas:ValueList ; - rdfs:comment "List of allowed values"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationPhysicalUnit -aas:DataSpecificationPhysicalUnit rdf:type owl:Class ; - rdfs:subClassOf aas:DataSpecificationContent ; - rdfs:label "Data Specification Physical Unit"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationPhysicalUnit/conversionFactor - rdf:type owl:DatatypeProperty ; - rdfs:label "has conversion factor"^^xs:string ; - rdfs:domain aas:DataSpecificationPhysicalUnit ; - rdfs:range xs:string ; - rdfs:comment "Conversion factor"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationPhysicalUnit/definition - rdf:type owl:ObjectProperty ; - rdfs:label "has definition"^^xs:string ; - rdfs:domain aas:DataSpecificationPhysicalUnit ; - rdfs:range rdf:langString ; - rdfs:comment "Definition in different languages"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationPhysicalUnit/dinNotation - rdf:type owl:DatatypeProperty ; - rdfs:label "has din notation"^^xs:string ; - rdfs:domain aas:DataSpecificationPhysicalUnit ; - rdfs:range xs:string ; - rdfs:comment "Notation of physical unit conformant to DIN"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationPhysicalUnit/eceCode - rdf:type owl:DatatypeProperty ; - rdfs:label "has ece code"^^xs:string ; - rdfs:domain aas:DataSpecificationPhysicalUnit ; - rdfs:range xs:string ; - rdfs:comment "Code of physical unit conformant to ECE"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationPhysicalUnit/eceName - rdf:type owl:DatatypeProperty ; - rdfs:label "has ece name"^^xs:string ; - rdfs:domain aas:DataSpecificationPhysicalUnit ; - rdfs:range xs:string ; - rdfs:comment "Name of physical unit conformant to ECE"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationPhysicalUnit/nistName - rdf:type owl:DatatypeProperty ; - rdfs:label "has nist name"^^xs:string ; - rdfs:domain aas:DataSpecificationPhysicalUnit ; - rdfs:range xs:string ; - rdfs:comment "Name of NIST physical unit"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationPhysicalUnit/registrationAuthorityId - rdf:type owl:DatatypeProperty ; - rdfs:label "has registration authority id"^^xs:string ; - rdfs:domain aas:DataSpecificationPhysicalUnit ; - rdfs:range xs:string ; - rdfs:comment "Registration authority ID"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationPhysicalUnit/siName - rdf:type owl:DatatypeProperty ; - rdfs:label "has si name"^^xs:string ; - rdfs:domain aas:DataSpecificationPhysicalUnit ; - rdfs:range xs:string ; - rdfs:comment "Name of SI physical unit"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationPhysicalUnit/siNotation - rdf:type owl:DatatypeProperty ; - rdfs:label "has si notation"^^xs:string ; - rdfs:domain aas:DataSpecificationPhysicalUnit ; - rdfs:range xs:string ; - rdfs:comment "Notation of SI physical unit"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationPhysicalUnit/sourceOfDefinition - rdf:type owl:DatatypeProperty ; - rdfs:label "has source of definition"^^xs:string ; - rdfs:domain aas:DataSpecificationPhysicalUnit ; - rdfs:range xs:string ; - rdfs:comment "Source of definition"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationPhysicalUnit/supplier - rdf:type owl:DatatypeProperty ; - rdfs:label "has supplier"^^xs:string ; - rdfs:domain aas:DataSpecificationPhysicalUnit ; - rdfs:range xs:string ; - rdfs:comment "Supplier"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationPhysicalUnit/unitName - rdf:type owl:DatatypeProperty ; - rdfs:label "has unit name"^^xs:string ; - rdfs:domain aas:DataSpecificationPhysicalUnit ; - rdfs:range xs:string ; - rdfs:comment "Name of the physical unit"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataSpecificationPhysicalUnit/unitSymbol - rdf:type owl:DatatypeProperty ; - rdfs:label "has unit symbol"^^xs:string ; - rdfs:domain aas:DataSpecificationPhysicalUnit ; - rdfs:range xs:string ; - rdfs:comment "Symbol for the physical unit"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd -aas:DataTypeDefXsd rdf:type owl:Class ; - rdfs:label "Data Type Def Xsd"^^xs:string ; - rdfs:comment "Enumeration listing all xsd anySimpleTypes"@en ; - owl:oneOf ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ) ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/AnyUri - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Any Uri"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/Base64Binary - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Base 64 Binary"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/Boolean - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Boolean"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/Byte - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Byte"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/Date - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Date"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/DateTime - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Date Time"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/DateTimeStamp - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Date Time Stamp"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/DayTimeDuration - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Day Time Duration"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/Decimal - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Decimal"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/Double - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Double"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/Duration - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Duration"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/Float - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Float"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/GDay - rdf:type aas:DataTypeDefXsd ; - rdfs:label "G Day"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/GMonth - rdf:type aas:DataTypeDefXsd ; - rdfs:label "G Month"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/GMonthDay - rdf:type aas:DataTypeDefXsd ; - rdfs:label "G Month Day"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/GYear - rdf:type aas:DataTypeDefXsd ; - rdfs:label "G Year"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/GYearMonth - rdf:type aas:DataTypeDefXsd ; - rdfs:label "G Year Month"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/HexBinary - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Hex Binary"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/Int - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Int"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/Integer - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Integer"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/Long - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Long"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/NegativeInteger - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Negative Integer"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/NonNegativeInteger - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Non Negative Integer"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/NonPositiveInteger - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Non Positive Integer"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/PositiveInteger - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Positive Integer"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/Short - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Short"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/String - rdf:type aas:DataTypeDefXsd ; - rdfs:label "String"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/Time - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Time"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/UnsignedByte - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Unsigned Byte"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/UnsignedInt - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Unsigned Int"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/UnsignedLong - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Unsigned Long"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/UnsignedShort - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Unsigned Short"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeDefXsd/YearMonthDuration - rdf:type aas:DataTypeDefXsd ; - rdfs:label "Year Month Duration"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360 -aas:DataTypeIEC61360 rdf:type owl:Class ; - rdfs:label "Data Type IEC 61360"^^xs:string ; - owl:oneOf ( - - - - - - - - - - - - - - - - - - - - ) ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/Blob - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "Blob"^^xs:string ; - rdfs:comment "values containing the content of a file. Values may be binaries."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/Boolean - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "Boolean"^^xs:string ; - rdfs:comment "values representing truth of logic or Boolean algebra (TRUE, FALSE)"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/Date - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "Date"^^xs:string ; - rdfs:comment "values containing a calendar date, conformant to ISO 8601:2004 Format yyyy-mm-dd Example from IEC 61360-1:2017: \"1999-05-31\" is the [DATE] representation of: \"31 May 1999\"."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/File - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "File"^^xs:string ; - rdfs:comment "values containing an address to a file. The values are of type URI and can represent an absolute or relative path."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/Html - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "Html"^^xs:string ; - rdfs:comment "Values containing string with any sequence of characters, using the syntax of HTML5 (see W3C Recommendation 28:2014)"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/IntegerCount - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "Integer Count"^^xs:string ; - rdfs:comment "values containing values of type INTEGER but are no currencies or measures"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/IntegerCurrency - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "Integer Currency"^^xs:string ; - rdfs:comment "values containing values of type INTEGER that are currencies"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/IntegerMeasure - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "Integer Measure"^^xs:string ; - rdfs:comment "values containing values that are measure of type INTEGER. In addition such a value comes with a physical unit."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/Irdi - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "IRDI"^^xs:string ; - rdfs:comment "values conforming to ISO/IEC 11179 series global identifier sequences"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/Iri - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "IRI"^^xs:string ; - rdfs:comment "values containing values of type STRING conformant to Rfc 3987"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/Rational - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "Rational"^^xs:string ; - rdfs:comment "values containing values of type rational"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/RationalMeasure - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "Rational Measure"^^xs:string ; - rdfs:comment "values containing values of type rational. In addition such a value comes with a physical unit."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/RealCount - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "Real Count"^^xs:string ; - rdfs:comment "values containing numbers that can be written as a terminating or non-terminating decimal; a rational or irrational number but are no currencies or measures"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/RealCurrency - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "Real Currency"^^xs:string ; - rdfs:comment "values containing values of type REAL that are currencies"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/RealMeasure - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "Real Measure"^^xs:string ; - rdfs:comment "values containing values that are measures of type REAL. In addition such a value comes with a physical unit."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/String - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "String"^^xs:string ; - rdfs:comment "values consisting of sequence of characters but cannot be translated into other languages"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/StringTranslatable - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "String Translatable"^^xs:string ; - rdfs:comment "values containing string but shall be represented as different string in different languages"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/Time - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "Time"^^xs:string ; - rdfs:comment "values containing a time, conformant to ISO 8601:2004 but restricted to what is allowed in the corresponding type in xml."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/DataTypeIEC61360/Timestamp - rdf:type aas:DataTypeIEC61360 ; - rdfs:label "Timestamp"^^xs:string ; - rdfs:comment "values containing a time, conformant to ISO 8601:2004 but restricted to what is allowed in the corresponding type in xml."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Direction -aas:Direction rdf:type owl:Class ; - rdfs:label "Direction"^^xs:string ; - rdfs:comment "Direction"@en ; - owl:oneOf ( - - - ) ; -. - -### https://admin-shell.io/aas/3/0/RC02/Direction/Input - rdf:type aas:Direction ; - rdfs:label "Input"^^xs:string ; - rdfs:comment "Input direction."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Direction/Output - rdf:type aas:Direction ; - rdfs:label "Output"^^xs:string ; - rdfs:comment "Output direction"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/EmbeddedDataSpecification -aas:EmbeddedDataSpecification rdf:type owl:Class ; - rdfs:label "Embedded Data Specification"^^xs:string ; - rdfs:comment "Embed the content of a data specification."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/EmbeddedDataSpecification/dataSpecification - rdf:type owl:ObjectProperty ; - rdfs:label "has data specification"^^xs:string ; - rdfs:domain aas:EmbeddedDataSpecification ; - rdfs:range aas:Reference ; - rdfs:comment "Reference to the data specification"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/EmbeddedDataSpecification/dataSpecificationContent - rdf:type owl:ObjectProperty ; - rdfs:label "has data specification content"^^xs:string ; - rdfs:domain aas:EmbeddedDataSpecification ; - rdfs:range aas:DataSpecificationContent ; - rdfs:comment "Actual content of the data specification"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Entity -aas:Entity rdf:type owl:Class ; - rdfs:subClassOf aas:SubmodelElement ; - rdfs:label "Entity"^^xs:string ; - rdfs:comment "An entity is a submodel element that is used to model entities."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Entity/entityType - rdf:type owl:ObjectProperty ; - rdfs:label "has entity type"^^xs:string ; - rdfs:domain aas:Entity ; - rdfs:range aas:EntityType ; - rdfs:comment "Describes whether the entity is a co-managed entity or a self-managed entity."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Entity/globalAssetId - rdf:type owl:ObjectProperty ; - rdfs:label "has global asset id"^^xs:string ; - rdfs:domain aas:Entity ; - rdfs:range aas:Reference ; - rdfs:comment "Global identifier of the asset the entity is representing."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Entity/specificAssetId - rdf:type owl:ObjectProperty ; - rdfs:label "has specific asset id"^^xs:string ; - rdfs:domain aas:Entity ; - rdfs:range aas:SpecificAssetId ; - rdfs:comment "Reference to a specific asset ID representing a supplementary identifier of the asset represented by the Asset Administration Shell."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Entity/statements - rdf:type owl:ObjectProperty ; - rdfs:label "has statements"^^xs:string ; - rdfs:domain aas:Entity ; - rdfs:range aas:SubmodelElement ; - rdfs:comment "Describes statements applicable to the entity by a set of submodel elements, typically with a qualified value."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/EntityType -aas:EntityType rdf:type owl:Class ; - rdfs:label "Entity Type"^^xs:string ; - rdfs:comment "Enumeration for denoting whether an entity is a self-managed entity or a co-managed entity."@en ; - owl:oneOf ( - - - ) ; -. - -### https://admin-shell.io/aas/3/0/RC02/EntityType/CoManagedEntity - rdf:type aas:EntityType ; - rdfs:label "Co Managed Entity"^^xs:string ; - rdfs:comment "For co-managed entities there is no separate AAS. Co-managed entities need to be part of a self-managed entity."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/EntityType/SelfManagedEntity - rdf:type aas:EntityType ; - rdfs:label "Self Managed Entity"^^xs:string ; - rdfs:comment "Self-Managed Entities have their own AAS but can be part of the bill of material of a composite self-managed entity."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Environment -aas:Environment rdf:type owl:Class ; - rdfs:label "Environment"^^xs:string ; - rdfs:comment "Container for the sets of different identifiables."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Environment/assetAdministrationShells - rdf:type owl:ObjectProperty ; - rdfs:label "has asset administration shells"^^xs:string ; - rdfs:domain aas:Environment ; - rdfs:range aas:AssetAdministrationShell ; - rdfs:comment "Asset administration shell"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Environment/conceptDescriptions - rdf:type owl:ObjectProperty ; - rdfs:label "has concept descriptions"^^xs:string ; - rdfs:domain aas:Environment ; - rdfs:range aas:ConceptDescription ; - rdfs:comment "Concept description"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Environment/submodels - rdf:type owl:ObjectProperty ; - rdfs:label "has submodels"^^xs:string ; - rdfs:domain aas:Environment ; - rdfs:range aas:Submodel ; - rdfs:comment "Submodel"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/EventElement -aas:EventElement rdf:type owl:Class ; - rdfs:subClassOf aas:SubmodelElement ; - rdfs:label "Event Element"^^xs:string ; - rdfs:comment "An event element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/EventPayload -aas:EventPayload rdf:type owl:Class ; - rdfs:label "Event Payload"^^xs:string ; - rdfs:comment "Defines the necessary information of an event instance sent out or received."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/EventPayload/observableReference - rdf:type owl:ObjectProperty ; - rdfs:label "has observable reference"^^xs:string ; - rdfs:domain aas:EventPayload ; - rdfs:range aas:Reference ; - rdfs:comment "Reference to the referable, which defines the scope of the event."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/EventPayload/observableSemanticId - rdf:type owl:ObjectProperty ; - rdfs:label "has observable semantic id"^^xs:string ; - rdfs:domain aas:EventPayload ; - rdfs:range aas:Reference ; - rdfs:comment "'semanticId' of the referable which defines the scope of the event, if available."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/EventPayload/payload - rdf:type owl:DatatypeProperty ; - rdfs:label "has payload"^^xs:string ; - rdfs:domain aas:EventPayload ; - rdfs:range xs:string ; - rdfs:comment "Event specific payload."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/EventPayload/source - rdf:type owl:ObjectProperty ; - rdfs:label "has source"^^xs:string ; - rdfs:domain aas:EventPayload ; - rdfs:range aas:Reference ; - rdfs:comment "Reference to the source event element, including identification of 'AssetAdministrationShell', 'Submodel', 'SubmodelElement''s."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/EventPayload/sourceSemanticId - rdf:type owl:ObjectProperty ; - rdfs:label "has source semantic id"^^xs:string ; - rdfs:domain aas:EventPayload ; - rdfs:range aas:Reference ; - rdfs:comment "'semanticId' of the source event element, if available"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/EventPayload/subjectId - rdf:type owl:ObjectProperty ; - rdfs:label "has subject id"^^xs:string ; - rdfs:domain aas:EventPayload ; - rdfs:range aas:Reference ; - rdfs:comment "Subject, who/which initiated the creation."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/EventPayload/timeStamp - rdf:type owl:DatatypeProperty ; - rdfs:label "has time stamp"^^xs:string ; - rdfs:domain aas:EventPayload ; - rdfs:range xs:string ; - rdfs:comment "Timestamp in UTC, when this event was triggered."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/EventPayload/topic - rdf:type owl:DatatypeProperty ; - rdfs:label "has topic"^^xs:string ; - rdfs:domain aas:EventPayload ; - rdfs:range xs:string ; - rdfs:comment "Information for the outer message infrastructure for scheduling the event to the respective communication channel."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Extension -aas:Extension rdf:type owl:Class ; - rdfs:subClassOf aas:HasSemantics ; - rdfs:label "Extension"^^xs:string ; - rdfs:comment "Single extension of an element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Extension/name - rdf:type owl:DatatypeProperty ; - rdfs:label "has name"^^xs:string ; - rdfs:domain aas:Extension ; - rdfs:range xs:string ; - rdfs:comment "Name of the extension."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Extension/refersTo - rdf:type owl:ObjectProperty ; - rdfs:label "has refers to"^^xs:string ; - rdfs:domain aas:Extension ; - rdfs:range aas:Reference ; - rdfs:comment "Reference to an element the extension refers to."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Extension/value - rdf:type owl:DatatypeProperty ; - rdfs:label "has value"^^xs:string ; - rdfs:domain aas:Extension ; - rdfs:range xs:string ; - rdfs:comment "Value of the extension"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Extension/valueType - rdf:type owl:ObjectProperty ; - rdfs:label "has value type"^^xs:string ; - rdfs:domain aas:Extension ; - rdfs:range aas:DataTypeDefXsd ; - rdfs:comment "Type of the value of the extension."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/File -aas:File rdf:type owl:Class ; - rdfs:subClassOf aas:DataElement ; - rdfs:label "File"^^xs:string ; - rdfs:comment "A File is a data element that represents an address to a file (a locator)."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/File/contentType - rdf:type owl:DatatypeProperty ; - rdfs:label "has content type"^^xs:string ; - rdfs:domain aas:File ; - rdfs:range xs:string ; - rdfs:comment "Content type of the content of the file."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/File/value - rdf:type owl:DatatypeProperty ; - rdfs:label "has value"^^xs:string ; - rdfs:domain aas:File ; - rdfs:range xs:string ; - rdfs:comment "Path and name of the referenced file (with file extension)."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/HasDataSpecification -aas:HasDataSpecification rdf:type owl:Class ; - rdfs:label "Has Data Specification"^^xs:string ; - rdfs:comment "Element that can be extended by using data specification templates."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/HasDataSpecification/embeddedDataSpecifications - rdf:type owl:ObjectProperty ; - rdfs:label "has embedded data specifications"^^xs:string ; - rdfs:domain aas:HasDataSpecification ; - rdfs:range aas:EmbeddedDataSpecification ; - rdfs:comment "Embedded data specification."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/HasExtensions -aas:HasExtensions rdf:type owl:Class ; - rdfs:label "Has Extensions"^^xs:string ; - rdfs:comment "Element that can be extended by proprietary extensions."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/HasExtensions/extensions - rdf:type owl:ObjectProperty ; - rdfs:label "has extensions"^^xs:string ; - rdfs:domain aas:HasExtensions ; - rdfs:range aas:Extension ; - rdfs:comment "An extension of the element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/HasKind -aas:HasKind rdf:type owl:Class ; - rdfs:label "Has Kind"^^xs:string ; - rdfs:comment "An element with a kind is an element that can either represent a template or an instance."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/HasKind/kind - rdf:type owl:ObjectProperty ; - rdfs:label "has kind"^^xs:string ; - rdfs:domain aas:HasKind ; - rdfs:range aas:ModelingKind ; - rdfs:comment "Kind of the element: either type or instance."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/HasSemantics -aas:HasSemantics rdf:type owl:Class ; - rdfs:label "Has Semantics"^^xs:string ; - rdfs:comment "Element that can have a semantic definition plus some supplemental semantic definitions."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/HasSemantics/semanticId - rdf:type owl:ObjectProperty ; - rdfs:label "has semantic id"^^xs:string ; - rdfs:domain aas:HasSemantics ; - rdfs:range aas:Reference ; - rdfs:comment "Identifier of the semantic definition of the element. It is called semantic ID of the element or also main semantic ID of the element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/HasSemantics/supplementalSemanticIds - rdf:type owl:ObjectProperty ; - rdfs:label "has supplemental semantic ids"^^xs:string ; - rdfs:domain aas:HasSemantics ; - rdfs:range aas:Reference ; - rdfs:comment "Identifier of a supplemental semantic definition of the element. It is called supplemental semantic ID of the element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Identifiable -aas:Identifiable rdf:type owl:Class ; - rdfs:subClassOf aas:Referable ; - rdfs:label "Identifiable"^^xs:string ; - rdfs:comment "An element that has a globally unique identifier."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Identifiable/administration - rdf:type owl:ObjectProperty ; - rdfs:label "has administration"^^xs:string ; - rdfs:domain aas:Identifiable ; - rdfs:range aas:AdministrativeInformation ; - rdfs:comment "Administrative information of an identifiable element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Identifiable/id - rdf:type owl:DatatypeProperty ; - rdfs:label "has id"^^xs:string ; - rdfs:domain aas:Identifiable ; - rdfs:range xs:string ; - rdfs:comment "The globally unique identification of the element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Key -aas:Key rdf:type owl:Class ; - rdfs:label "Key"^^xs:string ; - rdfs:comment "A key is a reference to an element by its ID."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Key/type - rdf:type owl:ObjectProperty ; - rdfs:label "has type"^^xs:string ; - rdfs:domain aas:Key ; - rdfs:range aas:KeyTypes ; - rdfs:comment "Denotes which kind of entity is referenced."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Key/value - rdf:type owl:DatatypeProperty ; - rdfs:label "has value"^^xs:string ; - rdfs:domain aas:Key ; - rdfs:range xs:string ; - rdfs:comment "The key value, for example an IRDI or an URI"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes -aas:KeyTypes rdf:type owl:Class ; - rdfs:label "Key Types"^^xs:string ; - rdfs:comment "Enumeration of different key value types within a key."@en ; - owl:oneOf ( - - - - - - - - - - - - - - - - - - - - - - - - - ) ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/AnnotatedRelationshipElement - rdf:type aas:KeyTypes ; - rdfs:label "Annotated Relationship Element"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/AssetAdministrationShell - rdf:type aas:KeyTypes ; - rdfs:label "Asset Administration Shell"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/BasicEventElement - rdf:type aas:KeyTypes ; - rdfs:label "Basic Event Element"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/Blob - rdf:type aas:KeyTypes ; - rdfs:label "Blob"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/Capability - rdf:type aas:KeyTypes ; - rdfs:label "Capability"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/ConceptDescription - rdf:type aas:KeyTypes ; - rdfs:label "Concept Description"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/DataElement - rdf:type aas:KeyTypes ; - rdfs:label "Data Element"^^xs:string ; - rdfs:comment "Data element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/Entity - rdf:type aas:KeyTypes ; - rdfs:label "Entity"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/EventElement - rdf:type aas:KeyTypes ; - rdfs:label "Event Element"^^xs:string ; - rdfs:comment "Event."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/File - rdf:type aas:KeyTypes ; - rdfs:label "File"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/FragmentReference - rdf:type aas:KeyTypes ; - rdfs:label "Fragment Reference"^^xs:string ; - rdfs:comment "Bookmark or a similar local identifier of a subordinate part of a primary resource"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/GlobalReference - rdf:type aas:KeyTypes ; - rdfs:label "Global Reference"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/Identifiable - rdf:type aas:KeyTypes ; - rdfs:label "Identifiable"^^xs:string ; - rdfs:comment "Identifiable."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/MultiLanguageProperty - rdf:type aas:KeyTypes ; - rdfs:label "Multi Language Property"^^xs:string ; - rdfs:comment "Property with a value that can be provided in multiple languages"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/Operation - rdf:type aas:KeyTypes ; - rdfs:label "Operation"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/Property - rdf:type aas:KeyTypes ; - rdfs:label "Property"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/Range - rdf:type aas:KeyTypes ; - rdfs:label "Range"^^xs:string ; - rdfs:comment "Range with min and max"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/Referable - rdf:type aas:KeyTypes ; - rdfs:label "Referable"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/ReferenceElement - rdf:type aas:KeyTypes ; - rdfs:label "Reference Element"^^xs:string ; - rdfs:comment "Reference"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/RelationshipElement - rdf:type aas:KeyTypes ; - rdfs:label "Relationship Element"^^xs:string ; - rdfs:comment "Relationship"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/Submodel - rdf:type aas:KeyTypes ; - rdfs:label "Submodel"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/SubmodelElement - rdf:type aas:KeyTypes ; - rdfs:label "Submodel Element"^^xs:string ; - rdfs:comment "Submodel Element"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/SubmodelElementCollection - rdf:type aas:KeyTypes ; - rdfs:label "Submodel Element Collection"^^xs:string ; - rdfs:comment "Struct of Submodel Elements"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/KeyTypes/SubmodelElementList - rdf:type aas:KeyTypes ; - rdfs:label "Submodel Element List"^^xs:string ; - rdfs:comment "List of Submodel Elements"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/LevelType -aas:LevelType rdf:type owl:Class ; - rdfs:label "Level Type"^^xs:string ; - owl:oneOf ( - - - - - ) ; -. - -### https://admin-shell.io/aas/3/0/RC02/LevelType/Max - rdf:type aas:LevelType ; - rdfs:label "Max"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/LevelType/Min - rdf:type aas:LevelType ; - rdfs:label "Min"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/LevelType/Nom - rdf:type aas:LevelType ; - rdfs:label "Nom"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/LevelType/Typ - rdf:type aas:LevelType ; - rdfs:label "Typ"^^xs:string ; -. - -### https://admin-shell.io/aas/3/0/RC02/ModelingKind -aas:ModelingKind rdf:type owl:Class ; - rdfs:label "Modeling Kind"^^xs:string ; - rdfs:comment "Enumeration for denoting whether an element is a template or an instance."@en ; - owl:oneOf ( - - - ) ; -. - -### https://admin-shell.io/aas/3/0/RC02/ModelingKind/Instance - rdf:type aas:ModelingKind ; - rdfs:label "Instance"^^xs:string ; - rdfs:comment "Concrete, clearly identifiable component of a certain template."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/ModelingKind/Template - rdf:type aas:ModelingKind ; - rdfs:label "Template"^^xs:string ; - rdfs:comment "Software element which specifies the common attributes shared by all instances of the template."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/MultiLanguageProperty -aas:MultiLanguageProperty rdf:type owl:Class ; - rdfs:subClassOf aas:DataElement ; - rdfs:label "Multi Language Property"^^xs:string ; - rdfs:comment "A property is a data element that has a multi-language value."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/MultiLanguageProperty/value - rdf:type owl:ObjectProperty ; - rdfs:label "has value"^^xs:string ; - rdfs:domain aas:MultiLanguageProperty ; - rdfs:range rdf:langString ; - rdfs:comment "The value of the property instance."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/MultiLanguageProperty/valueId - rdf:type owl:ObjectProperty ; - rdfs:label "has value id"^^xs:string ; - rdfs:domain aas:MultiLanguageProperty ; - rdfs:range aas:Reference ; - rdfs:comment "Reference to the global unique ID of a coded value."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Operation -aas:Operation rdf:type owl:Class ; - rdfs:subClassOf aas:SubmodelElement ; - rdfs:label "Operation"^^xs:string ; - rdfs:comment "An operation is a submodel element with input and output variables."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Operation/inoutputVariables - rdf:type owl:ObjectProperty ; - rdfs:label "has inoutput variables"^^xs:string ; - rdfs:domain aas:Operation ; - rdfs:range aas:OperationVariable ; - rdfs:comment "Parameter that is input and output of the operation."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Operation/inputVariables - rdf:type owl:ObjectProperty ; - rdfs:label "has input variables"^^xs:string ; - rdfs:domain aas:Operation ; - rdfs:range aas:OperationVariable ; - rdfs:comment "Input parameter of the operation."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Operation/outputVariables - rdf:type owl:ObjectProperty ; - rdfs:label "has output variables"^^xs:string ; - rdfs:domain aas:Operation ; - rdfs:range aas:OperationVariable ; - rdfs:comment "Output parameter of the operation."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/OperationVariable -aas:OperationVariable rdf:type owl:Class ; - rdfs:label "Operation Variable"^^xs:string ; - rdfs:comment "The value of an operation variable is a submodel element that is used as input and/or output variable of an operation."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/OperationVariable/value - rdf:type owl:ObjectProperty ; - rdfs:label "has value"^^xs:string ; - rdfs:domain aas:OperationVariable ; - rdfs:range aas:SubmodelElement ; - rdfs:comment "Describes an argument or result of an operation via a submodel element"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Property -aas:Property rdf:type owl:Class ; - rdfs:subClassOf aas:DataElement ; - rdfs:label "Property"^^xs:string ; - rdfs:comment "A property is a data element that has a single value."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Property/value - rdf:type owl:DatatypeProperty ; - rdfs:label "has value"^^xs:string ; - rdfs:domain aas:Property ; - rdfs:range xs:string ; - rdfs:comment "The value of the property instance."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Property/valueId - rdf:type owl:ObjectProperty ; - rdfs:label "has value id"^^xs:string ; - rdfs:domain aas:Property ; - rdfs:range aas:Reference ; - rdfs:comment "Reference to the global unique ID of a coded value."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Property/valueType - rdf:type owl:ObjectProperty ; - rdfs:label "has value type"^^xs:string ; - rdfs:domain aas:Property ; - rdfs:range aas:DataTypeDefXsd ; - rdfs:comment "Data type of the value"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Qualifiable -aas:Qualifiable rdf:type owl:Class ; - rdfs:label "Qualifiable"^^xs:string ; - rdfs:comment "The value of a qualifiable element may be further qualified by one or more qualifiers."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Qualifiable/qualifiers - rdf:type owl:ObjectProperty ; - rdfs:label "has qualifiers"^^xs:string ; - rdfs:domain aas:Qualifiable ; - rdfs:range aas:Qualifier ; - rdfs:comment "Additional qualification of a qualifiable element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Qualifier -aas:Qualifier rdf:type owl:Class ; - rdfs:subClassOf aas:HasSemantics ; - rdfs:label "Qualifier"^^xs:string ; - rdfs:comment "A qualifier is a type-value-pair that makes additional statements w.r.t. the value of the element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Qualifier/kind - rdf:type owl:ObjectProperty ; - rdfs:label "has kind"^^xs:string ; - rdfs:domain aas:Qualifier ; - rdfs:range aas:QualifierKind ; - rdfs:comment "The qualifier kind describes the kind of the qualifier that is applied to the element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Qualifier/type - rdf:type owl:DatatypeProperty ; - rdfs:label "has type"^^xs:string ; - rdfs:domain aas:Qualifier ; - rdfs:range xs:string ; - rdfs:comment "The qualifier type describes the type of the qualifier that is applied to the element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Qualifier/value - rdf:type owl:DatatypeProperty ; - rdfs:label "has value"^^xs:string ; - rdfs:domain aas:Qualifier ; - rdfs:range xs:string ; - rdfs:comment "The qualifier value is the value of the qualifier."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Qualifier/valueId - rdf:type owl:ObjectProperty ; - rdfs:label "has value id"^^xs:string ; - rdfs:domain aas:Qualifier ; - rdfs:range aas:Reference ; - rdfs:comment "Reference to the global unique ID of a coded value."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Qualifier/valueType - rdf:type owl:ObjectProperty ; - rdfs:label "has value type"^^xs:string ; - rdfs:domain aas:Qualifier ; - rdfs:range aas:DataTypeDefXsd ; - rdfs:comment "Data type of the qualifier value."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/QualifierKind -aas:QualifierKind rdf:type owl:Class ; - rdfs:label "Qualifier Kind"^^xs:string ; - rdfs:comment "Enumeration for kinds of qualifiers."@en ; - owl:oneOf ( - - - - ) ; -. - -### https://admin-shell.io/aas/3/0/RC02/QualifierKind/ConceptQualifier - rdf:type aas:QualifierKind ; - rdfs:label "Concept Qualifier"^^xs:string ; - rdfs:comment "qualifies the semantic definition the element is referring to ('semanticId')"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/QualifierKind/TemplateQualifier - rdf:type aas:QualifierKind ; - rdfs:label "Template Qualifier"^^xs:string ; - rdfs:comment "qualifies the elements within a specific submodel on concept level."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/QualifierKind/ValueQualifier - rdf:type aas:QualifierKind ; - rdfs:label "Value Qualifier"^^xs:string ; - rdfs:comment "qualifies the value of the element and can change during run-time."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Range -aas:Range rdf:type owl:Class ; - rdfs:subClassOf aas:DataElement ; - rdfs:label "Range"^^xs:string ; - rdfs:comment "A range data element is a data element that defines a range with min and max."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Range/max - rdf:type owl:DatatypeProperty ; - rdfs:label "has max"^^xs:string ; - rdfs:domain aas:Range ; - rdfs:range xs:string ; - rdfs:comment "The maximum value of the range."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Range/min - rdf:type owl:DatatypeProperty ; - rdfs:label "has min"^^xs:string ; - rdfs:domain aas:Range ; - rdfs:range xs:string ; - rdfs:comment "The minimum value of the range."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Range/valueType - rdf:type owl:ObjectProperty ; - rdfs:label "has value type"^^xs:string ; - rdfs:domain aas:Range ; - rdfs:range aas:DataTypeDefXsd ; - rdfs:comment "Data type of the min und max"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Referable -aas:Referable rdf:type owl:Class ; - rdfs:subClassOf aas:HasExtensions ; - rdfs:label "Referable"^^xs:string ; - rdfs:comment "An element that is referable by its 'idShort'."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Referable/category - rdf:type owl:DatatypeProperty ; - rdfs:label "has category"^^xs:string ; - rdfs:domain aas:Referable ; - rdfs:range xs:string ; - rdfs:comment "The category is a value that gives further meta information w.r.t. to the class of the element. It affects the expected existence of attributes and the applicability of constraints."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Referable/checksum - rdf:type owl:DatatypeProperty ; - rdfs:label "has checksum"^^xs:string ; - rdfs:domain aas:Referable ; - rdfs:range xs:string ; - rdfs:comment "Checksum to be used to determine if an Referable (including its aggregated child elements) has changed."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Referable/description - rdf:type owl:ObjectProperty ; - rdfs:label "has description"^^xs:string ; - rdfs:domain aas:Referable ; - rdfs:range rdf:langString ; - rdfs:comment "Description or comments on the element."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Referable/displayName - rdf:type owl:ObjectProperty ; - rdfs:label "has display name"^^xs:string ; - rdfs:domain aas:Referable ; - rdfs:range rdf:langString ; - rdfs:comment "Display name. Can be provided in several languages."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Referable/idShort - rdf:type owl:DatatypeProperty ; - rdfs:label "has id short"^^xs:string ; - rdfs:domain aas:Referable ; - rdfs:range xs:string ; - rdfs:comment "In case of identifiables this attribute is a short name of the element. In case of referable this ID is an identifying string of the element within its name space."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Reference -aas:Reference rdf:type owl:Class ; - rdfs:label "Reference"^^xs:string ; - rdfs:comment "Reference to either a model element of the same or another AAS or to an external entity."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Reference/keys - rdf:type owl:ObjectProperty ; - rdfs:label "has keys"^^xs:string ; - rdfs:domain aas:Reference ; - rdfs:range aas:Key ; - rdfs:comment "Unique references in their name space."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Reference/referredSemanticId - rdf:type owl:ObjectProperty ; - rdfs:label "has referred semantic id"^^xs:string ; - rdfs:domain aas:Reference ; - rdfs:range aas:Reference ; - rdfs:comment "'semanticId' of the referenced model element ('type' = 'ModelReference')."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Reference/type - rdf:type owl:ObjectProperty ; - rdfs:label "has type"^^xs:string ; - rdfs:domain aas:Reference ; - rdfs:range aas:ReferenceTypes ; - rdfs:comment "Type of the reference."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/ReferenceElement -aas:ReferenceElement rdf:type owl:Class ; - rdfs:subClassOf aas:DataElement ; - rdfs:label "Reference Element"^^xs:string ; - rdfs:comment "A reference element is a data element that defines a logical reference to another element within the same or another AAS or a reference to an external object or entity."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/ReferenceElement/value - rdf:type owl:ObjectProperty ; - rdfs:label "has value"^^xs:string ; - rdfs:domain aas:ReferenceElement ; - rdfs:range aas:Reference ; - rdfs:comment "Global reference to an external object or entity or a logical reference to another element within the same or another AAS (i.e. a model reference to a Referable)."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/ReferenceTypes -aas:ReferenceTypes rdf:type owl:Class ; - rdfs:label "Reference Types"^^xs:string ; - rdfs:comment "ReferenceTypes"@en ; - owl:oneOf ( - - - ) ; -. - -### https://admin-shell.io/aas/3/0/RC02/ReferenceTypes/GlobalReference - rdf:type aas:ReferenceTypes ; - rdfs:label "Global Reference"^^xs:string ; - rdfs:comment "GlobalReference."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/ReferenceTypes/ModelReference - rdf:type aas:ReferenceTypes ; - rdfs:label "Model Reference"^^xs:string ; - rdfs:comment "ModelReference"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/RelationshipElement -aas:RelationshipElement rdf:type owl:Class ; - rdfs:subClassOf aas:SubmodelElement ; - rdfs:label "Relationship Element"^^xs:string ; - rdfs:comment "A relationship element is used to define a relationship between two elements being either referable (model reference) or external (global reference)."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/RelationshipElement/first - rdf:type owl:ObjectProperty ; - rdfs:label "has first"^^xs:string ; - rdfs:domain aas:RelationshipElement ; - rdfs:range aas:Reference ; - rdfs:comment "Reference to the first element in the relationship taking the role of the subject."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/RelationshipElement/second - rdf:type owl:ObjectProperty ; - rdfs:label "has second"^^xs:string ; - rdfs:domain aas:RelationshipElement ; - rdfs:range aas:Reference ; - rdfs:comment "Reference to the second element in the relationship taking the role of the object."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Resource -aas:Resource rdf:type owl:Class ; - rdfs:label "Resource"^^xs:string ; - rdfs:comment "Resource represents an address to a file (a locator). The value is an URI that can represent an absolute or relative path"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Resource/contentType - rdf:type owl:DatatypeProperty ; - rdfs:label "has content type"^^xs:string ; - rdfs:domain aas:Resource ; - rdfs:range xs:string ; - rdfs:comment "Content type of the content of the file."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Resource/path - rdf:type owl:DatatypeProperty ; - rdfs:label "has path"^^xs:string ; - rdfs:domain aas:Resource ; - rdfs:range xs:string ; - rdfs:comment "Path and name of the resource (with file extension)."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/SpecificAssetId -aas:SpecificAssetId rdf:type owl:Class ; - rdfs:subClassOf aas:HasSemantics ; - rdfs:label "Specific Asset Id"^^xs:string ; - rdfs:comment "A specific asset ID describes a generic supplementary identifying attribute of the asset."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/SpecificAssetId/externalSubjectId - rdf:type owl:ObjectProperty ; - rdfs:label "has external subject id"^^xs:string ; - rdfs:domain aas:SpecificAssetId ; - rdfs:range aas:Reference ; - rdfs:comment "The (external) subject the key belongs to or has meaning to."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/SpecificAssetId/name - rdf:type owl:DatatypeProperty ; - rdfs:label "has name"^^xs:string ; - rdfs:domain aas:SpecificAssetId ; - rdfs:range xs:string ; - rdfs:comment "Name of the identifier"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/SpecificAssetId/value - rdf:type owl:DatatypeProperty ; - rdfs:label "has value"^^xs:string ; - rdfs:domain aas:SpecificAssetId ; - rdfs:range xs:string ; - rdfs:comment "The value of the specific asset identifier with the corresponding name."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/StateOfEvent -aas:StateOfEvent rdf:type owl:Class ; - rdfs:label "State Of Event"^^xs:string ; - rdfs:comment "State of an event"@en ; - owl:oneOf ( - - - ) ; -. - -### https://admin-shell.io/aas/3/0/RC02/StateOfEvent/Off - rdf:type aas:StateOfEvent ; - rdfs:label "Off"^^xs:string ; - rdfs:comment "Event is off."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/StateOfEvent/On - rdf:type aas:StateOfEvent ; - rdfs:label "On"^^xs:string ; - rdfs:comment "Event is on"@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Submodel -aas:Submodel rdf:type owl:Class ; - rdfs:subClassOf aas:Identifiable ; - rdfs:subClassOf aas:HasKind ; - rdfs:subClassOf aas:HasSemantics ; - rdfs:subClassOf aas:Qualifiable ; - rdfs:subClassOf aas:HasDataSpecification ; - rdfs:label "Submodel"^^xs:string ; - rdfs:comment "A submodel defines a specific aspect of the asset represented by the AAS."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/Submodel/submodelElements - rdf:type owl:ObjectProperty ; - rdfs:label "has submodel elements"^^xs:string ; - rdfs:domain aas:Submodel ; - rdfs:range aas:SubmodelElement ; - rdfs:comment "A submodel consists of zero or more submodel elements."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/SubmodelElement -aas:SubmodelElement rdf:type owl:Class ; - rdfs:subClassOf aas:Referable ; - rdfs:subClassOf aas:HasKind ; - rdfs:subClassOf aas:HasSemantics ; - rdfs:subClassOf aas:Qualifiable ; - rdfs:subClassOf aas:HasDataSpecification ; - rdfs:label "Submodel Element"^^xs:string ; - rdfs:comment "A submodel element is an element suitable for the description and differentiation of assets."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/SubmodelElementCollection -aas:SubmodelElementCollection rdf:type owl:Class ; - rdfs:subClassOf aas:SubmodelElement ; - rdfs:label "Submodel Element Collection"^^xs:string ; - rdfs:comment "A submodel element collection is a kind of struct, i.e. a a logical encapsulation of multiple named values. It has a fixed number of submodel elements."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/SubmodelElementCollection/value - rdf:type owl:ObjectProperty ; - rdfs:label "has value"^^xs:string ; - rdfs:domain aas:SubmodelElementCollection ; - rdfs:range aas:SubmodelElement ; - rdfs:comment "Submodel element contained in the collection."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/SubmodelElementList -aas:SubmodelElementList rdf:type owl:Class ; - rdfs:subClassOf aas:SubmodelElement ; - rdfs:label "Submodel Element List"^^xs:string ; - rdfs:comment "A submodel element list is an ordered list of submodel elements."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/SubmodelElementList/orderRelevant - rdf:type owl:DatatypeProperty ; - rdfs:label "has order relevant"^^xs:string ; - rdfs:domain aas:SubmodelElementList ; - rdfs:range xs:boolean ; - rdfs:comment "Defines whether order in list is relevant. If 'orderRelevant' = False then the list is representing a set or a bag."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/SubmodelElementList/semanticIdListElement - rdf:type owl:ObjectProperty ; - rdfs:label "has semantic id list element"^^xs:string ; - rdfs:domain aas:SubmodelElementList ; - rdfs:range aas:Reference ; - rdfs:comment "Semantic ID the submodel elements contained in the list match to."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/SubmodelElementList/typeValueListElement - rdf:type owl:ObjectProperty ; - rdfs:label "has type value list element"^^xs:string ; - rdfs:domain aas:SubmodelElementList ; - rdfs:range aas:AasSubmodelElements ; - rdfs:comment "The submodel element type of the submodel elements contained in the list."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/SubmodelElementList/value - rdf:type owl:ObjectProperty ; - rdfs:label "has value"^^xs:string ; - rdfs:domain aas:SubmodelElementList ; - rdfs:range aas:SubmodelElement ; - rdfs:comment "Submodel element contained in the list."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/SubmodelElementList/valueTypeListElement - rdf:type owl:ObjectProperty ; - rdfs:label "has value type list element"^^xs:string ; - rdfs:domain aas:SubmodelElementList ; - rdfs:range aas:DataTypeDefXsd ; - rdfs:comment "The value type of the submodel element contained in the list."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/ValueList -aas:ValueList rdf:type owl:Class ; - rdfs:label "Value List"^^xs:string ; - rdfs:comment "A set of value reference pairs."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/ValueList/valueReferencePairs - rdf:type owl:ObjectProperty ; - rdfs:label "has value reference pairs"^^xs:string ; - rdfs:domain aas:ValueList ; - rdfs:range aas:ValueReferencePair ; - rdfs:comment "A pair of a value together with its global unique id."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/ValueReferencePair -aas:ValueReferencePair rdf:type owl:Class ; - rdfs:label "Value Reference Pair"^^xs:string ; - rdfs:comment "A value reference pair within a value list. Each value has a global unique id defining its semantic."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/ValueReferencePair/value - rdf:type owl:DatatypeProperty ; - rdfs:label "has value"^^xs:string ; - rdfs:domain aas:ValueReferencePair ; - rdfs:range xs:string ; - rdfs:comment "The value of the referenced concept definition of the value in valueId."@en ; -. - -### https://admin-shell.io/aas/3/0/RC02/ValueReferencePair/valueId - rdf:type owl:ObjectProperty ; - rdfs:label "has value id"^^xs:string ; - rdfs:domain aas:ValueReferencePair ; - rdfs:range aas:Reference ; - rdfs:comment "Global unique id of the value."@en ; -. diff --git a/validator/src/main/resources/shapes.ttl b/validator/src/main/resources/shapes.ttl deleted file mode 100644 index a1d334182..000000000 --- a/validator/src/main/resources/shapes.ttl +++ /dev/null @@ -1,1258 +0,0 @@ -@prefix aas: . -@prefix owl: . -@prefix rdf: . -@prefix rdfs: . -@prefix sh: . -@prefix xs: . - -# Metadata - a owl:Ontology ; - owl:imports ; - owl:imports sh: ; - sh:declare [ - a sh:PrefixDeclaration ; - sh:namespace "https://admin-shell.io/aas/3/0/RC02/"^^xs:anyURI ; - sh:prefix "aas"^^xs:string ; - ] ; -. - -aas:AdministrativeInformationShape a sh:NodeShape ; - sh:targetClass aas:AdministrativeInformation ; - rdfs:subClassOf aas:HasDataSpecificationShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; -. - -aas:AnnotatedRelationshipElementShape a sh:NodeShape ; - sh:targetClass aas:AnnotatedRelationshipElement ; - rdfs:subClassOf aas:RelationshipElementShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:DataElement ; - sh:minCount 0 ; - ] ; -. - -aas:AssetAdministrationShellShape a sh:NodeShape ; - sh:targetClass aas:AssetAdministrationShell ; - rdfs:subClassOf aas:IdentifiableShape ; - rdfs:subClassOf aas:HasDataSpecificationShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:AssetInformation ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - ] ; -. - -aas:AssetInformationShape a sh:NodeShape ; - sh:targetClass aas:AssetInformation ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:AssetKind ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:SpecificAssetId ; - sh:minCount 0 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Resource ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; -. - -aas:BasicEventElementShape a sh:NodeShape ; - sh:targetClass aas:BasicEventElement ; - rdfs:subClassOf aas:EventElementShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Direction ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:StateOfEvent ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:pattern "^-?(([1-9][0-9][0-9][0-9]+)|(0[0-9][0-9][0-9]))-((0[1-9])|(1[0-2]))-((0[1-9])|([12][0-9])|(3[01]))T(((([01][0-9])|(2[0-3])):[0-5][0-9]:([0-5][0-9])(\\.[0-9]+)?)|24:00:00(\\.0+)?)Z$" ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:pattern "^-?(([1-9][0-9][0-9][0-9]+)|(0[0-9][0-9][0-9]))-((0[1-9])|(1[0-2]))-((0[1-9])|([12][0-9])|(3[01]))T(((([01][0-9])|(2[0-3])):[0-5][0-9]:([0-5][0-9])(\\.[0-9]+)?)|24:00:00(\\.0+)?)Z$" ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:pattern "^-?(([1-9][0-9][0-9][0-9]+)|(0[0-9][0-9][0-9]))-((0[1-9])|(1[0-2]))-((0[1-9])|([12][0-9])|(3[01]))T(((([01][0-9])|(2[0-3])):[0-5][0-9]:([0-5][0-9])(\\.[0-9]+)?)|24:00:00(\\.0+)?)Z$" ; - ] ; -. - -aas:BlobShape a sh:NodeShape ; - sh:targetClass aas:Blob ; - rdfs:subClassOf aas:DataElementShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - # TODO sh:datatype xs:base64Binary ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:pattern "^([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+/([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+([ ]*;[ ]*([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+=(([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+|\"(([ !#-\\[\\]-~]|[\\x80-\\xff])|\\\\([ !-~]|[\\x80-\\xff]))*\"))*$" ; - ] ; -. - -aas:CapabilityShape a sh:NodeShape ; - sh:targetClass aas:Capability ; - rdfs:subClassOf aas:SubmodelElementShape ; -. - -aas:ConceptDescriptionShape a sh:NodeShape ; - sh:targetClass aas:ConceptDescription ; - rdfs:subClassOf aas:IdentifiableShape ; - rdfs:subClassOf aas:HasDataSpecificationShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:defaultValue "PROPERTY" ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; -. - -aas:DataElementShape a sh:NodeShape ; - sh:targetClass aas:DataElement ; - rdfs:subClassOf aas:SubmodelElementShape ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "(DataElementShape): An aas:DataElement is an abstract class. Please use one of the subclasses for the generation of instances."@en ; - sh:prefixes aas: ; - sh:select """ - SELECT ?this ?type - WHERE { - ?this a ?type . - FILTER (?type = aas:DataElement) - } - """ ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:defaultValue "VARIABLE" ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; -. - -aas:DataSpecificationContentShape a sh:NodeShape ; - sh:targetClass aas:DataSpecificationContent ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "(DataSpecificationContentShape): An aas:DataSpecificationContent is an abstract class. Please use one of the subclasses for the generation of instances."@en ; - sh:prefixes aas: ; - sh:select """ - SELECT ?this ?type - WHERE { - ?this a ?type . - FILTER (?type = aas:DataSpecificationContent) - } - """ ; - ] ; -. - -aas:DataSpecificationIEC61360Shape a sh:NodeShape ; - sh:targetClass aas:DataSpecificationIEC61360 ; - rdfs:subClassOf aas:DataSpecificationContentShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype rdf:langString ; - sh:minCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype rdf:langString ; - sh:minCount 0 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:DataTypeIEC61360 ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype rdf:langString ; - sh:minCount 0 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:ValueList ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:LevelType ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; -. - -aas:DataSpecificationPhysicalUnitShape a sh:NodeShape ; - sh:targetClass aas:DataSpecificationPhysicalUnit ; - rdfs:subClassOf aas:DataSpecificationContentShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype rdf:langString ; - sh:minCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; -. - -aas:EmbeddedDataSpecificationShape a sh:NodeShape ; - sh:targetClass aas:EmbeddedDataSpecification ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - # TODO sh:class aas:DataSpecificationContent ; - sh:class aas:DataSpecificationIEC61360 ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; -. - -aas:EntityShape a sh:NodeShape ; - sh:targetClass aas:Entity ; - rdfs:subClassOf aas:SubmodelElementShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:SubmodelElement ; - sh:minCount 0 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:EntityType ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:SpecificAssetId ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; -. - -aas:EnvironmentShape a sh:NodeShape ; - sh:targetClass aas:Environment ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:AssetAdministrationShell ; - sh:minCount 0 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Submodel ; - sh:minCount 0 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:ConceptDescription ; - sh:minCount 0 ; - ] ; -. - -aas:EventElementShape a sh:NodeShape ; - sh:targetClass aas:EventElement ; - rdfs:subClassOf aas:SubmodelElementShape ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "(EventElementShape): An aas:EventElement is an abstract class. Please use one of the subclasses for the generation of instances."@en ; - sh:prefixes aas: ; - sh:select """ - SELECT ?this ?type - WHERE { - ?this a ?type . - FILTER (?type = aas:EventElement) - } - """ ; - ] ; -. - -aas:EventPayloadShape a sh:NodeShape ; - sh:targetClass aas:EventPayload ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:pattern "^-?(([1-9][0-9][0-9][0-9]+)|(0[0-9][0-9][0-9]))-((0[1-9])|(1[0-2]))-((0[1-9])|([12][0-9])|(3[01]))T(((([01][0-9])|(2[0-3])):[0-5][0-9]:([0-5][0-9])(\\.[0-9]+)?)|24:00:00(\\.0+)?)Z$" ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; -. - -aas:ExtensionShape a sh:NodeShape ; - sh:targetClass aas:Extension ; - rdfs:subClassOf aas:HasSemanticsShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:DataTypeDefXsd ; - sh:defaultValue ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; -. - -aas:FileShape a sh:NodeShape ; - sh:targetClass aas:File ; - rdfs:subClassOf aas:DataElementShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:pattern "^file:(//((localhost|(\\[((([0-9A-Fa-f]{1,4}:){6}([0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|::([0-9A-Fa-f]{1,4}:){5}([0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|([0-9A-Fa-f]{1,4})?::([0-9A-Fa-f]{1,4}:){4}([0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|(([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})?::([0-9A-Fa-f]{1,4}:){3}([0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|(([0-9A-Fa-f]{1,4}:){2}[0-9A-Fa-f]{1,4})?::([0-9A-Fa-f]{1,4}:){2}([0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|(([0-9A-Fa-f]{1,4}:){3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:([0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|(([0-9A-Fa-f]{1,4}:){4}[0-9A-Fa-f]{1,4})?::([0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|(([0-9A-Fa-f]{1,4}:){5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(([0-9A-Fa-f]{1,4}:){6}[0-9A-Fa-f]{1,4})?::)|[vV][0-9A-Fa-f]+\\.([a-zA-Z0-9\\-._~]|[!$&'()*+,;=]|:)+)\\]|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])|([a-zA-Z0-9\\-._~]|%[0-9A-Fa-f][0-9A-Fa-f]|[!$&'()*+,;=])*)))?/((([a-zA-Z0-9\\-._~]|%[0-9A-Fa-f][0-9A-Fa-f]|[!$&'()*+,;=]|[:@]))+(/(([a-zA-Z0-9\\-._~]|%[0-9A-Fa-f][0-9A-Fa-f]|[!$&'()*+,;=]|[:@]))*)*)?|/((([a-zA-Z0-9\\-._~]|%[0-9A-Fa-f][0-9A-Fa-f]|[!$&'()*+,;=]|[:@]))+(/(([a-zA-Z0-9\\-._~]|%[0-9A-Fa-f][0-9A-Fa-f]|[!$&'()*+,;=]|[:@]))*)*)?)$" ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:pattern "^([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+/([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+([ ]*;[ ]*([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+=(([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+|\"(([ !#-\\[\\]-~]|[\\x80-\\xff])|\\\\([ !-~]|[\\x80-\\xff]))*\"))*$" ; - ] ; -. - -aas:HasDataSpecificationShape a sh:NodeShape ; - sh:targetClass aas:HasDataSpecification ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "(HasDataSpecificationShape): An aas:HasDataSpecification is an abstract class. Please use one of the subclasses for the generation of instances."@en ; - sh:prefixes aas: ; - sh:select """ - SELECT ?this ?type - WHERE { - ?this a ?type . - FILTER (?type = aas:HasDataSpecification) - } - """ ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:EmbeddedDataSpecification ; - sh:minCount 0 ; - ] ; -. - -aas:HasExtensionsShape a sh:NodeShape ; - sh:targetClass aas:HasExtensions ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "(HasExtensionsShape): An aas:HasExtensions is an abstract class. Please use one of the subclasses for the generation of instances."@en ; - sh:prefixes aas: ; - sh:select """ - SELECT ?this ?type - WHERE { - ?this a ?type . - FILTER (?type = aas:HasExtensions) - } - """ ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Extension ; - sh:minCount 0 ; - ] ; -. - -aas:HasKindShape a sh:NodeShape ; - sh:targetClass aas:HasKind ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "(HasKindShape): An aas:HasKind is an abstract class. Please use one of the subclasses for the generation of instances."@en ; - sh:prefixes aas: ; - sh:select """ - SELECT ?this ?type - WHERE { - ?this a ?type . - FILTER (?type = aas:HasKind) - } - """ ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:ModelingKind ; - sh:defaultValue ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; -. - -aas:HasSemanticsShape a sh:NodeShape ; - sh:targetClass aas:HasSemantics ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "(HasSemanticsShape): An aas:HasSemantics is an abstract class. Please use one of the subclasses for the generation of instances."@en ; - sh:prefixes aas: ; - sh:select """ - SELECT ?this ?type - WHERE { - ?this a ?type . - FILTER (?type = aas:HasSemantics) - } - """ ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - ] ; -. - -aas:IdentifiableShape a sh:NodeShape ; - sh:targetClass aas:Identifiable ; - rdfs:subClassOf aas:ReferableShape ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "(IdentifiableShape): An aas:Identifiable is an abstract class. Please use one of the subclasses for the generation of instances."@en ; - sh:prefixes aas: ; - sh:select """ - SELECT ?this ?type - WHERE { - ?this a ?type . - FILTER (?type = aas:Identifiable) - } - """ ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:AdministrativeInformation ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; -. - -aas:KeyShape a sh:NodeShape ; - sh:targetClass aas:Key ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:KeyTypes ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; -. - -aas:MultiLanguagePropertyShape a sh:NodeShape ; - sh:targetClass aas:MultiLanguageProperty ; - rdfs:subClassOf aas:DataElementShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype rdf:langString ; - sh:minCount 0 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; -. - -aas:OperationShape a sh:NodeShape ; - sh:targetClass aas:Operation ; - rdfs:subClassOf aas:SubmodelElementShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:OperationVariable ; - sh:minCount 0 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:OperationVariable ; - sh:minCount 0 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:OperationVariable ; - sh:minCount 0 ; - ] ; -. - -aas:OperationVariableShape a sh:NodeShape ; - sh:targetClass aas:OperationVariable ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:SubmodelElement ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; -. - -aas:PropertyShape a sh:NodeShape ; - sh:targetClass aas:Property ; - rdfs:subClassOf aas:DataElementShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:DataTypeDefXsd ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; -. - -aas:QualifiableShape a sh:NodeShape ; - sh:targetClass aas:Qualifiable ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "(QualifiableShape): An aas:Qualifiable is an abstract class. Please use one of the subclasses for the generation of instances."@en ; - sh:prefixes aas: ; - sh:select """ - SELECT ?this ?type - WHERE { - ?this a ?type . - FILTER (?type = aas:Qualifiable) - } - """ ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Qualifier ; - sh:minCount 0 ; - ] ; -. - -aas:QualifierShape a sh:NodeShape ; - sh:targetClass aas:Qualifier ; - rdfs:subClassOf aas:HasSemanticsShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:QualifierKind ; - sh:defaultValue ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:DataTypeDefXsd ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; -. - -aas:RangeShape a sh:NodeShape ; - sh:targetClass aas:Range ; - rdfs:subClassOf aas:DataElementShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:DataTypeDefXsd ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; -. - -aas:ReferableShape a sh:NodeShape ; - sh:targetClass aas:Referable ; - rdfs:subClassOf aas:HasExtensionsShape ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "(ReferableShape): An aas:Referable is an abstract class. Please use one of the subclasses for the generation of instances."@en ; - sh:prefixes aas: ; - sh:select """ - SELECT ?this ?type - WHERE { - ?this a ?type . - FILTER (?type = aas:Referable) - } - """ ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:maxLength 128 ; - sh:pattern "^[a-zA-Z][a-zA-Z0-9_]+$" ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype rdf:langString ; - sh:minCount 0 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype rdf:langString ; - sh:minCount 0 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; -. - -aas:ReferenceShape a sh:NodeShape ; - sh:targetClass aas:Reference ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:ReferenceTypes ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Key ; - sh:minCount 1 ; - ] ; -. - -aas:ReferenceElementShape a sh:NodeShape ; - sh:targetClass aas:ReferenceElement ; - rdfs:subClassOf aas:DataElementShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; -. - -aas:RelationshipElementShape a sh:NodeShape ; - sh:targetClass aas:RelationshipElement ; - rdfs:subClassOf aas:SubmodelElementShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; -. - -aas:ResourceShape a sh:NodeShape ; - sh:targetClass aas:Resource ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:pattern "^file:(//((localhost|(\\[((([0-9A-Fa-f]{1,4}:){6}([0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|::([0-9A-Fa-f]{1,4}:){5}([0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|([0-9A-Fa-f]{1,4})?::([0-9A-Fa-f]{1,4}:){4}([0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|(([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})?::([0-9A-Fa-f]{1,4}:){3}([0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|(([0-9A-Fa-f]{1,4}:){2}[0-9A-Fa-f]{1,4})?::([0-9A-Fa-f]{1,4}:){2}([0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|(([0-9A-Fa-f]{1,4}:){3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:([0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|(([0-9A-Fa-f]{1,4}:){4}[0-9A-Fa-f]{1,4})?::([0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))|(([0-9A-Fa-f]{1,4}:){5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(([0-9A-Fa-f]{1,4}:){6}[0-9A-Fa-f]{1,4})?::)|[vV][0-9A-Fa-f]+\\.([a-zA-Z0-9\\-._~]|[!$&'()*+,;=]|:)+)\\]|([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])|([a-zA-Z0-9\\-._~]|%[0-9A-Fa-f][0-9A-Fa-f]|[!$&'()*+,;=])*)))?/((([a-zA-Z0-9\\-._~]|%[0-9A-Fa-f][0-9A-Fa-f]|[!$&'()*+,;=]|[:@]))+(/(([a-zA-Z0-9\\-._~]|%[0-9A-Fa-f][0-9A-Fa-f]|[!$&'()*+,;=]|[:@]))*)*)?|/((([a-zA-Z0-9\\-._~]|%[0-9A-Fa-f][0-9A-Fa-f]|[!$&'()*+,;=]|[:@]))+(/(([a-zA-Z0-9\\-._~]|%[0-9A-Fa-f][0-9A-Fa-f]|[!$&'()*+,;=]|[:@]))*)*)?)$" ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 0 ; - sh:maxCount 1 ; - sh:minLength 1 ; - sh:pattern "^([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+/([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+([ ]*;[ ]*([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+=(([!#$%&'*+\\-.^_`|~0-9a-zA-Z])+|\"(([ !#-\\[\\]-~]|[\\x80-\\xff])|\\\\([ !-~]|[\\x80-\\xff]))*\"))*$" ; - ] ; -. - -aas:SpecificAssetIdShape a sh:NodeShape ; - sh:targetClass aas:SpecificAssetId ; - rdfs:subClassOf aas:HasSemanticsShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - sh:minLength 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; -. - -aas:SubmodelShape a sh:NodeShape ; - sh:targetClass aas:Submodel ; - rdfs:subClassOf aas:IdentifiableShape ; - rdfs:subClassOf aas:HasKindShape ; - rdfs:subClassOf aas:HasSemanticsShape ; - rdfs:subClassOf aas:QualifiableShape ; - rdfs:subClassOf aas:HasDataSpecificationShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:SubmodelElement ; - sh:minCount 0 ; - ] ; -. - -aas:SubmodelElementShape a sh:NodeShape ; - sh:targetClass aas:SubmodelElement ; - rdfs:subClassOf aas:ReferableShape ; - rdfs:subClassOf aas:HasKindShape ; - rdfs:subClassOf aas:HasSemanticsShape ; - rdfs:subClassOf aas:QualifiableShape ; - rdfs:subClassOf aas:HasDataSpecificationShape ; - sh:sparql [ - a sh:SPARQLConstraint ; - sh:message "(SubmodelElementShape): An aas:SubmodelElement is an abstract class. Please use one of the subclasses for the generation of instances."@en ; - sh:prefixes aas: ; - sh:select """ - SELECT ?this ?type - WHERE { - ?this a ?type . - FILTER (?type = aas:SubmodelElement) - } - """ ; - ] ; -. - -aas:SubmodelElementCollectionShape a sh:NodeShape ; - sh:targetClass aas:SubmodelElementCollection ; - rdfs:subClassOf aas:SubmodelElementShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:SubmodelElement ; - sh:minCount 0 ; - ] ; -. - -aas:SubmodelElementListShape a sh:NodeShape ; - sh:targetClass aas:SubmodelElementList ; - rdfs:subClassOf aas:SubmodelElementShape ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:boolean ; - sh:defaultValue true ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:SubmodelElement ; - sh:minCount 0 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:AasSubmodelElements ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:DataTypeDefXsd ; - sh:minCount 0 ; - sh:maxCount 1 ; - ] ; -. - -aas:ValueListShape a sh:NodeShape ; - sh:targetClass aas:ValueList ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:ValueReferencePair ; - sh:minCount 1 ; - ] ; -. - -aas:ValueReferencePairShape a sh:NodeShape ; - sh:targetClass aas:ValueReferencePair ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:datatype xs:string ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path ; - sh:class aas:Reference ; - sh:minCount 1 ; - sh:maxCount 1 ; - ] ; -. diff --git a/validator/src/main/resources/test_demo_full_example.json b/validator/src/main/resources/test_demo_full_example.json deleted file mode 100644 index acd73c981..000000000 --- a/validator/src/main/resources/test_demo_full_example.json +++ /dev/null @@ -1,2802 +0,0 @@ - -{ - "assetAdministrationShells": [ - { - "modelType": "AssetAdministrationShell", - "assetInformation": - { - "assetKind": "Instance", - "globalAssetId": - { - "keys": [ - { - "type": "AssetAdministrationShell", - "value": "https://acplt.org/Test_Asset" - } - ], - "type": "GlobalReference" - } - }, - "derivedFrom": - { - "keys": [ - { - "type": "AssetAdministrationShell", - "value": "https://acplt.org/TestAssetAdministrationShell2" - } - ], - "type": "GlobalReference" - }, - "submodels": [ - { - "keys": [ - { - - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel" - } - ], - "type": "GlobalReference" - }, - { - "keys": [ - { - - "type": "Submodel", - "value": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial" - } - ], - "type": "GlobalReference" - }, - { - "keys": [ - { - - "type": "Submodel", - "value": "http://acplt.org/Submodels/Assets/TestAsset/Identification" - } - ], - "type": "GlobalReference" - } - ], - "administration": - { - "revision": "0", - "version": "0.9" - }, - "id": "https://acplt.org/Test_AssetAdministrationShell", - "idShort": "TestAssetAdministrationShell", - "description": [ - { - "language": "en-us", - "text": "An Example Asset Administration Shell for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Verwaltungsschale für eine Test-Anwendung" - } - ] - - }, - { - "modelType": "AssetAdministrationShell", - "assetInformation": - { - "assetKind": "Instance", - "globalAssetId": - { - "keys": [ - { - - "type": "AssetAdministrationShell", - "value": "https://acplt.org/Test_Asset_Mandatory" - } - ], - "type": "GlobalReference" - } - }, - "submodels": [ - { - "keys": [ - { - - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel_Mandatory" - } - ], - "type": "GlobalReference" - }, - { - "keys": [ - { - - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel2_Mandatory" - } - ], - "type": "GlobalReference" - } - ], - "id": "https://acplt.org/Test_AssetAdministrationShell_Mandatory", - "idShort": "Test_AssetAdministrationShell_Mandatory" - }, - { - "modelType": "AssetAdministrationShell", - "assetInformation": - { - "assetKind": "Instance", - "globalAssetId": - { - "keys": [ - { - - "type": "AssetAdministrationShell", - "value": "https://acplt.org/Test_Asset_Mandatory" - } - ], - "type": "GlobalReference" - } - }, - "id": "https://acplt.org/Test_AssetAdministrationShell2_Mandatory", - "idShort": "Test_AssetAdministrationShell2_Mandatory" - }, - { - "modelType": "AssetAdministrationShell", - "assetInformation": - { - "assetKind": "Instance", - "globalAssetId": - { - "keys": [ - { - - "type": "AssetAdministrationShell", - "value": "https://acplt.org/Test_Asset_Missing" - } - ], - "type": "GlobalReference" - } - }, - "submodels": [ - { - "keys": [ - { - - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel_Missing" - } - ], - "type": "GlobalReference" - } - ], - "administration": - { - "revision": "0", - "version": "0.9" - }, - "id": "https://acplt.org/Test_AssetAdministrationShell_Missing", - "idShort": "TestAssetAdministrationShell", - "description": [ - { - "language": "en-us", - "text": "An Example Asset Administration Shell for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Verwaltungsschale für eine Test-Anwendung" - } - ] - - } - ], - "conceptDescriptions": [ - { - "modelType": "ConceptDescription", - "administration": - { - "revision": "0", - "version": "0.9" - }, - "id": "https://acplt.org/Test_ConceptDescription", - "idShort": "TestConceptDescription", - "isCaseOf": [ - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/DataSpecifications/Conceptdescription/TestConceptDescription" - } - ], - "type": "GlobalReference" - } - ], - "description": [ - { - "language": "en-us", - "text": "An example concept description for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-ConceptDescription für eine Test-Anwendung" - } - ] - - }, - { - "modelType": "ConceptDescription", - "id": "https://acplt.org/Test_ConceptDescription_Mandatory", - "idShort": "Test_ConceptDescription_Mandatory" - }, - { - "modelType": "ConceptDescription", - "administration": - { - "revision": "0", - "version": "0.9" - }, - "id": "https://acplt.org/Test_ConceptDescription_Missing", - "idShort": "TestConceptDescription1", - "description": [ - { - "language": "en-us", - "text": "An example concept description for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-ConceptDescription für eine Test-Anwendung" - } - ] - - }, - { - "modelType": "ConceptDescription", - "administration": - { - "revision": "0", - "version": "0.9" - }, - "id": "http://acplt.org/DataSpecifciations/Example/Identification", - "idShort": "TestSpec_01", - "isCaseOf": [ - { - "keys": [ - { - - "type": "GlobalReference", - "value": "http://acplt.org/ReferenceElements/ConceptDescriptionX" - } - ], - "type": "GlobalReference" - } - ], - "embeddedDataSpecifications": - [ - { - "dataSpecification": { - "keys": [ - { - "type": "GlobalReference", - "value": "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360" - } - ], - "type": "GlobalReference" - }, - "dataSpecificationContent": { - "modelType": "DataSpecificationIEC61360", - "dataType": "REAL_MEASURE", - "sourceOfDefinition": "http://acplt.org/DataSpec/ExampleDef", - "symbol": "SU", - "unit": "SpaceUnit", - "unitId": { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Units/SpaceUnit" - } - ], - "type": "GlobalReference" - }, - "value": "TEST", - "valueFormat": "string", - "valueList": { - "valueReferencePairs": [ - { - "value": "http://acplt.org/ValueId/ExampleValueId", - "valueId": { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/ValueId/ExampleValueId" - } - ], - "type": "GlobalReference" - } - }, - { - "value": "http://acplt.org/ValueId/ExampleValueId2", - "valueId": { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/ValueId/ExampleValueId2" - } - ], - "type": "GlobalReference" - } - } - ] - }, - "definition": [ - { - "language": "de", - "text": "Dies ist eine Data Specification für Testzwecke" - }, - { - "language": "en-us", - "text": "This is a DataSpecification for testing purposes" - } - ], - "levelType": "Max", - "preferredName": [ - { - "language": "de", - "text": "Test Specification" - }, - { - "language": "en-us", - "text": "TestSpecification" - } - ], - "shortName": [ - { - "language": "de", - "text": "Test Spec" - }, - { - "language": "en-us", - "text": "TestSpec" - } - ] - } - } - ] - } - ], - "submodels": [ - { - "modelType": "Submodel", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "Submodel", - "value": "http://acplt.org/SubmodelTemplates/AssetIdentification" - } - ], - "type": "GlobalReference" - }, - "administration": - { - "revision": "0", - "version": "0.9" - }, - "id": "http://acplt.org/Submodels/Assets/TestAsset/Identification", - "idShort": "Identification", - "submodelElements": [ - { - "modelType": "Property", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "0173-1#02-AAO677#002" - } - ], - "type": "GlobalReference" - }, - "value": "http://acplt.org/ValueId/ACPLT", - "valueId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/ValueId/ACPLT" - } - ], - "type": "GlobalReference" - }, - "valueType": "xs:string", - "qualifiers": [ - { - "type": "http://acplt.org/Qualifier/ExampleQualifier", - "value": "100", - "valueType": "xs:int", - "kind": "ConceptQualifier" - }, - { - "type": "http://acplt.org/Qualifier/ExampleQualifier2", - "value": "50", - "valueType": "xs:int", - "kind": "ConceptQualifier" - } - ], - "idShort": "ManufacturerName", - "description": [ - { - "language": "en-us", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ] - - }, - { - "modelType": "Property", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - - "type": "GlobalReference", - "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" - } - ], - "type": "GlobalReference" - }, - "value": "978-8234-234-342", - "valueId": - { - "keys": [ - { - - "type": "GlobalReference", - "value": "978-8234-234-342" - } - ], - "type": "GlobalReference" - }, - "valueType": "xs:string", - "idShort": "InstanceId", - "description": [ - { - "language": "en-us", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ] - - } - ], - "description": [ - { - "language": "en-us", - "text": "An example asset identification submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Identifikations-Submodel für eine Test-Anwendung" - } - ] - - }, - { - "modelType": "Submodel", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - - "type": "Submodel", - "value": "http://acplt.org/SubmodelTemplates/BillOfMaterial" - } - ], - "type": "GlobalReference" - }, - "administration": - { - "version": "0.9" - }, - "id": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial", - "idShort": "BillOfMaterial", - "submodelElements": [ - { - "modelType": "Entity", - "kind": "Instance", - "entityType": "CoManagedEntity", - "statements": [ - { - "modelType": "Property", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - - "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "value": "http://acplt.org/ValueId/ExampleValue2", - "valueId": - { - "keys": [ - { - - "type": "GlobalReference", - "value": "http://acplt.org/ValueId/ExampleValue2" - } - ], - "type": "GlobalReference" - }, - "valueType": "xs:string", - "category": "CONSTANT", - "idShort": "ExampleProperty2", - "description": [ - { - "language": "en-us", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ] - - }, - { - "modelType": "Property", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - - "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "value": "http://acplt.org/ValueId/ExampleValueId", - "valueId": - { - "keys": [ - { - - "type": "GlobalReference", - "value": "http://acplt.org/ValueId/ExampleValueId" - } - ], - "type": "GlobalReference" - }, - "valueType": "xs:string", - "category": "CONSTANT", - "idShort": "ExampleProperty", - "description": [ - { - "language": "en-us", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ] - - } - ], - "semanticId": - { - "keys": [ - { - - "type": "GlobalReference", - "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" - } - ], - "type": "GlobalReference" - }, - "idShort": "ExampleEntity", - "description": [ - { - "language": "en-us", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ] - - }, - { - "modelType": "Entity", - "kind": "Instance", - "entityType": "SelfManagedEntity", - "globalAssetId": - { - "keys": [ - { - - "type": "AssetAdministrationShell", - "value": "https://acplt.org/Test_Asset2" - } - ], - "type": "GlobalReference" - }, - "semanticId": - { - "keys": [ - { - - "type": "GlobalReference", - "value": "http://opcfoundation.org/UA/DI/1.1/DeviceType/Serialnumber" - } - ], - "type": "GlobalReference" - }, - "idShort": "ExampleEntity2", - "description": [ - { - "language": "en-us", - "text": "Legally valid designation of the natural or judicial person which is directly responsible for the design, production, packaging and labeling of a product in respect to its being brought into circulation." - }, - { - "language": "de", - "text": "Bezeichnung für eine natürliche oder juristische Person, die für die Auslegung, Herstellung und Verpackung sowie die Etikettierung eines Produkts im Hinblick auf das 'Inverkehrbringen' im eigenen Namen verantwortlich ist" - } - ] - - } - ], - "description": [ - { - "language": "en-us", - "text": "An example bill of material submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-BillofMaterial-Submodel für eine Test-Anwendung" - } - ] - - }, - { - "modelType": "Submodel", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/SubmodelTemplates/ExampleSubmodel" - } - ], - "type": "GlobalReference" - }, - "administration": - { - "revision": "0", - "version": "0.9" - }, - "id": "https://acplt.org/Test_Submodel", - "idShort": "TestSubmodel", - "submodelElements": [ - { - "modelType": "RelationshipElement", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/RelationshipElements/ExampleRelationshipElement" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleRelationshipElement", - "first": - { - "keys": [ - { - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel" - }, - { - "type": "SubmodelElementCollection", - "value": "ExampleSubmodelCollectionOrdered" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "ModelReference" - }, - "second": - { - "keys": [ - { - "type": "Submodel", - "value": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial" - }, - { - "type": "Entity", - "value": "ExampleEntity" - }, - { - "type": "Property", - "value": "ExampleProperty2" - } - ], - "type": "ModelReference" - }, - "description": [ - { - "language": "en-us", - "text": "Example RelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel RelationshipElement Element" - } - ] - - }, - { - "modelType": "AnnotatedRelationshipElement", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - - "type": "GlobalReference", - "value": "http://acplt.org/RelationshipElements/ExampleAnnotatedRelationshipElement" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleAnnotatedRelationshipElement", - "first": - { - "keys": [ - { - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel" - }, - { - "type": "SubmodelElementCollection", - "value": "ExampleSubmodelCollectionOrdered" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "ModelReference" - }, - "second": - { - "keys": [ - { - "type": "Submodel", - "value": "http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial" - }, - { - "type": "Entity", - "value": "ExampleEntity" - }, - { - "type": "Property", - "value": "ExampleProperty2" - } - ], - "type": "ModelReference" - }, - "annotations": [ - { - "modelType": "Property", - "kind": "Instance", - "kind": "Instance", - "value": "some example annotation", - "valueType": "xs:string", - "category": "PARAMETER", - "idShort": "ExampleProperty3" - } - ], - "description": [ - { - "language": "en-us", - "text": "Example AnnotatedRelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel AnnotatedRelationshipElement Element" - } - ] - - }, - { - "modelType": "Operation", - "kind": "Template", - "semanticId": - { - "keys": [ - { - - "type": "GlobalReference", - "value": "http://acplt.org/Operations/ExampleOperation" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleOperation", - "inoutputVariables": [ - { - "value": - { - "modelType": "Property", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "value": "http://acplt.org/ValueId/ExampleValueId", - "valueId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/ValueId/ExampleValueId" - } - ], - "type": "GlobalReference" - }, - "valueType": "xs:string", - "category": "CONSTANT", - "idShort": "ExampleProperty3", - "description": [ - { - "language": "en-us", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ] - - } - } - ], - "inputVariables": [ - { - "value": - { - "modelType": "Property", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "value": "http://acplt.org/ValueId/ExampleValueId", - "valueId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/ValueId/ExampleValueId" - } - ], - "type": "GlobalReference" - }, - "valueType": "xs:string", - "category": "CONSTANT", - "idShort": "ExampleProperty1", - "description": [ - { - "language": "en-us", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ] - - } - } - ], - "outputVariables": [ - { - "value": - { - "modelType": "Property", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - - "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "value": "http://acplt.org/ValueId/ExampleValueId", - "valueId": - { - "keys": [ - { - - "type": "GlobalReference", - "value": "http://acplt.org/ValueId/ExampleValueId" - } - ], - "type": "GlobalReference" - }, - "valueType": "xs:string", - "category": "CONSTANT", - "idShort": "ExampleProperty2", - "description": [ - { - "language": "en-us", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ] - - } - } - ], - "description": [ - { - "language": "en-us", - "text": "Example Operation object" - }, - { - "language": "de", - "text": "Beispiel Operation Element" - } - ] - - }, - { - "modelType": "Capability", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Capabilities/ExampleCapability" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleCapability", - "description": [ - { - "language": "en-us", - "text": "Example Capability object" - }, - { - "language": "de", - "text": "Beispiel Capability Element" - } - ] - - }, - { - "modelType": "BasicEventElement", - "kind": "Instance", - "observed": - { - "keys": [ - { - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel" - }, - { - "type": "SubmodelElementCollection", - "value": "ExampleSubmodelCollectionOrdered" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Events/ExampleBasicEvent" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleBasicEvent", - "description": [ - { - "language": "en-us", - "text": "Example BasicEvent object" - }, - { - "language": "de", - "text": "Beispiel BasicEvent Element" - } - ], - "direction": "input", - "state": "on" - }, - { - "modelType": "SubmodelElementCollection", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollectionOrdered" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleSubmodelCollectionOrdered", - "description": [ - { - "language": "en-us", - "text": "Example SubmodelElementCollectionOrdered object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollectionOrdered Element" - } - ], - "value": [ - { - "modelType": "Property", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "value": "http://acplt.org/ValueId/ExampleValueId", - "valueId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/ValueId/ExampleValueId" - } - ], - "type": "GlobalReference" - }, - "valueType": "xs:string", - "category": "CONSTANT", - "idShort": "ExampleProperty", - "description": [ - { - "language": "en-us", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ] - - }, - { - "modelType": "MultiLanguageProperty", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/MultiLanguageProperties/ExampleMultiLanguageProperty" - } - ], - "type": "GlobalReference" - }, - "valueId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/ValueId/ExampleMultiLanguageValueId" - } - ], - "type": "GlobalReference" - }, - "category": "CONSTANT", - "idShort": "ExampleMultiLanguageProperty", - "value": [ - { - "language": "en-us", - "text": "Example value of a MultiLanguageProperty element" - }, - { - "language": "de", - "text": "Beispielswert für ein MultiLanguageProperty-Element" - } - ], - "description": [ - { - "language": "en-us", - "text": "Example MultiLanguageProperty object" - }, - { - "language": "de", - "text": "Beispiel MultiLanguageProperty Element" - } - ] - - }, - { - "modelType": "Range", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Ranges/ExampleRange" - } - ], - "type": "GlobalReference" - }, - "max": "100", - "min": "0", - "valueType": "xs:int", - "category": "PARAMETER", - "idShort": "ExampleRange", - "description": [ - { - "language": "en-us", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ] - - } - ] - }, - { - "modelType": "SubmodelElementCollection", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollectionUnordered" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleSubmodelCollectionUnordered", - "description": [ - { - "language": "en-us", - "text": "Example SubmodelElementCollectionUnordered object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollectionUnordered Element" - } - ], - "value": [ - { - "modelType": "Blob", - "kind": "Instance", - "contentType": "application/pdf", - "value": "AQIDBAU=", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Blobs/ExampleBlob" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleBlob", - "description": [ - { - "language": "en-us", - "text": "Example Blob object" - }, - { - "language": "de", - "text": "Beispiel Blob Element" - } - ] - - }, - { - "modelType": "File", - "kind": "Instance", - "contentType": "application/pdf", - "value": "file:///TestFile.pdf", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Files/ExampleFile" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleFile", - "description": [ - { - "language": "en-us", - "text": "Example File object" - }, - { - "language": "de", - "text": "Beispiel File Element" - } - ] - - }, - { - "modelType": "ReferenceElement", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/ReferenceElements/ExampleReferenceElement" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleReferenceElement", - "value": - { - "keys": [ - { - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel" - }, - { - "type": "SubmodelElementCollection", - "value": "ExampleSubmodelCollectionOrdered" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "description": [ - { - "language": "en-us", - "text": "Example Reference Element object" - }, - { - "language": "de", - "text": "Beispiel Reference Element Element" - } - ] - - } - ] - } - ], - "description": [ - { - "language": "en-us", - "text": "An example submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Teilmodell für eine Test-Anwendung" - } - ] - - }, - { - "modelType": "Submodel", - "kind": "Template", - "id": "https://acplt.org/Test_Submodel_Mandatory", - "idShort": "Test_Submodel_Mandatory", - "submodelElements": [ - { - "modelType": "RelationshipElement", - "kind": "Instance", - "idShort": "ExampleRelationshipElement", - "first": - { - "keys": [ - { - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel_Mandatory" - }, - { - "type": "SubmodelElementCollection", - "value": "ExampleSubmodelCollectionOrdered" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "ModelReference" - }, - "second": - { - "keys": [ - { - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel_Mandatory" - }, - { - "type": "SubmodelElementCollection", - "value": "ExampleSubmodelCollectionOrdered" - }, - { - "type": "MultiLanguageProperty", - "value": "ExampleMultiLanguageProperty" - } - ], - "type": "ModelReference" - } - }, - { - "modelType": "AnnotatedRelationshipElement", - "kind": "Instance", - "idShort": "ExampleAnnotatedRelationshipElement", - "first": - { - "keys": [ - { - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel_Mandatory" - }, - { - "type": "SubmodelElementCollection", - "value": "ExampleSubmodelCollectionOrdered" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "ModelReference" - }, - "second": - { - "keys": [ - { - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel_Mandatory" - }, - { - "type": "SubmodelElementCollection", - "value": "ExampleSubmodelCollectionOrdered" - }, - { - "type": "MultiLanguageProperty", - "value": "ExampleMultiLanguageProperty" - } - ], - "type": "ModelReference" - } - }, - { - "modelType": "Operation", - "kind": "Template", - "idShort": "ExampleOperation" - }, - { - "modelType": "Capability", - "kind": "Instance", - "idShort": "ExampleCapability" - }, - { - "modelType": "BasicEventElement", - "kind": "Instance", - "observed": - { - "keys": [ - { - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel_Mandatory" - }, - { - "type": "SubmodelElementCollection", - "value": "ExampleSubmodelCollectionOrdered" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "idShort": "ExampleBasicEvent", - "direction": "output", - "state": "off" - }, - { - "modelType": "SubmodelElementCollection", - "kind": "Instance", - "idShort": "ExampleSubmodelCollectionOrdered", - "value": [ - { - "modelType": "Property", - "kind": "Instance", - "valueType": "xs:string", - "idShort": "ExampleProperty" - }, - { - "modelType": "MultiLanguageProperty", - "kind": "Instance", - "idShort": "ExampleMultiLanguageProperty" - }, - { - "modelType": "Range", - "kind": "Instance", - "valueType": "xs:int", - "idShort": "ExampleRange" - } - ] - }, - { - "modelType": "SubmodelElementCollection", - "kind": "Instance", - "idShort": "ExampleSubmodelCollectionUnordered", - "value": [ - { - "modelType": "Blob", - "kind": "Instance", - "contentType": "application/pdf", - "idShort": "ExampleBlob" - }, - { - "modelType": "File", - "kind": "Instance", - "contentType": "application/pdf", - "idShort": "ExampleFile" - }, - { - "modelType": "ReferenceElement", - "kind": "Instance", - "idShort": "ExampleReferenceElement" - } - ] - }, - { - "modelType": "SubmodelElementCollection", - "kind": "Instance", - "idShort": "ExampleSubmodelCollectionUnordered2" - } - ] - }, - { - "modelType": "Submodel", - "kind": "Instance", - "id": "https://acplt.org/Test_Submodel2_Mandatory", - "idShort": "Test_Submodel2_Mandatory" - }, - { - "modelType": "Submodel", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/SubmodelTemplates/ExampleSubmodel" - } - ], - "type": "GlobalReference" - }, - "administration": - { - "revision": "0", - "version": "0.9" - }, - "id": "https://acplt.org/Test_Submodel_Missing", - "idShort": "TestSubmodel", - "submodelElements": [ - { - "modelType": "RelationshipElement", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/RelationshipElements/ExampleRelationshipElement" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleRelationshipElement", - "first": - { - "keys": [ - { - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel_Missing" - }, - { - "type": "SubmodelElementCollection", - "value": "ExampleSubmodelCollectionOrdered" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "ModelReference" - }, - "second": - { - "keys": [ - { - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel_Missing" - }, - { - "type": "SubmodelElementCollection", - "value": "ExampleSubmodelCollectionOrdered" - }, - { - "type": "MultiLanguageProperty", - "value": "ExampleMultiLanguageProperty" - } - ], - "type": "ModelReference" - }, - "description": [ - { - "language": "en-us", - "text": "Example RelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel RelationshipElement Element" - } - ] - - }, - { - "modelType": "AnnotatedRelationshipElement", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/RelationshipElements/ExampleAnnotatedRelationshipElement" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleAnnotatedRelationshipElement", - "first": - { - "keys": [ - { - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel_Missing" - }, - { - "type": "SubmodelElementCollection", - "value": "ExampleSubmodelCollectionOrdered" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "ModelReference" - }, - "second": - { - "keys": [ - { - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel_Missing" - }, - { - "type": "SubmodelElementCollection", - "value": "ExampleSubmodelCollectionOrdered" - }, - { - "type": "MultiLanguageProperty", - "value": "ExampleMultiLanguageProperty" - } - ], - "type": "ModelReference" - }, - "annotations": [ - { - "modelType": "Property", - "kind": "Instance", - "kind": "Instance", - "value": "some example annotation", - "valueType": "xs:string", - "category": "PARAMETER", - "idShort": "ExampleProperty" - } - ], - "description": [ - { - "language": "en-us", - "text": "Example AnnotatedRelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel AnnotatedRelationshipElement Element" - } - ] - - }, - { - "modelType": "Operation", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Operations/ExampleOperation" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleOperation", - "inoutputVariables": [ - { - "value": - { - "modelType": "Property", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "value": "exampleValue", - "valueType": "xs:string", - "qualifiers": [ - { - "type": "http://acplt.org/Qualifier/ExampleQualifier", - "valueType": "xs:string", - "kind": "ConceptQualifier" - } - ], - "category": "CONSTANT", - "idShort": "ExampleProperty3", - "description": [ - { - "language": "en-us", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ] - - } - } - ], - "inputVariables": [ - { - "value": { - "modelType": "Property", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "value": "exampleValue", - "valueType": "xs:string", - "qualifiers": [ - { - "type": "http://acplt.org/Qualifier/ExampleQualifier", - "valueType": "xs:string", - "kind": "ConceptQualifier" - } - ], - "category": "CONSTANT", - "idShort": "ExampleProperty1", - "description": [ - { - "language": "en-us", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ] - } - } - ], - "outputVariables": [ - { - "value": - { - "modelType": "Property", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "value": "exampleValue", - "valueType": "xs:string", - "qualifiers": [ - { - "type": "http://acplt.org/Qualifier/ExampleQualifier", - "valueType": "xs:string", - "kind": "ConceptQualifier" - } - ], - "category": "CONSTANT", - "idShort": "ExampleProperty2", - "description": [ - { - "language": "en-us", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ] - - } - } - ], - "description": [ - { - "language": "en-us", - "text": "Example Operation object" - }, - { - "language": "de", - "text": "Beispiel Operation Element" - } - ] - - }, - { - "modelType": "Capability", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Capabilities/ExampleCapability" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleCapability", - "description": [ - { - "language": "en-us", - "text": "Example Capability object" - }, - { - "language": "de", - "text": "Beispiel Capability Element" - } - ] - - }, - { - "modelType": "BasicEventElement", - "kind": "Instance", - "observed": - { - "keys": [ - { - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel_Missing" - }, - { - "type": "SubmodelElementCollection", - "value": "ExampleSubmodelCollectionOrdered" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Events/ExampleBasicEvent" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleBasicEvent", - "description": [ - { - "language": "en-us", - "text": "Example BasicEvent object" - }, - { - "language": "de", - "text": "Beispiel BasicEvent Element" - } - ], - "direction": "input", - "state": "on" - }, - { - "modelType": "SubmodelElementCollection", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollectionOrdered" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleSubmodelCollectionOrdered", - "description": [ - { - "language": "en-us", - "text": "Example SubmodelElementCollectionOrdered object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollectionOrdered Element" - } - ], - "value": [ - { - "modelType": "Property", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "value": "exampleValue", - "valueType": "xs:string", - "qualifiers": [ - { - "type": "http://acplt.org/Qualifier/ExampleQualifier", - "valueType": "xs:string", - "kind": "ConceptQualifier" - } - ], - "category": "CONSTANT", - "idShort": "ExampleProperty", - "description": [ - { - "language": "en-us", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ] - - }, - { - "modelType": "MultiLanguageProperty", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - - "type": "GlobalReference", - "value": "http://acplt.org/MultiLanguageProperties/ExampleMultiLanguageProperty" - } - ], - "type": "GlobalReference" - }, - "category": "CONSTANT", - "idShort": "ExampleMultiLanguageProperty", - "value": [ - { - "language": "en-us", - "text": "Example value of a MultiLanguageProperty element" - }, - { - "language": "de", - "text": "Beispielswert für ein MultiLanguageProperty-Element" - } - ], - "description": [ - { - "language": "en-us", - "text": "Example MultiLanguageProperty object" - }, - { - "language": "de", - "text": "Beispiel MultiLanguageProperty Element" - } - ] - - }, - { - "modelType": "Range", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Ranges/ExampleRange" - } - ], - "type": "GlobalReference" - }, - "max": "100", - "min": "0", - "valueType": "xs:int", - "category": "PARAMETER", - "idShort": "ExampleRange", - "description": [ - { - "language": "en-us", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ] - - } - ] - }, - { - "modelType": "SubmodelElementCollection", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollectionUnordered" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleSubmodelCollectionUnordered", - "description": [ - { - "language": "en-us", - "text": "Example SubmodelElementCollectionUnordered object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollectionUnordered Element" - } - ], - "value": [ - { - "modelType": "Blob", - "kind": "Instance", - "contentType": "application/pdf", - "value": "AQIDBAU=", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Blobs/ExampleBlob" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleBlob", - "description": [ - { - "language": "en-us", - "text": "Example Blob object" - }, - { - "language": "de", - "text": "Beispiel Blob Element" - } - ] - - }, - { - "modelType": "File", - "kind": "Instance", - "contentType": "application/pdf", - "value": "file:///TestFile.pdf", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Files/ExampleFile" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleFile", - "description": [ - { - "language": "en-us", - "text": "Example File object" - }, - { - "language": "de", - "text": "Beispiel File Element" - } - ] - - }, - { - "modelType": "ReferenceElement", - "kind": "Instance", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/ReferenceElements/ExampleReferenceElement" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleReferenceElement", - "value": - { - "keys": [ - { - "type": "Submodel", - "value": "https://acplt.org/Test_Submodel_Missing" - }, - { - "type": "SubmodelElementCollection", - "value": "ExampleSubmodelCollectionOrdered" - }, - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "description": [ - { - "language": "en-us", - "text": "Example Reference Element object" - }, - { - "language": "de", - "text": "Beispiel Reference Element Element" - } - ] - - } - ] - } - ], - "description": [ - { - "language": "en-us", - "text": "An example submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Teilmodell für eine Test-Anwendung" - } - ] - - }, - { - "modelType": "Submodel", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/SubmodelTemplates/ExampleSubmodel" - } - ], - "type": "GlobalReference" - }, - "administration": - { - "revision": "0", - "version": "0.9" - }, - "id": "https://acplt.org/Test_Submodel_Template", - "idShort": "TestSubmodel", - "submodelElements": [ - { - "modelType": "RelationshipElement", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/RelationshipElements/ExampleRelationshipElement" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleRelationshipElement", - "first": - { - "keys": [ - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "ModelReference" - }, - "second": - { - "keys": [ - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "ModelReference" - }, - "description": [ - { - "language": "en-us", - "text": "Example RelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel RelationshipElement Element" - } - ] - - }, - { - "modelType": "AnnotatedRelationshipElement", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/RelationshipElements/ExampleAnnotatedRelationshipElement" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleAnnotatedRelationshipElement", - "first": - { - "keys": [ - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "ModelReference" - }, - "second": - { - "keys": [ - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "ModelReference" - }, - "description": [ - { - "language": "en-us", - "text": "Example AnnotatedRelationshipElement object" - }, - { - "language": "de", - "text": "Beispiel AnnotatedRelationshipElement Element" - } - ] - - }, - { - "modelType": "Operation", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Operations/ExampleOperation" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleOperation", - "inoutputVariables": [ - { - "value": - { - "modelType": "Property", - "kind": "Instance", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "valueType": "xs:string", - "category": "CONSTANT", - "idShort": "ExampleProperty", - "description": [ - { - "language": "en-us", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ] - - } - } - ], - "inputVariables": [ - { - "value": - { - "modelType": "Property", - "kind": "Instance", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "valueType": "xs:string", - "category": "CONSTANT", - "idShort": "ExampleProperty", - "description": [ - { - "language": "en-us", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ] - - } - } - ], - "outputVariables": [ - { - "value": - { - "modelType": "Property", - "kind": "Instance", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "valueType": "xs:string", - "category": "CONSTANT", - "idShort": "ExampleProperty", - "description": [ - { - "language": "en-us", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ] - - } - } - ], - "description": [ - { - "language": "en-us", - "text": "Example Operation object" - }, - { - "language": "de", - "text": "Beispiel Operation Element" - } - ] - - }, - { - "modelType": "Capability", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Capabilities/ExampleCapability" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleCapability", - "description": [ - { - "language": "en-us", - "text": "Example Capability object" - }, - { - "language": "de", - "text": "Beispiel Capability Element" - } - ] - - }, - { - "modelType": "BasicEventElement", - "observed": - { - "keys": [ - { - "type": "Property", - "value": "ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Events/ExampleBasicEvent" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleBasicEvent", - "description": [ - { - "language": "en-us", - "text": "Example BasicEvent object" - }, - { - "language": "de", - "text": "Beispiel BasicEvent Element" - } - ], - "direction": "output", - "state": "off" - }, - { - "modelType": "SubmodelElementCollection", - "kind": "Instance", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollectionOrdered" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleSubmodelCollectionOrdered", - "description": [ - { - "language": "en-us", - "text": "Example SubmodelElementCollectionOrdered object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollectionOrdered Element" - } - ], - "value": [ - { - "modelType": "Property", - "kind": "Instance", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Properties/ExampleProperty" - } - ], - "type": "GlobalReference" - }, - "valueType": "xs:string", - "category": "CONSTANT", - "idShort": "ExampleProperty", - "description": [ - { - "language": "en-us", - "text": "Example Property object" - }, - { - "language": "de", - "text": "Beispiel Property Element" - } - ] - - }, - { - "modelType": "MultiLanguageProperty", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/MultiLanguageProperties/ExampleMultiLanguageProperty" - } - ], - "type": "GlobalReference" - }, - "category": "CONSTANT", - "idShort": "ExampleMultiLanguageProperty", - "description": [ - { - "language": "en-us", - "text": "Example MultiLanguageProperty object" - }, - { - "language": "de", - "text": "Beispiel MultiLanguageProperty Element" - } - ] - - }, - { - "modelType": "Range", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Ranges/ExampleRange" - } - ], - "type": "GlobalReference" - }, - "max": "100", - "valueType": "xs:int", - "category": "PARAMETER", - "idShort": "ExampleRange", - "description": [ - { - "language": "en-us", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ] - - }, - { - "modelType": "Range", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Ranges/ExampleRange" - } - ], - "type": "GlobalReference" - }, - "min": "0", - "valueType": "xs:int", - "category": "PARAMETER", - "idShort": "ExampleRange2", - "description": [ - { - "language": "en-us", - "text": "Example Range object" - }, - { - "language": "de", - "text": "Beispiel Range Element" - } - ] - - } - ] - }, - { - "modelType": "SubmodelElementCollection", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollectionUnordered" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleSubmodelCollectionUnordered", - "description": [ - { - "language": "en-us", - "text": "Example SubmodelElementCollectionUnordered object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollectionUnordered Element" - } - ], - "value": [ - { - "modelType": "Blob", - "contentType": "application/pdf", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Blobs/ExampleBlob" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleBlob", - "description": [ - { - "language": "en-us", - "text": "Example Blob object" - }, - { - "language": "de", - "text": "Beispiel Blob Element" - } - ] - - }, - { - "modelType": "File", - "contentType": "application/pdf", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/Files/ExampleFile" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleFile", - "description": [ - { - "language": "en-us", - "text": "Example File object" - }, - { - "language": "de", - "text": "Beispiel File Element" - } - ] - - }, - { - "modelType": "ReferenceElement", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/ReferenceElements/ExampleReferenceElement" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleReferenceElement", - "description": [ - { - "language": "en-us", - "text": "Example Reference Element object" - }, - { - "language": "de", - "text": "Beispiel Reference Element Element" - } - ] - - } - ] - }, - { - "modelType": "SubmodelElementCollection", - "kind": "Template", - "semanticId": - { - "keys": [ - { - "type": "GlobalReference", - "value": "http://acplt.org/SubmodelElementCollections/ExampleSubmodelElementCollectionUnordered" - } - ], - "type": "GlobalReference" - }, - "category": "PARAMETER", - "idShort": "ExampleSubmodelCollectionUnordered2", - "description": [ - { - "language": "en-us", - "text": "Example SubmodelElementCollectionUnordered object" - }, - { - "language": "de", - "text": "Beispiel SubmodelElementCollectionUnordered Element" - } - ] - - } - ], - "description": [ - { - "language": "en-us", - "text": "An example submodel for the test application" - }, - { - "language": "de", - "text": "Ein Beispiel-Teilmodell für eine Test-Anwendung" - } - ] - - } - ] -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/ValidateModelsTest.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/ValidateModelsTest.java deleted file mode 100644 index 6f6f781e8..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/core/ValidateModelsTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.dataformat.core; - -import org.eclipse.digitaltwin.aas4j.v3.model.Environment; -import org.eclipse.digitaltwin.aas4j.v3.model.validator.ShaclValidator; -import org.eclipse.digitaltwin.aas4j.v3.model.validator.ValidationException; -import java.io.IOException; -import org.apache.jena.shacl.ValidationReport; -import org.apache.jena.shacl.lib.ShLib; -import static org.junit.Assert.assertTrue; -import org.junit.BeforeClass; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class ValidateModelsTest { - - private static final Logger log = LoggerFactory.getLogger(ValidateModelsTest.class); - - @BeforeClass - public static void init() { - ShaclValidator.getInstance().initialize(); - } - - @Test - public void validateAASFull() throws ValidationException, IOException { - validate(AASFull.ENVIRONMENT); - } - - @Test - public void validateAASSimple() throws ValidationException, IOException { - validate(AASSimple.ENVIRONMENT); - } - - private void validate(Environment aasEnv) throws ValidationException, IOException { - ValidationReport report = ShaclValidator.getInstance().validateGetReport(aasEnv); - ShLib.printReport(report); - System.out.println("Report entry size: " + report.getEntries().size()); - assertTrue(report.conforms()); - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonFullExampleTest.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonFullExampleTest.java deleted file mode 100644 index b6eed3bd6..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/dataformat/json/JsonFullExampleTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.dataformat.json; - -import org.eclipse.digitaltwin.aas4j.v3.dataformat.DeserializationException; -import org.eclipse.digitaltwin.aas4j.v3.model.validator.ShaclValidator; -import org.eclipse.digitaltwin.aas4j.v3.model.validator.ValidationException; -import org.eclipse.digitaltwin.aas4j.v3.model.validator.ValidatorUtil; -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; - -import static org.junit.Assert.assertTrue; - -public class JsonFullExampleTest { - - private static final Logger log = LoggerFactory.getLogger(JsonFullExampleTest.class); - - - - - - @Test - public void validateFullJson() throws ValidationException, IOException, DeserializationException { - String object = ValidatorUtil.readResourceToString("test_demo_full_example.json"); - - ShaclValidator.getInstance().validate(new JsonDeserializer().read(object)); - } - - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ConstraintTestHelper.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ConstraintTestHelper.java deleted file mode 100644 index 5b56b0c9a..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/ConstraintTestHelper.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import java.util.Arrays; -import java.util.List; - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.*; - -public class ConstraintTestHelper { - - public static ConceptDescription createConceptDescription(String idShort, String identifier, String category) { - return new DefaultConceptDescription.Builder() - .description(Arrays.asList(new DefaultLangString.Builder().text("TestDescription").language("en-us").build())) - .id(identifier) - .category(category).idShort(idShort).build(); - } - - public static Submodel createSubmodel(List elements) { - return new DefaultSubmodel.Builder() - .id("submodel") - .idShort("smIdShort") - .submodelElements(elements) - .build(); - } - - public static ConceptDescription getIrrelevantConceptDescription() { - return ConstraintTestHelper.createConceptDescription("irrelevantIdShort", "irrelevant", "COLLECTION"); - } - - public static AssetAdministrationShell getDummyAAS() { - return new DefaultAssetAdministrationShell.Builder() - .id("dummyAAS") - .idShort("dummyAASIdShort") - .assetInformation(new DefaultAssetInformation.Builder() - .assetKind(AssetKind.INSTANCE) - .build()) - .build(); - } - - public static Environment createEnvironment(Submodel sm, List conceptDescriptions) { - return new DefaultEnvironment.Builder() - .assetAdministrationShells(getDummyAAS()) - .submodels(sm) - .conceptDescriptions(conceptDescriptions) - .build(); - } - - public static Reference createDummyReference() { - return new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value("reference") - .type(KeyTypes.GLOBAL_REFERENCE) - .build()) - .type(ReferenceTypes.GLOBAL_REFERENCE) - .build(); - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASc_006.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASc_006.java deleted file mode 100644 index 1a0f04aab..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASc_006.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -/** - * Tests the following constraint: - *

- * For a ConceptDescription with category DOCUMENT using data specification - * template IEC61360 - * (http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/2/0) - * - DataSpecificationIEC61360/dataType shall be one of the following values: - * STRING or URL. - *

- * - * @author schnicke - * - */ -public class TestAASc_006 { - - // TODO: reactivate after the ConceptDescription have been added correctly - /* - @Test - public void correctDataTypeURL() throws ValidationException, IOException { - ConceptDescription correctURLCD = createConceptDescription(DataTypeIEC61360.URL); - - ShaclValidator.getInstance().validate(correctURLCD); - } - - @Test - public void wrongDataType() { - ConceptDescription wrongCD = createConceptDescription(DataTypeIEC61360.DATE); - - try { - ShaclValidator.getInstance().validate(wrongCD); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "For a ConceptDescription with category DOCUMENT using data specification template IEC61360 (http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/2/0) - DataSpecificationIEC61360/dataType shall be one of the following values: String or URL.")); - } - } - - @Test - public void correctDataTypeString() throws ValidationException { - ConceptDescription correctStringCD = createConceptDescription(DataTypeIEC61360.STRING); - - - ShaclValidator.getInstance().validate(correctStringCD); - } - - private ConceptDescription createConceptDescription(DataTypeIEC61360 dataType) { - ConceptDescription correctURLCD = ConstraintTestHelper.createConceptDescription("idShort1", - "conceptDescriptionURL", "DOCUMENT"); - - DataSpecificationIEC61360 urlDataTypeDS = new DefaultDataSpecificationIEC61360.Builder() - .preferredName(new LangString("ds", "en")).definition(new LangString("some english definition", "EN")) - .dataType(dataType).build(); - - EmbeddedDataSpecification urlDataTypeEDS = new DefaultEmbeddedDataSpecification.Builder() - .dataSpecificationContent(urlDataTypeDS).dataSpecification(new DefaultReference.Builder() - .key(new DefaultKey.Builder().idType(KeyType.CUSTOM).value("foo_key").build()).build()) - .build(); - - correctURLCD.setEmbeddedDataSpecifications(Arrays.asList(urlDataTypeEDS)); - return correctURLCD; - } - */ -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASc_008.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASc_008.java deleted file mode 100644 index d5a07baa7..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASc_008.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.*; -import org.junit.Test; - -import java.util.Arrays; - -/** - * Tests the following constraint: - *

- * For all ConceptDescriptions except for ConceptDescriptions of category - * VALUE using data specification template IEC61360 - * (http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/2/0) - * - DataSpecificationIEC61360/definition is mandatory and shall be defined at - * least in English. - *

- * - * @author schnicke - * - */ -public class TestAASc_008 { - - @Test - public void conceptDescriptionEnglishDefinition() throws ValidationException { - LangString definition = new DefaultLangString.Builder().text("some english definition").language("en").build(); - ConceptDescription cd = createConceptDescription(definition); - - ShaclValidator.getInstance().validate(cd); - } - - @Test - public void conceptDescriptionNoEnglishDefinition() { - LangString definition = new DefaultLangString.Builder().text("deutsch").language("de").build(); - ConceptDescription cd = createConceptDescription(definition); - - try { - ShaclValidator.getInstance().validate(cd); - fail(); - } catch (ValidationException e) { - System.out.println(e.getMessage()); - assertTrue(e.getMessage().endsWith( - "For all ConceptDescriptions except for ConceptDescriptions of category VALUE using data specification template IEC61360 (https://admin-shell.io/aas/3/0/RC02/DataSpecificationIEC61360/definition) - DataSpecificationIEC61360/definition is mandatory and shall be defined at least in English.")); - } - } - - @Test - public void conceptDescriptionValueCategoryGermanDefinition() throws ValidationException { - LangString definition = new DefaultLangString.Builder().text("deutsch").language("de").build(); - ConceptDescription cd = createConceptDescription(definition); - cd.setCategory("VALUE"); - - ShaclValidator.getInstance().validate(cd); - } - - @Test - public void noIEC61360DataSpecification() throws ValidationException { - ConceptDescription description = ConstraintTestHelper.createConceptDescription("testIdShort", "testId", - "PROPERTY"); - - ShaclValidator.getInstance().validate(description); - } - private ConceptDescription createConceptDescription(LangString definition) { - ConceptDescription cd = ConstraintTestHelper.createConceptDescription("idShort1", "id", - "QUALIFIER"); - - DataSpecificationIEC61360 urlDataTypeDS = new DefaultDataSpecificationIEC61360.Builder() - .preferredName(new DefaultLangString.Builder().language("en").text("ds").build()) - .definition(definition) - .definition(new DefaultLangString.Builder().language("de").text("test").build()) - .dataType(DataTypeIEC61360.IRI) - .build(); - - EmbeddedDataSpecification urlDataTypeEDS = new DefaultEmbeddedDataSpecification.Builder() - .dataSpecificationContent(urlDataTypeDS) - .dataSpecification(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value("foo_key") - .type(KeyTypes.GLOBAL_REFERENCE) - .build()) - .type(ReferenceTypes.GLOBAL_REFERENCE) - .build()) - .build(); - - cd.setEmbeddedDataSpecifications(Arrays.asList(urlDataTypeEDS)); - return cd; - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_002.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_002.java deleted file mode 100644 index 91485bfd8..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_002.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import org.eclipse.digitaltwin.aas4j.v3.model.Referable; -import org.junit.Test; - -import java.util.ArrayList; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -/** - * Tests the following constraint: - *

- * idShort of Referables shall only feature letters, digits, underscore ("_"); - * starting mandatory with a letter. I.e. [a-zA-Z][a-zA-Z0-9_]+. - *

- * - * @author bader, chang - * - */ -public class TestAASd_002 { - @Test - public void idShortWithNotAllowedCharacters() throws ValidationException { - Referable wrongReferable = ConstraintTestHelper.createSubmodel(new ArrayList<>()); - wrongReferable.setIdShort("_idShort"); - - try { - ShaclValidator.getInstance().validate(wrongReferable); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith("starting mandatory with a letter. I.e. [a-zA-Z][a-zA-Z0-9_]+.")); - } - - wrongReferable.setIdShort("0idShort"); - try { - ShaclValidator.getInstance().validate(wrongReferable); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith("starting mandatory with a letter. I.e. [a-zA-Z][a-zA-Z0-9_]+.")); - } - - wrongReferable.setIdShort(""); - try { - ShaclValidator.getInstance().validate(wrongReferable); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith("starting mandatory with a letter. I.e. [a-zA-Z][a-zA-Z0-9_]+.")); - } - - wrongReferable.setIdShort("%"); - try { - ShaclValidator.getInstance().validate(wrongReferable); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith("starting mandatory with a letter. I.e. [a-zA-Z][a-zA-Z0-9_]+.")); - } - } - - @Test - public void idShortWithAllowedCharacters() throws ValidationException { - Referable referable = ConstraintTestHelper.createSubmodel(new ArrayList<>()); - referable.setIdShort("id_Short"); - ShaclValidator.getInstance().validate(referable); - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_003.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_003.java deleted file mode 100644 index 684e1405d..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_003.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import org.eclipse.digitaltwin.aas4j.v3.model.Referable; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodel; -import org.junit.Ignore; -import org.junit.Test; - -import java.util.ArrayList; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -/** - * Tests the following constraint: - *

- * idShort shall be matched case-insensitive. - *

- * - * @author bader, chang - * - */ -public class TestAASd_003 { - @Test - @Ignore - public void idShortMatchCaseInsensitive() throws ValidationException { - DefaultSubmodel smA = (DefaultSubmodel) ConstraintTestHelper.createSubmodel(new ArrayList<>()); - smA.setIdShort("idShort"); - - Referable smB = (DefaultSubmodel) ConstraintTestHelper.createSubmodel(new ArrayList<>()); - smB.setIdShort("IDSHORT"); - - assertTrue(smA.equals(smB)); // TODO: should be true but requires adjustments in the Java Model - - } - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_005.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_005.java deleted file mode 100644 index 5de82fc22..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_005.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import org.eclipse.digitaltwin.aas4j.v3.model.AdministrativeInformation; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultAdministrativeInformation; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * A revision requires a version. - *

- * - * @author schnicke, chang - * - */ -public class TestAASd_005 { - @Test - public void revisionWithoutVersion() throws ValidationException { - AdministrativeInformation admInfo = new DefaultAdministrativeInformation.Builder().revision("1").build(); - - try { - ShaclValidator.getInstance().validate(admInfo); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith("A revision requires a version.")); - } - } - - @Test - public void revisionWithVersion() - throws ValidationException { - AdministrativeInformation admInfo = new DefaultAdministrativeInformation.Builder().revision("1").version("1") - .build(); - ShaclValidator.getInstance().validate(admInfo); - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_006.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_006.java deleted file mode 100644 index 1a3373a00..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_006.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; -import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; -import org.eclipse.digitaltwin.aas4j.v3.model.Reference; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultQualifier; -import org.junit.Test; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -/** - * Tests the following constraint: - *

- * If both, the value and the valueId of a Qualifier are present then the value needs to be identical to the value - * of the referenced coded value in Qualifier/valueId. - *

- * - * @author bader, chang - * - */ -public class TestAASd_006 { - @Test - public void missmatchingValueAndValueId() throws ValidationException { - - Reference reference = ConstraintTestHelper.createDummyReference(); - reference.getKeys().get(0).setValue("http://example.org/someRef"); - - Qualifier wrongQualifier = new DefaultQualifier.Builder() - .value("http://example.org") - .valueType(DataTypeDefXsd.STRING) - .valueId(reference) - .type("REFERENCE") - .build(); - - try { - ShaclValidator.getInstance().validate(wrongQualifier); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "If both, the value and the valueId of a Qualifier are present then the value needs to be identical " + - "to the value of the referenced coded value in Qualifier/valueId.")); - } - - - } - - @Test - public void matchingValueAndValueId() throws ValidationException { - Reference reference = ConstraintTestHelper.createDummyReference(); - reference.getKeys().get(0).setValue("http://example.org"); - - Qualifier qualifier = new DefaultQualifier.Builder() - .value("http://example.org") - .valueType(DataTypeDefXsd.STRING) - .valueId(reference) - .type("REFERENCE") - .build(); - - ShaclValidator.getInstance().validate(qualifier); - - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_007.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_007.java deleted file mode 100644 index a137209a2..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_007.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; -import org.eclipse.digitaltwin.aas4j.v3.model.Property; -import org.eclipse.digitaltwin.aas4j.v3.model.Reference; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultProperty; -import org.junit.Test; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -/** - * Tests the following constraint: - *

- * If both, the Property/value and the Property/valueId are present then the value of Property/value needs to be - * identical to the value of the referenced coded value in Property/valueId. - *

- * - * @author bader, chang - * - */ -public class TestAASd_007 { - @Test - public void missmatchingValueAndValueId() throws ValidationException { - - Reference reference = ConstraintTestHelper.createDummyReference(); - reference.getKeys().get(0).setValue("http://example.org/someRef"); - - Property wrongProperty = new DefaultProperty.Builder() - .idShort("idShort") - .value("http://example.org") - .valueType(DataTypeDefXsd.STRING) - .valueId(reference) - .build(); - - try { - ShaclValidator.getInstance().validate(wrongProperty); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "If both, the Property/value and the Property/valueId are present then the value of Property/value " + - "needs to be identical to the value of the referenced coded value in Property/valueId.")); - } - - - } - - @Test - public void matchingValueAndValueId() throws ValidationException { - Reference reference = ConstraintTestHelper.createDummyReference(); - reference.getKeys().get(0).setValue("http://example.org"); - - Property property = new DefaultProperty.Builder() - .idShort("idShort") - .value("http://example.org") - .valueType(DataTypeDefXsd.STRING) - .valueId(reference) - .build(); - - ShaclValidator.getInstance().validate(property); - - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_008.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_008.java deleted file mode 100644 index 3cc969253..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_008.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import org.eclipse.digitaltwin.aas4j.v3.model.ModelingKind; -import org.eclipse.digitaltwin.aas4j.v3.model.Operation; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultOperation; -import org.junit.Test; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -/** - * Tests the following constraint: - *

- * The submodel element value of an operation variable shall be of kind=Template. - *

- * - * @author bader, chang - * - */ -public class TestAASd_008 { - @Test - public void wrongKind() throws ValidationException { - - Operation wrongOperation = new DefaultOperation.Builder() - .idShort("idShort") - .kind(ModelingKind.INSTANCE) - .build(); - - try { - ShaclValidator.getInstance().validate(wrongOperation); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "The submodel element value of an operation variable shall be of kind=Template.")); - } - - - } - - @Test - public void correctKind() throws ValidationException { - - Operation operation = new DefaultOperation.Builder() - .idShort("idShort") - .kind(ModelingKind.TEMPLATE) - .build(); - - ShaclValidator.getInstance().validate(operation); - - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_014.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_014.java deleted file mode 100644 index aacf1cba6..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_014.java +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import org.eclipse.digitaltwin.aas4j.v3.model.Entity; -import org.eclipse.digitaltwin.aas4j.v3.model.EntityType; -import org.eclipse.digitaltwin.aas4j.v3.model.SpecificAssetId; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultEntity; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSpecificAssetId; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * Either the attribute globalAssetId or specificAssetId of an Entity must - * be set if Entity/entityType is set to “SelfManagedEntity”. They are not - * existing otherwise. - *

- * - * @author schnicke, kannoth - * - */ -public class TestAASd_014 { - private static final String ERRORMSG = "Either the attribute globalAssetId or specificAssetId of an Entity must be set if Entity/entityType is set to “SelfManagedEntity”. They are not existing otherwise."; - - @Test - public void selfManagedEntityWithGlobalAssetIdSet() throws ValidationException { - Entity entity = createSelfManagedEntity(); - entity.setGlobalAssetId(ConstraintTestHelper.createDummyReference()); - - ShaclValidator.getInstance().validate(entity); - } - - @Test - public void selfManagedEntityWithSpecificAssetIdSet() throws ValidationException { - Entity entity = createSelfManagedEntity(); - SpecificAssetId idKeyPair = createKeyValuePair(); - entity.setSpecificAssetId(idKeyPair); - - ShaclValidator.getInstance().validate(entity); - } - - @Test - public void selfManagedEntityWithNoAssetIdSet() { - Entity entity = createSelfManagedEntity(); - - try { - ShaclValidator.getInstance().validate(entity); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith(ERRORMSG)); - } - } - - @Test - public void selfManagedEntitiyWithBothAssetIdsSet() { - Entity entity = createSelfManagedEntity(); - SpecificAssetId idKeyPair = createKeyValuePair(); - entity.setSpecificAssetId(idKeyPair); - entity.setGlobalAssetId(ConstraintTestHelper.createDummyReference()); - - try { - ShaclValidator.getInstance().validate(entity); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith(ERRORMSG)); - } - } - - - @Test - public void coManagedEntityWithNoAssetIdSet() throws ValidationException { - Entity entity = createCoManagedEntity(); - - ShaclValidator.getInstance().validate(entity); - } - - @Test - public void coManagedEntityWithSpecificAssetIdSet() { - Entity entity = createCoManagedEntity(); - SpecificAssetId idKeyPair = createKeyValuePair(); - entity.setSpecificAssetId(idKeyPair); - - try { - ShaclValidator.getInstance().validate(entity); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith(ERRORMSG)); - } - } - - @Test - public void coManagedEntityWithGlobalAssetIdSet() { - Entity entity = createCoManagedEntity(); - entity.setGlobalAssetId(ConstraintTestHelper.createDummyReference()); - - try { - ShaclValidator.getInstance().validate(entity); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith(ERRORMSG)); - } - } - - @Test - public void coManagedEntityWithBothAssetIdsSet() { - Entity entity = createCoManagedEntity(); - entity.setGlobalAssetId(ConstraintTestHelper.createDummyReference()); - SpecificAssetId idKeyPair = createKeyValuePair(); - entity.setSpecificAssetId(idKeyPair); - - try { - ShaclValidator.getInstance().validate(entity); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith(ERRORMSG)); - } - } - - private Entity createSelfManagedEntity() { - DefaultEntity entity = new DefaultEntity(); - entity.setIdShort("entityIdShort"); - entity.setEntityType(EntityType.SELF_MANAGED_ENTITY); - return entity; - } - - private Entity createCoManagedEntity() { - DefaultEntity entity = new DefaultEntity(); - entity.setIdShort("entityIdShort"); - entity.setEntityType(EntityType.CO_MANAGED_ENTITY); - return entity; - } - - private SpecificAssetId createKeyValuePair() { - return new DefaultSpecificAssetId.Builder() - .externalSubjectId(ConstraintTestHelper.createDummyReference()) - .value("foo").name("foo_key").build(); - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_015.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_015.java deleted file mode 100644 index 601b04356..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_015.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -/** - * Tests the following constraint: - *

- * The data element SubjectAttributes/subjectAttribute shall be part of the submodel that is referenced within the - * “selectableSubjectAttributes” attribute of “AccessControl” - *

- * - * @author bader, chang - * - * note: As SubjectAttributes are not part of the metamodel anymore, this test does not make sense anymore. - * - */ -public class TestAASd_015 { - -/* - @Test - @Ignore - public void noRelation() throws ValidationException { - - DataElement dataElement = new DefaultProperty.Builder() - .idShort("property") - .build(); - - SubjectAttributes subjectAttributes = new DefaultSubjectAttributes.Builder() - .subjectAttributes(new ArrayList() {{ add(dataElement); }} ) - .build(); - - Reference reference = ConstraintTestHelper.createDummyReference(); - reference.getKeys().get(0).setValue(dataElement.getIdShort()); - reference.getKeys().get(0).setType(KeyTypes.PROPERTY); - - AccessControl wrongAccessControl = new DefaultAccessControl.Builder() - .selectableSubjectAttributes( reference ) - .defaultSubjectAttributes( ConstraintTestHelper.createDummyReference() ) - .defaultPermissions( ConstraintTestHelper.createDummyReference() ) - .build(); - - try { - ShaclValidator.getInstance().validate(wrongAccessControl); - fail(); // TODO: I really have no clue what this constraint shall check... - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "The data element SubjectAttributes/subjectAttribute shall be part of the submodel that is " + - "referenced within the “selectableSubjectAttributes” attribute of “AccessControl”")); - } - - } - - */ - - /* - @Test - @Ignore - public void correctRelation() throws ValidationException { - - DataElement dataElement = new DefaultProperty.Builder() - .idShort("property") - .build(); - - SubjectAttributes subjectAttributes = new DefaultSubjectAttributes.Builder() - .subjectAttributes(new ArrayList() {{ add(dataElement); }} ) - .build(); - - Reference reference = ConstraintTestHelper.createDummyReference(); - reference.getKeys().get(0).setValue(dataElement.getIdShort()); - reference.getKeys().get(0).setType(KeyElements.PROPERTY); - - AccessControl accessControl = new DefaultAccessControl.Builder() - .selectableSubjectAttributes( reference ) - .defaultSubjectAttributes( ConstraintTestHelper.createDummyReference() ) - .defaultPermissions( ConstraintTestHelper.createDummyReference() ) - .build(); - - ShaclValidator.getInstance().validate(accessControl); - } - - */ - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_020.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_020.java deleted file mode 100644 index 97f11220b..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_020.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; -import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultQualifier; -import org.junit.Ignore; -import org.junit.Test; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -/** - * Tests the following constraint: - *

- * The value of Qualifier/value shall be consistent to the data type as defined in Qualifier/valueType. - *

- * - * @author bader, chang - * - */ -public class TestAASd_020 { - @Test - @Ignore("Very hard to validate properly, requires more time.") // TODO - public void wrongIntegerValue() throws ValidationException { - - Qualifier wrongQualifier = new DefaultQualifier.Builder() - .valueType(DataTypeDefXsd.INT) - .value("test") - .type("integer") - .build(); - - try { - ShaclValidator.getInstance().validate(wrongQualifier); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "The value of Qualifier/value shall be consistent to the data type as defined in Qualifier/valueType.")); - } - } - - @Test - @Ignore("Very hard to validate properly, requires more time.") // TODO - public void wrongUriValue() throws ValidationException { - - Qualifier wrongQualifier = new DefaultQualifier.Builder() - .valueType(DataTypeDefXsd.ANY_URI) - .value("1") - .type("integer") - .build(); - - try { - ShaclValidator.getInstance().validate(wrongQualifier); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "The value of Qualifier/value shall be consistent to the data type as defined in Qualifier/valueType.")); - } - } - - - @Test - public void correctString() throws ValidationException { - - Qualifier qualifier = new DefaultQualifier.Builder() - .valueType(DataTypeDefXsd.STRING) - .value("a string") - .type("string") - .build(); - - ShaclValidator.getInstance().validate(qualifier); - - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_021.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_021.java deleted file mode 100644 index 7c95bddf7..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_021.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; -import org.eclipse.digitaltwin.aas4j.v3.model.Qualifiable; -import org.eclipse.digitaltwin.aas4j.v3.model.Qualifier; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultProperty; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultQualifier; -import org.junit.Ignore; -import org.junit.Test; - -import java.util.ArrayList; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -/** - * Tests the following constraint: - *

- * The value of Qualifier/value shall be consistent to the data type as defined in Qualifier/valueType. - *

- * - * @author bader, chang - * - */ -public class TestAASd_021 { - @Test - @Ignore - public void twoQualifierWithSameType() throws ValidationException { - - DefaultQualifier.Builder builder = new DefaultQualifier.Builder(); - Qualifier qualifier1 = builder - .value("some Qualifier value") - .valueType(DataTypeDefXsd.STRING) - .type("string") - .build(); - builder = null; - - builder = new DefaultQualifier.Builder(); - Qualifier qualifier2 = builder - .value("some other Qualifier value") - .valueType(DataTypeDefXsd.STRING) - .type("string") - .build(); - - Qualifiable wrongQualifiable = new DefaultProperty.Builder() - .idShort("wrongQualifiable") - .valueType(DataTypeDefXsd.STRING) - .value("dummy") - .qualifiers(new ArrayList() {{ add(qualifier1); add(qualifier2); }}) - .build(); - - try { - ShaclValidator.getInstance().validate(wrongQualifiable); // SPARQL Query does not fire in the shape for some reason - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "Every Qualifiable can only have one Qualifier with the same Qualifier/type.")); - } - } - - @Ignore // The model only allows strings as Qualifier/valueType --> It is not possible to check for non-strings yet. - @Test - public void twoCorrectQualifier() throws ValidationException { - - Qualifier qualifier1 = new DefaultQualifier.Builder() - .value("some Qualifier value") - .valueType(DataTypeDefXsd.STRING) - .type("string") - .build(); - - Qualifier qualifier2 = new DefaultQualifier.Builder() - .value("1") - .valueType(DataTypeDefXsd.INTEGER) - .type("string") - .build(); - - Qualifiable qualifiable = new DefaultProperty.Builder() - .idShort("correctQualifiable") - .valueType(DataTypeDefXsd.STRING) - .value("dummy") - .qualifiers(new ArrayList() {{ add(qualifier1); add(qualifier2); }}) - .build(); - - ShaclValidator.getInstance().validate(qualifiable); - - } - - @Test - public void oneCorrectQualifier() throws ValidationException { - - Qualifier qualifier1 = new DefaultQualifier.Builder() - .value("some Qualifier value") - .valueType(DataTypeDefXsd.STRING) - .type("string") - .build(); - - Qualifiable qualifiable = new DefaultProperty.Builder() - .idShort("correctQualifiable") - .valueType(DataTypeDefXsd.STRING) - .value("dummy") - .qualifiers(new ArrayList() {{ add(qualifier1); }}) - .build(); - - ShaclValidator.getInstance().validate(qualifiable); - - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_023.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_023.java deleted file mode 100644 index e18e445c1..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_023.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - - -import org.eclipse.digitaltwin.aas4j.v3.model.AssetInformation; -import org.eclipse.digitaltwin.aas4j.v3.model.AssetKind; -import org.eclipse.digitaltwin.aas4j.v3.model.KeyTypes; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultAssetInformation; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; -import org.junit.Ignore; -import org.junit.Test; - -import static org.junit.Assert.*; - -/** - * Tests the following constraint: - *

- * AssetInformation/globalAssetId either is a reference to an Asset object or a global reference. - *

- * - * @author bader, chang - * - */ - -public class TestAASd_023 { -// @Test -// public void correctReferenceToAsset() throws ValidationException, IOException { -// AssetInformation assetInformation = createAssetInformation(KeyTypes.ASSET); -// assertEquals(assetInformation.getGlobalAssetId().getKeys().get(0).getType(), KeyElements.ASSET); -// ShaclValidator.getInstance().validate(assetInformation); -// -// } - -// @Test -// public void correctReferenceToGobalRe() throws ValidationException { -// AssetInformation assetInformation = createAssetInformation(KeyElements.GLOBAL_REFERENCE); -// assertEquals(assetInformation.getGlobalAssetId().getKeys().get(0).getType(), KeyElements.GLOBAL_REFERENCE); -// ShaclValidator.getInstance().validate(assetInformation); -// -// } - - @Ignore - @Test - public void wrongReferenceToCD() throws ValidationException { - AssetInformation assetInformation = createAssetInformation(KeyTypes.CONCEPT_DESCRIPTION); - assertEquals(assetInformation.getGlobalAssetId().getKeys().get(0).getType(), KeyTypes.CONCEPT_DESCRIPTION); - try { - ShaclValidator.getInstance().validate(assetInformation); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith("AssetInformation/globalAssetId either is a reference to an Asset object or a global reference.")); - } - } - - - private AssetInformation createAssetInformation(KeyTypes keyTypes) { - return new DefaultAssetInformation.Builder() - .assetKind(AssetKind.INSTANCE) - .globalAssetId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value("1234") - .type(keyTypes) - .build()) - - .build()) - .build(); - } - -} - - diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_026.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_026.java deleted file mode 100644 index ff770644a..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_026.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import org.eclipse.digitaltwin.aas4j.v3.model.KeyTypes; -import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElement; -import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementCollection; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodelElementCollection; -import org.junit.Test; - -import java.util.*; - -/** - * Tests the following constraint: - *

- * If allowDuplicates==false then it is not allowed that the collection contains several elements with the same semantics (i.e. the same semanticId). - *

- * - * @author bader, chang - * - */ - -public class TestAASd_026 { - - @Test - public void testAllowDuplicates() { - - // TODO @chang: please write the test. - - } - - - private SubmodelElementCollection createSubmodelElementCollection(Collection values) { - return new DefaultSubmodelElementCollection.Builder() - .idShort("idShort") - .value((SubmodelElement) values) - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value("the value of the semantic id") - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .build()) - .build(); - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_051.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_051.java deleted file mode 100644 index 76337b9f9..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_051.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.Arrays; -import java.util.List; - -import org.eclipse.digitaltwin.aas4j.v3.model.ConceptDescription; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * A ConceptDescription shall have one of the following categories: VALUE, - * PROPERTY, REFERENCE, DOCUMENT, CAPABILITY, RELATIONSHIP, COLLECTION, - * FUNCTION, EVENT, ENTITY, APPLICATION_CLASS, QUALIFIER, VIEW. - *

- * - * @author schnicke, kannoth - * - */ -public class TestAASd_051 { - @Test - public void correctCategory() throws ValidationException { - List categories = Arrays.asList("VALUE", "PROPERTY", "REFERENCE", "DOCUMENT", "CAPABILITY", - "RELATIONSHIP", "COLLECTION", "FUNCTION", "EVENT", "ENTITY", "APPLICATION_CLASS", "QUALIFIER", "VIEW"); - - for(String category : categories) { - ConceptDescription cd = ConstraintTestHelper.createConceptDescription("idShort", "identifier", category); - ShaclValidator.getInstance().validate(cd); - } - } - - @Test - public void incorrectCategory() { - ConceptDescription cd = ConstraintTestHelper.createConceptDescription("idShort", "identifier", "WRONG"); - try { - ShaclValidator.getInstance().validate(cd); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "A ConceptDescription shall have one of the following categories: VALUE, PROPERTY, REFERENCE, DOCUMENT, CAPABILITY, RELATIONSHIP, COLLECTION, FUNCTION, EVENT, ENTITY, APPLICATION_CLASS, QUALIFIER, VIEW.")); - } - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_052a.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_052a.java deleted file mode 100644 index 61b109ebd..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_052a.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.Arrays; - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultProperty; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; - -import org.junit.Ignore; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * If the semanticId of a Property references a ConceptDescription then the - * ConceptDescription/category shall be one of following values: VALUE, - * PROPERTY. - *

- * - * @author schnicke - * - */ -@Ignore("Constraint AASd_052a has been removed") -public class TestAASd_052a { - @Test - public void correctCategories() throws ValidationException { - String conceptDescriptionPropertyId = "conceptDescriptionProperty"; - String conceptDescriptionValueId = "conceptDescriptionValue"; - - ConceptDescription correctPropertyCD = ConstraintTestHelper - .createConceptDescription("idShort1", conceptDescriptionPropertyId, "PROPERTY"); - - ConceptDescription correctValueCD = ConstraintTestHelper.createConceptDescription("idShort2", - conceptDescriptionValueId, "VALUE"); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList(createProperty("submodelElementIdShort1", conceptDescriptionValueId), - createProperty("submodelElementIdShort2", conceptDescriptionPropertyId))); - - Environment correctEnv = ConstraintTestHelper.createEnvironment(sm, Arrays.asList(correctValueCD, correctPropertyCD, - ConstraintTestHelper.getIrrelevantConceptDescription())); - - ShaclValidator.getInstance().validate(correctEnv); - } - - @Test - public void wrongCategory() { - String conceptDescriptionWrongId = "conceptDescriptionWrong"; - - ConceptDescription wrongCD = ConstraintTestHelper.createConceptDescription("idShort1", conceptDescriptionWrongId, - "COLLECTION"); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList(createProperty("submodelElementIdShort", conceptDescriptionWrongId))); - - Environment wrongEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(wrongCD, ConstraintTestHelper.getIrrelevantConceptDescription())); - - try { - ShaclValidator.getInstance().validate(wrongEnv); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "If the semanticId of a Property references a ConceptDescription then the ConceptDescription/category shall be one of following values: VALUE, PROPERTY.")); - } - } - - private Property createProperty(String idShort, String conceptDescriptionId) { - return new DefaultProperty.Builder() - .idShort(idShort) - .valueType(DataTypeDefXsd.STRING) - .value("TestValue") - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value(conceptDescriptionId) - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .type(ReferenceTypes.GLOBAL_REFERENCE) - .build()) - .build(); - } - - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_053.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_053.java deleted file mode 100644 index b560168d2..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_053.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.Arrays; - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultRange; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; - -import org.junit.Ignore; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * If the semanticId of a Range submodel element references a - * ConceptDescription then the ConceptDescription/category shall be one of - * following values: PROPERTY. - *

- * - * @author schnicke - * - */ -@Ignore("Constraint AASd_053 has been removed") -public class TestAASd_053 { - @Test - public void correctCategory() throws ValidationException { - String conceptDescriptionId = "conceptDescription"; - - ConceptDescription correctCD = ConstraintTestHelper - .createConceptDescription("idShort1", conceptDescriptionId, "PROPERTY"); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList(createRange("submodelElementIdShort", conceptDescriptionId))); - - Environment correctEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(correctCD, - ConstraintTestHelper.getIrrelevantConceptDescription())); - - ShaclValidator.getInstance().validate(correctEnv); - } - - @Test - public void wrongCategory() { - String conceptDescriptionWrongId = "conceptDescriptionWrong"; - - ConceptDescription wrongCD = ConstraintTestHelper.createConceptDescription("idShort1", conceptDescriptionWrongId, - "COLLECTION"); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList(createRange("submodelElementIdShort", conceptDescriptionWrongId))); - - Environment wrongEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(wrongCD, ConstraintTestHelper.getIrrelevantConceptDescription())); - try { - ShaclValidator.getInstance().validate(wrongEnv); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "If the semanticId of a Range submodel element references a ConceptDescription then the ConceptDescription/category shall be one of following values: PROPERTY.")); - } - } - - private Range createRange(String idShort, String conceptDescriptionId) { - return new DefaultRange.Builder() - .idShort(idShort) - .valueType(DataTypeDefXsd.INT) - .min("0") - .max("1") - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value(conceptDescriptionId) - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .type(ReferenceTypes.GLOBAL_REFERENCE) - .build()) - .build(); - } - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_054.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_054.java deleted file mode 100644 index f50f1c875..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_054.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.Arrays; - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReferenceElement; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * If the semanticId of a ReferenceElement submodel element references a - * ConceptDescription then the ConceptDescription/category shall be one of - * following values: REFERENCE. - *

- * - * @author schnicke - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_054 { - @Test - public void correctCategory() throws ValidationException { - String conceptDescriptionId = "conceptDescription"; - - ConceptDescription correctCD = ConstraintTestHelper.createConceptDescription("idShort1", - conceptDescriptionId, "REFERENCE"); - - Submodel sm = ConstraintTestHelper - .createSubmodel( - Arrays.asList(createReferenceElement("submodelElementIdShort", conceptDescriptionId))); - - Environment correctEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(correctCD, - ConstraintTestHelper.getIrrelevantConceptDescription())); - - ShaclValidator.getInstance().validate(correctEnv); - } - - @Test - public void wrongCategory() { - String conceptDescriptionWrongId = "conceptDescriptionWrong"; - - ConceptDescription wrongCD = ConstraintTestHelper.createConceptDescription("idShort1", - conceptDescriptionWrongId, - "COLLECTION"); - - Submodel sm = ConstraintTestHelper - .createSubmodel( - Arrays.asList(createReferenceElement("submodelElementIdShort", conceptDescriptionWrongId))); - - Environment wrongEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(wrongCD, ConstraintTestHelper.getIrrelevantConceptDescription())); - try { - ShaclValidator.getInstance().validate(wrongEnv); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "If the semanticId of a ReferenceElement submodel element references a ConceptDescription then the ConceptDescription/category shall be one of following values: REFERENCE.")); - } - } - - private ReferenceElement createReferenceElement(String idShort, String conceptDescriptionId) { - return new DefaultReferenceElement.Builder() - .idShort(idShort) - .value(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value("reference") - .type(KeyTypes.GLOBAL_REFERENCE) - .build()) - .type(ReferenceTypes.GLOBAL_REFERENCE) - .build()) - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value(conceptDescriptionId) - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .type(ReferenceTypes.GLOBAL_REFERENCE) - .build()) - .build(); - } - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_055.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_055.java deleted file mode 100644 index f2d4568d2..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_055.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.Arrays; - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.*; - -import org.junit.Ignore; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * If the semanticId of a RelationshipElement or an - * AnnotatedRelationshipElement submodel element references a ConceptDescription - * then the ConceptDescription/category shall be one of following values: - * RELATIONSHIP. - *

- * - * @author schnicke - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_055 { - - private final static String ERRORMSG = "If the semanticId of a RelationshipElement or an AnnotatedRelationshipElement submodel element references a ConceptDescription then the ConceptDescription/category shall be one of following values: RELATIONSHIP."; - - @Test - public void correctCategoryRelationshipElement() throws ValidationException { - String conceptDescriptionId = "conceptDescription"; - - ConceptDescription correctCD = ConstraintTestHelper - .createConceptDescription("idShort1", conceptDescriptionId, "RELATIONSHIP"); - - Submodel sm = ConstraintTestHelper - .createSubmodel( - Arrays.asList(createRelationshipElement("submodelElementIdShort", conceptDescriptionId))); - - Environment correctEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(correctCD, - ConstraintTestHelper.getIrrelevantConceptDescription())); - - ShaclValidator.getInstance().validate(correctEnv); - } - - @Test - public void wrongCategoryRelationshipElement() { - String conceptDescriptionWrongId = "conceptDescriptionWrong"; - - ConceptDescription wrongCD = ConstraintTestHelper.createConceptDescription("idShort1", conceptDescriptionWrongId, - "COLLECTION"); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList(createRelationshipElement("submodelElementIdShort", conceptDescriptionWrongId))); - - Environment wrongEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(wrongCD, ConstraintTestHelper.getIrrelevantConceptDescription())); - try { - ShaclValidator.getInstance().validate(wrongEnv); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith(ERRORMSG)); - } - } - - @Test - public void correctCategoryAnnotatedRelationshipElement() throws ValidationException { - String conceptDescriptionId = "conceptDescriptionProperty"; - - ConceptDescription correctCD = ConstraintTestHelper - .createConceptDescription("idShort1", conceptDescriptionId, "RELATIONSHIP"); - - Submodel sm = ConstraintTestHelper - .createSubmodel( - Arrays.asList(createAnnotatedRelationshipElement("submodelElementIdShort", conceptDescriptionId))); - - Environment correctEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(correctCD, - ConstraintTestHelper.getIrrelevantConceptDescription())); - - ShaclValidator.getInstance().validate(correctEnv); - } - - @Test - public void wrongCategoryAnnotatedRelationshipElement() { - String conceptDescriptionWrongId = "conceptDescriptionWrong"; - - ConceptDescription wrongCD = ConstraintTestHelper.createConceptDescription("idShort1", conceptDescriptionWrongId, - "COLLECTION"); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList(createAnnotatedRelationshipElement("submodelElementIdShort", conceptDescriptionWrongId))); - - Environment wrongEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(wrongCD, ConstraintTestHelper.getIrrelevantConceptDescription())); - try { - ShaclValidator.getInstance().validate(wrongEnv); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith(ERRORMSG)); - } - } - - private RelationshipElement createRelationshipElement(String idShort, String conceptDescriptionId) { - return new DefaultRelationshipElement.Builder() - .idShort(idShort) - .first(ConstraintTestHelper.createDummyReference()) - .second(ConstraintTestHelper.createDummyReference()) - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value(conceptDescriptionId) - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .type(ReferenceTypes.GLOBAL_REFERENCE) - .build()) - .build(); - } - - private AnnotatedRelationshipElement createAnnotatedRelationshipElement(String idShort, String conceptDescriptionId) { - return new DefaultAnnotatedRelationshipElement.Builder() - .idShort(idShort) - .first(ConstraintTestHelper.createDummyReference()) - .second(ConstraintTestHelper.createDummyReference()) - .annotations(new DefaultProperty.Builder() - .idShort("annotationIdShort") - .value("annotation") - .valueType(DataTypeDefXsd.STRING) - .build()) - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value(conceptDescriptionId) - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .type(ReferenceTypes.GLOBAL_REFERENCE) - .build()) - .build(); - } - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_056.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_056.java deleted file mode 100644 index 144bd9a74..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_056.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.Arrays; - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultEntity; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * If the semanticId of a Entity submodel element references a - * ConceptDescription then the ConceptDescription/category shall be one of - * following values: ENTITY. - *

- * - * @author schnicke - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_056 { - @Test - public void correctCategory() throws ValidationException { - String conceptDescriptionId = "conceptDescription"; - - ConceptDescription correctCD = ConstraintTestHelper - .createConceptDescription("idShort1", conceptDescriptionId, "ENTITY"); - - Submodel sm = ConstraintTestHelper - .createSubmodel( - Arrays.asList(createEntity("submodelElementIdShort", conceptDescriptionId))); - - Environment correctEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(correctCD, - ConstraintTestHelper.getIrrelevantConceptDescription())); - - ShaclValidator.getInstance().validate(correctEnv); - } - - @Test - public void wrongCategory() { - String conceptDescriptionWrongId = "conceptDescriptionWrong"; - - ConceptDescription wrongCD = ConstraintTestHelper.createConceptDescription("idShort1", conceptDescriptionWrongId, - "COLLECTION"); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList(createEntity("submodelElementIdShort", conceptDescriptionWrongId))); - - Environment wrongEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(wrongCD, ConstraintTestHelper.getIrrelevantConceptDescription())); - try { - ShaclValidator.getInstance().validate(wrongEnv); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "If the semanticId of a Entity submodel element references a ConceptDescription then the ConceptDescription/category shall be one of following values: ENTITY.")); - } - } - - private Entity createEntity(String idShort, String conceptDescriptionId) { - return new DefaultEntity.Builder() - .idShort(idShort) - .entityType(EntityType.SELF_MANAGED_ENTITY) - .globalAssetId(ConstraintTestHelper.createDummyReference()) - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value(conceptDescriptionId) - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .type(ReferenceTypes.GLOBAL_REFERENCE) - .build()) - .build(); - } - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_057.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_057.java deleted file mode 100644 index 4dc1be4e0..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_057.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.Arrays; - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.junit.Ignore; -import org.junit.Test; - -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultBlob; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultFile; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; - -/** - * Tests the following constraint: - *

- * The semanticId of a File or Blob submodel element shall only reference a - * ConceptDescription with the category DOCUMENT - *

- * - * @author schnicke - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_057 { - - private final static String ERRORMSG = "The semanticId of a File or Blob submodel element shall only reference a ConceptDescription with the category DOCUMENT."; - - @Test - public void correctCategoryFile() throws ValidationException { - String conceptDescriptionId = "conceptDescription"; - - ConceptDescription correctCD = ConstraintTestHelper.createConceptDescription("idShort1", - conceptDescriptionId, "DOCUMENT"); - - Submodel sm = ConstraintTestHelper - .createSubmodel( - Arrays.asList(createFile("submodelElementIdShort", conceptDescriptionId))); - - Environment correctEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(correctCD, - ConstraintTestHelper.getIrrelevantConceptDescription())); - - ShaclValidator.getInstance().validate(correctEnv); - } - - @Test - public void wrongCategoryFile() { - String conceptDescriptionWrong = "conceptDescriptionWrong"; - - ConceptDescription wrongCD = ConstraintTestHelper.createConceptDescription("idShort1", conceptDescriptionWrong, - "COLLECTION"); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList(createFile("submodelElementIdShort", conceptDescriptionWrong))); - - Environment wrongEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(wrongCD, ConstraintTestHelper.getIrrelevantConceptDescription())); - try { - ShaclValidator.getInstance().validate(wrongEnv); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith(ERRORMSG)); - } - } - - @Test - public void correctCategoryBlob() throws ValidationException { - String conceptDescriptionId = "conceptDescription"; - - ConceptDescription correctCD = ConstraintTestHelper - .createConceptDescription("idShort1", conceptDescriptionId, "DOCUMENT"); - - Submodel sm = ConstraintTestHelper - .createSubmodel( - Arrays.asList(createBlob("submodelElementIdShort", conceptDescriptionId))); - - Environment correctEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(correctCD, - ConstraintTestHelper.getIrrelevantConceptDescription())); - - ShaclValidator.getInstance().validate(correctEnv); - } - - @Test - public void wrongCategoryBlob() { - String conceptDescriptionWrongId = "conceptDescriptionWrong"; - - ConceptDescription wrongCD = ConstraintTestHelper.createConceptDescription("idShort1", conceptDescriptionWrongId, - "COLLECTION"); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList(createBlob("submodelElementIdShort", conceptDescriptionWrongId))); - - Environment wrongEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(wrongCD, ConstraintTestHelper.getIrrelevantConceptDescription())); - try { - ShaclValidator.getInstance().validate(wrongEnv); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith(ERRORMSG)); - } - } - - private File createFile(String idShort, String conceptDescriptionId) { - return new DefaultFile.Builder() - .idShort(idShort) - .contentType("application/json").value("file:///test.json") - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value(conceptDescriptionId) - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .type(ReferenceTypes.GLOBAL_REFERENCE) - .build()) - .build(); - } - - private Blob createBlob(String idShort, String conceptDescriptionId) { - return new DefaultBlob.Builder() - .idShort(idShort) - .contentType("application/json") - .value(new byte[] { 0, 1, 2 }) - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value(conceptDescriptionId) - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .type(ReferenceTypes.GLOBAL_REFERENCE) - .build()) - .build(); - } - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_058.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_058.java deleted file mode 100644 index c924e1c36..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_058.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.Arrays; - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.junit.Ignore; -import org.junit.Test; - -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultCapability; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; - -/** - * Tests the following constraint: - *

- * If the semanticId of a Capability submodel element references a - * ConceptDescription then the ConceptDescription/category shall be CAPABILITY - * - *

- * - * @author schnicke - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_058 { - @Test - public void correctCategory() throws ValidationException { - String conceptDescriptionId = "conceptDescription"; - - ConceptDescription correctCD = ConstraintTestHelper.createConceptDescription("idShort1", - conceptDescriptionId, "CAPABILITY"); - - Submodel sm = ConstraintTestHelper - .createSubmodel( - Arrays.asList(createCapability("submodelElementIdShort", conceptDescriptionId))); - - Environment correctEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(correctCD, - ConstraintTestHelper.getIrrelevantConceptDescription())); - - ShaclValidator.getInstance().validate(correctEnv); - } - - @Test - public void wrongCategory() { - String conceptDescriptionWrongId = "conceptDescriptionWrong"; - - ConceptDescription wrongCD = ConstraintTestHelper.createConceptDescription("idShort1", - conceptDescriptionWrongId, - "COLLECTION"); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList(createCapability("submodelElementIdShort", conceptDescriptionWrongId))); - - Environment wrongEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(wrongCD, ConstraintTestHelper.getIrrelevantConceptDescription())); - try { - ShaclValidator.getInstance().validate(wrongEnv); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "If the semanticId of a Capability submodel element references a ConceptDescription then the ConceptDescription/category shall be CAPABILITY.")); - } - } - - private Capability createCapability(String idShort, String conceptDescriptionId) { - return new DefaultCapability.Builder() - .idShort(idShort) - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value(conceptDescriptionId) - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .type(ReferenceTypes.GLOBAL_REFERENCE) - .build()) - .build(); - } - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_060.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_060.java deleted file mode 100644 index 3ff23bb2c..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_060.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.Arrays; - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultOperation; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; - -import org.junit.Ignore; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * If the semanticId of a Operation submodel element references a - * ConceptDescription then the category of the ConceptDescription shall be one - * of the following values: FUNCTION. - *

- * - * @author schnicke - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_060 { - @Test - public void correctCategory() throws ValidationException { - String conceptDescriptionId = "conceptDescription"; - - ConceptDescription correctCD = ConstraintTestHelper - .createConceptDescription("idShort1", conceptDescriptionId, "FUNCTION"); - - Submodel sm = ConstraintTestHelper - .createSubmodel( - Arrays.asList(createOperation("submodelElementIdShort", conceptDescriptionId))); - - Environment correctEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(correctCD, - ConstraintTestHelper.getIrrelevantConceptDescription())); - - ShaclValidator.getInstance().validate(correctEnv); - } - - @Test - public void wrongCategory() { - String conceptDescriptionWrongId = "conceptDescriptionWrong"; - - ConceptDescription wrongCD = ConstraintTestHelper.createConceptDescription("idShort1", conceptDescriptionWrongId, - "COLLECTION"); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList(createOperation("submodelElementIdShort", conceptDescriptionWrongId))); - - Environment wrongEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(wrongCD, ConstraintTestHelper.getIrrelevantConceptDescription())); - try { - ShaclValidator.getInstance().validate(wrongEnv); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "If the semanticId of a Operation submodel element references a ConceptDescription then the category of the ConceptDescription shall be one of the following values: FUNCTION.")); - } - } - - private Operation createOperation(String idShort, String conceptDescriptionId) { - return new DefaultOperation.Builder() - .idShort(idShort) - .kind(ModelingKind.TEMPLATE) - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value(conceptDescriptionId) - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .type(ReferenceTypes.GLOBAL_REFERENCE) - .build()) - .build(); - } - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_063.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_063.java deleted file mode 100644 index 5b8b28259..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_063.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.ArrayList; -import java.util.Arrays; - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultQualifier; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; - -import org.junit.Ignore; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * If the semanticId of a Qualifier references a ConceptDescription then the - * ConceptDescription/category shall be one of following values: QUALIFIER. - *

- * - * @author schnicke - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_063 { - @Test - public void correctCategory() throws ValidationException { - String conceptDescriptionId = "conceptDescription"; - - ConceptDescription correctCD = ConstraintTestHelper - .createConceptDescription("idShort1", conceptDescriptionId, "QUALIFIER"); - - Submodel sm = ConstraintTestHelper - .createSubmodel(new ArrayList<>()); - sm.setQualifiers(Arrays.asList(createConstraint(conceptDescriptionId))); - - Environment correctEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(correctCD, - ConstraintTestHelper.getIrrelevantConceptDescription())); - - ShaclValidator.getInstance().validate(correctEnv); - } - - @Test - public void wrongCategory() { - String conceptDescriptionWrongId = "conceptDescriptionWrong"; - - ConceptDescription wrongCD = ConstraintTestHelper.createConceptDescription("idShort1", conceptDescriptionWrongId, - "COLLECTION"); - - Submodel sm = ConstraintTestHelper - .createSubmodel(new ArrayList<>()); - sm.setQualifiers(Arrays.asList(createConstraint(conceptDescriptionWrongId))); - - Environment wrongEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(wrongCD, ConstraintTestHelper.getIrrelevantConceptDescription())); - try { - ShaclValidator.getInstance().validate(wrongEnv); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "If the semanticId of a Qualifier references a ConceptDescription then the ConceptDescription/category shall be one of following values: QUALIFIER.")); - } - } - - private Qualifier createConstraint(String conceptDescriptionId) { - return new DefaultQualifier.Builder() - .valueType(DataTypeDefXsd.STRING) - .type("test") - .semanticId(new DefaultReference.Builder().keys(new DefaultKey.Builder() - .value(conceptDescriptionId).type(KeyTypes.CONCEPT_DESCRIPTION).build()) - .type(ReferenceTypes.GLOBAL_REFERENCE).build()) - .build(); - } - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_064.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_064.java deleted file mode 100644 index 4b482c116..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_064.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.ArrayList; -import java.util.Arrays; - -import org.eclipse.digitaltwin.aas4j.v3.model.AssetAdministrationShell; -import org.eclipse.digitaltwin.aas4j.v3.model.ConceptDescription; -import org.eclipse.digitaltwin.aas4j.v3.model.Environment; -import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultEnvironment; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * If the semanticId of a View references a ConceptDescription then the - * category of the ConceptDescription shall be VIEW. - *

- * - * @author schnicke - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_064 { - @Test - public void correctCategory() throws ValidationException { - String conceptDescriptionId = "conceptDescription"; - - ConceptDescription correctCD = ConstraintTestHelper - .createConceptDescription("idShort1", conceptDescriptionId, "VIEW"); - - AssetAdministrationShell aas = ConstraintTestHelper.getDummyAAS(); - - Submodel sm = ConstraintTestHelper - .createSubmodel(new ArrayList<>()); - - Environment correctEnv = new DefaultEnvironment.Builder() - .submodels(sm) - .conceptDescriptions(Arrays.asList(correctCD, ConstraintTestHelper.getIrrelevantConceptDescription())) - .assetAdministrationShells(aas).build(); - - ShaclValidator.getInstance().validate(correctEnv); - } - - @Test - public void wrongCategory() { - String conceptDescriptionWrongId = "conceptDescriptionWrong"; - - ConceptDescription wrongCD = ConstraintTestHelper.createConceptDescription("idShort1", conceptDescriptionWrongId, - "COLLECTION"); - - AssetAdministrationShell aas = ConstraintTestHelper.getDummyAAS(); - - Submodel sm = ConstraintTestHelper - .createSubmodel(new ArrayList<>()); - - Environment wrongEnv = new DefaultEnvironment.Builder() - .submodels(sm) - .conceptDescriptions( - Arrays.asList(wrongCD, ConstraintTestHelper.getIrrelevantConceptDescription())) - .assetAdministrationShells(aas).build(); - - try { - ShaclValidator.getInstance().validate(wrongEnv); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "If the semanticId of a View references a ConceptDescription then the category of the ConceptDescription shall be VIEW.")); - } - } - - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_067.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_067.java deleted file mode 100644 index 2c1f20f48..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_067.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultMultiLanguageProperty; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodel; - -import org.junit.Ignore; -import org.junit.Test; - -import java.util.ArrayList; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -/** - * Tests the following constraint: - *

- * If the semanticId of a MultiLanguageProperty references a ConceptDescription then - * DataSpecificationIEC61360/dataType shall be STRING_TRANSLATABLE. - *

- * - * @author bader, chang - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_067 { - @Test - public void wrongConceptDescriptionDatatype() throws ValidationException { - -// DataSpecificationIEC61360 ds = new DefaultDataSpecificationIEC61360.Builder() -// .dataType(DataTypeIEC61360.DATE) // This should be DataTypeIEC61360.STRING_TRANSLATABLE -// .preferredName(new LangString("Wrong Data Specification", "en")) -// .definition(new LangString("A definition of a Date in English.", "en")) -// .build(); - -// EmbeddedDataSpecification embeddedDataSpecification = new DefaultEmbeddedDataSpecification.Builder() -// .dataSpecificationContent(ds) -// .dataSpecification( ConstraintTestHelper.createDummyReference() ) -// .build(); - - ConceptDescription cd = ConstraintTestHelper.createConceptDescription("Concept_Description", "http://example.org/MultilanguageCD", "CONSTANT"); - cd.setCategory("PROPERTY"); -// cd.setEmbeddedDataSpecifications(new ArrayList<>(){{ add(embeddedDataSpecification) ; }} ); - - Reference reference = ConstraintTestHelper.createDummyReference(); - Key key = reference.getKeys().get(0); - key.setType(KeyTypes.CONCEPT_DESCRIPTION); - key.setValue(cd.getId()); - - MultiLanguageProperty property = new DefaultMultiLanguageProperty.Builder() - .idShort("idShort") - .semanticId(reference) - .build(); - - Submodel submodel = new DefaultSubmodel.Builder() - .idShort("submodel_idShort") - .id("http://example.org/TestSubmodel") - .submodelElements(new ArrayList<>() {{add(property);}}) - .build(); - - Environment wrongAssetAdministrationShellEnvironment = ConstraintTestHelper - .createEnvironment( - submodel, - new ArrayList<>() {{add(cd);}} - ); - - try { - ShaclValidator.getInstance().validate(wrongAssetAdministrationShellEnvironment); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "If the semanticId of a MultiLanguageProperty references a ConceptDescription then DataSpecificationIEC61360/dataType shall be STRING_TRANSLATABLE.")); - } - - - } - - @Test - public void correctConceptDescriptionDatatype() throws ValidationException { - - -// DataSpecificationIEC61360 ds = new DefaultDataSpecificationIEC61360.Builder() -// .dataType(DataTypeIEC61360.STRING_TRANSLATABLE) // This should be DataTypeIEC61360.STRING_TRANSLATABLE -// .preferredName(new LangString("Data Specification", "en")) -// .definition(new LangString("A definition of a STRING_TRANSLATABLE in English.", "en")) -// .build(); - -// EmbeddedDataSpecification embeddedDataSpecification = new DefaultEmbeddedDataSpecification.Builder() -// .dataSpecificationContent(ds) -// .dataSpecification( ConstraintTestHelper.createDummyReference() ) -// .build(); - - ConceptDescription cd = ConstraintTestHelper.createConceptDescription("Concept_Description", "http://example.org/MultilanguageCD", "CONSTANT"); - cd.setCategory("PROPERTY"); -// cd.setEmbeddedDataSpecifications(new ArrayList<>(){{ add(embeddedDataSpecification) ; }} ); - - Reference reference = ConstraintTestHelper.createDummyReference(); - Key key = reference.getKeys().get(0); - key.setType(KeyTypes.CONCEPT_DESCRIPTION); - key.setValue(cd.getId()); - - MultiLanguageProperty property = new DefaultMultiLanguageProperty.Builder() - .idShort("idShort") - .semanticId(reference) - .build(); - - Submodel submodel = new DefaultSubmodel.Builder() - .idShort("submodel_idShort") - .id("http://example.org/TestSubmodel") - .submodelElements(new ArrayList<>() {{add(property);}}) - .build(); - - Environment assetAdministrationShellEnvironment = ConstraintTestHelper - .createEnvironment( - submodel, - new ArrayList<>() {{add(cd);}} - ); - - - ShaclValidator.getInstance().validate(assetAdministrationShellEnvironment); - - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_068.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_068.java deleted file mode 100644 index c239a4d32..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_068.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultRange; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodel; - -import org.junit.Ignore; -import org.junit.Test; - -import java.util.ArrayList; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -/** - * Tests the following constraint: - *

- * If the semanticId of a Range submodel element references a ConceptDescription then - * DataSpecificationIEC61360/dataType shall be a numerical one, i.e. REAL_* or RATIONAL_*. - *

- * - * @author bader, chang - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_068 { - @Test - public void wrongConceptDescriptionDatatype() throws ValidationException { - -// DataSpecificationIEC61360 ds = new DefaultDataSpecificationIEC61360.Builder() -// .dataType(DataTypeIEC61360.INTEGER_COUNT) // This should be DataTypeIEC61360.REAL_* or RATIONAL_* -// .preferredName(new LangString("Wrong Data Specification", "en")) -// .definition(new LangString("A definition of a Date in English.", "en")) -// .build(); - -// EmbeddedDataSpecification embeddedDataSpecification = new DefaultEmbeddedDataSpecification.Builder() -// .dataSpecificationContent(ds) -// .dataSpecification( ConstraintTestHelper.createDummyReference() ) -// .build(); - - ConceptDescription cd = ConstraintTestHelper.createConceptDescription("Concept_Description", "http://example.org/MultilanguageCD", "CONSTANT"); - cd.setCategory("PROPERTY"); -// cd.setEmbeddedDataSpecifications(new ArrayList<>(){{ add(embeddedDataSpecification) ; }} ); - - Reference reference = ConstraintTestHelper.createDummyReference(); - Key key = reference.getKeys().get(0); - key.setType(KeyTypes.CONCEPT_DESCRIPTION); - key.setValue(cd.getId()); - - Range range = new DefaultRange.Builder() - .idShort("idShort") - .semanticId(reference) - .valueType(DataTypeDefXsd.INT) - .max("50") - .min("-30") - .build(); - - Submodel submodel = new DefaultSubmodel.Builder() - .idShort("submodel_idShort") - .id("http://example.org/TestSubmodel") - .submodelElements(new ArrayList<>() {{add(range);}}) - .build(); - - Environment wrongAssetAdministrationShellEnvironment = ConstraintTestHelper - .createEnvironment( - submodel, - new ArrayList<>() {{add(cd);}} - ); - - try { - ShaclValidator.getInstance().validate(wrongAssetAdministrationShellEnvironment); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith("If the semanticId of a Range submodel element references a " + - "ConceptDescription then DataSpecificationIEC61360/dataType shall be a numerical one, i.e. " + - "Real* or Rational*.")); - } - - - } - - @Test - public void correctRealConceptDescriptionDatatype() throws ValidationException { - - -// DataSpecificationIEC61360 ds = new DefaultDataSpecificationIEC61360.Builder() -// .dataType(DataTypeIEC61360.REAL_COUNT) // This should be DataTypeIEC61360.STRING_TRANSLATABLE -// .preferredName(new LangString("Data Specification", "en")) -// .definition(new LangString("A definition of a REAL_COUNT in English.", "en")) -// .build(); - -// EmbeddedDataSpecification embeddedDataSpecification = new DefaultEmbeddedDataSpecification.Builder() -// .dataSpecificationContent(ds) -// .dataSpecification( ConstraintTestHelper.createDummyReference() ) -// .build(); - - ConceptDescription cd = ConstraintTestHelper.createConceptDescription("Concept_Description", "http://example.org/MultilanguageCD", "CONSTANT"); - cd.setCategory("PROPERTY"); -// cd.setEmbeddedDataSpecifications(new ArrayList<>(){{ add(embeddedDataSpecification) ; }} ); - - Reference reference = ConstraintTestHelper.createDummyReference(); - Key key = reference.getKeys().get(0); - key.setType(KeyTypes.CONCEPT_DESCRIPTION); - key.setValue(cd.getId()); - - Range range = new DefaultRange.Builder() - .idShort("idShort") - .semanticId(reference) - .valueType(DataTypeDefXsd.INT) - .max("50") - .min("-30") - .build(); - - Submodel submodel = new DefaultSubmodel.Builder() - .idShort("submodel_idShort") - .id("http://example.org/TestSubmodel") - .submodelElements(new ArrayList<>() {{add(range);}}) - .build(); - - Environment assetAdministrationShellEnvironment = ConstraintTestHelper - .createEnvironment( - submodel, - new ArrayList<>() {{add(cd);}} - ); - - - ShaclValidator.getInstance().validate(assetAdministrationShellEnvironment); - - } - - - @Test - public void correctRationalConceptDescriptionDatatype() throws ValidationException { - - -// DataSpecificationIEC61360 ds = new DefaultDataSpecificationIEC61360.Builder() -// .dataType(DataTypeIEC61360.RATIONAL_MEASURE) // This should be DataTypeIEC61360.STRING_TRANSLATABLE -// .preferredName(new LangString("Data Specification", "en")) -// .definition(new LangString("A definition of a RATIONAL_MEASURE in English.", "en")) -// .build(); - -// EmbeddedDataSpecification embeddedDataSpecification = new DefaultEmbeddedDataSpecification.Builder() -// .dataSpecificationContent(ds) -// .dataSpecification( ConstraintTestHelper.createDummyReference() ) -// .build(); - - ConceptDescription cd = ConstraintTestHelper.createConceptDescription("Concept_Description", "http://example.org/MultilanguageCD", "CONSTANT"); - cd.setCategory("PROPERTY"); -// cd.setEmbeddedDataSpecifications(new ArrayList<>(){{ add(embeddedDataSpecification) ; }} ); - - Reference reference = ConstraintTestHelper.createDummyReference(); - Key key = reference.getKeys().get(0); - key.setType(KeyTypes.CONCEPT_DESCRIPTION); - key.setValue(cd.getId()); - - Range range = new DefaultRange.Builder() - .idShort("idShort") - .semanticId(reference) - .valueType(DataTypeDefXsd.INT) - .max("50") - .min("-30") - .build(); - - Submodel submodel = new DefaultSubmodel.Builder() - .idShort("submodel_idShort") - .id("http://example.org/TestSubmodel") - .submodelElements(new ArrayList<>() {{add(range);}}) - .build(); - - Environment assetAdministrationShellEnvironment = ConstraintTestHelper - .createEnvironment( - submodel, - new ArrayList<>() {{add(cd);}} - ); - - - ShaclValidator.getInstance().validate(assetAdministrationShellEnvironment); - - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_069.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_069.java deleted file mode 100644 index 5010d3fe2..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_069.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.Arrays; - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultRange; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; - -import org.junit.Ignore; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * If the semanticId of a Range references a ConceptDescription then - * DataSpecificationIEC61360/levelType shall be identical to the set {Min, Max}. - * - *

- * - * @author schnicke - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_069 { - - @Test - public void correctLevelTypes() throws ValidationException { - String conceptDescriptionId = "conceptDescription"; - - ConceptDescription correctCD = getCDWithLevelType(conceptDescriptionId); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList(createRange("submodelElementIdShort", conceptDescriptionId))); - - Environment correctEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(correctCD, - ConstraintTestHelper.getIrrelevantConceptDescription())); - - ShaclValidator.getInstance().validate(correctEnv); - } - - - @Test - public void wrongLevelTypes() { - String conceptDescriptionWrongId = "conceptDescriptionWrong"; - - ConceptDescription wrongCD = getCDWithWrongLevelType(conceptDescriptionWrongId); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList(createRange("submodelElementIdShort", conceptDescriptionWrongId))); - - Environment wrongEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(wrongCD, ConstraintTestHelper.getIrrelevantConceptDescription())); - try { - ShaclValidator.getInstance().validate(wrongEnv); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "If the semanticId of a Range references a ConceptDescription then DataSpecificationIEC61360/levelType shall be identical to the set {Min, Max}.")); - } - } - - private Range createRange(String idShort, String conceptDescriptionId) { - return new DefaultRange.Builder() - .idShort(idShort) - .valueType(DataTypeDefXsd.INT) - .min("0").max("1") - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value(conceptDescriptionId) - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .type(ReferenceTypes.GLOBAL_REFERENCE) - .build()) - .build(); - } - - private ConceptDescription getCDWithLevelType(String conceptDescriptionId) { - ConceptDescription cd = ConstraintTestHelper.createConceptDescription("idShort1", conceptDescriptionId, - "PROPERTY"); - -// DataSpecificationIEC61360 stringDataTypeDS = new DefaultDataSpecificationIEC61360.Builder() -// .preferredName(new LangString("ds", "EN")) -// .definition(new LangString("some english definition", "EN")) -// .dataType(DataTypeIEC61360.REAL_MEASURE) -// .levelTypes(Arrays.asList(LevelType.MIN, LevelType.MAX)) -// .build(); - -// EmbeddedDataSpecification stringDataTypeEDS = new DefaultEmbeddedDataSpecification.Builder() -// .dataSpecificationContent(stringDataTypeDS) -// .dataSpecification(new DefaultReference.Builder() -// .key(new DefaultKey.Builder() -// .idType(KeyType.CUSTOM) -// .value("foo_key") -// .build()) -// .build()) -// .build(); - -// cd.setEmbeddedDataSpecifications(Arrays.asList(stringDataTypeEDS)); - - return cd; - } - - - private ConceptDescription getCDWithWrongLevelType(String conceptDescriptionId) { - ConceptDescription cd = ConstraintTestHelper.createConceptDescription("idShort1", conceptDescriptionId, - "PROPERTY"); - -// DataSpecificationIEC61360 stringDataTypeDS = new DefaultDataSpecificationIEC61360.Builder() -// .preferredName(new LangString("ds", "EN")) -// .definition(new LangString("some english definition", "EN")) -// .dataType(DataTypeIEC61360.STRING) -// .levelTypes(Arrays.asList(LevelType.NOM, LevelType.MAX)) -// .build(); - -// EmbeddedDataSpecification stringDataTypeEDS = new DefaultEmbeddedDataSpecification.Builder() -// .dataSpecificationContent(stringDataTypeDS) -// .dataSpecification(new DefaultReference.Builder() -// .key(new DefaultKey.Builder() -// .idType(KeyType.CUSTOM) -// .value("foo_key") -// .build()) -// .build()) -// .build(); - -// cd.setEmbeddedDataSpecifications(Arrays.asList(stringDataTypeEDS)); - - return cd; - } - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_076.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_076.java deleted file mode 100644 index d27b080ad..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_076.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import org.eclipse.digitaltwin.aas4j.v3.model.ConceptDescription; -import org.eclipse.digitaltwin.aas4j.v3.model.LangString; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultLangString; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * For all ConceptDescriptions using data specification template IEC61360 - * (http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/2/0) - * at least a preferred name in English shall be defined. - *

- * - * @author schnicke - * - */ - -@Ignore("Constraint has been removed") -public class TestAASd_076 { - - @Test - public void englishPreferredName() throws ValidationException { - LangString preferredName = new DefaultLangString.Builder().text("english").language("en").build(); - ConceptDescription cd = createConceptDescription(preferredName); - - ShaclValidator.getInstance().validate(cd); - } - - @Test - public void noIEC61360DataSpecification() throws ValidationException { - ConceptDescription description = ConstraintTestHelper.createConceptDescription("testIdShort", "testId", - "PROPERTY"); - - ShaclValidator.getInstance().validate(description); - } - - - @Test - public void noEnglishPreferredName() { - LangString preferredName = new DefaultLangString.Builder().text("deutsch").language("de").build(); - ConceptDescription cd = createConceptDescription(preferredName); - - try { - ShaclValidator.getInstance().validate(cd); - fail(); - } catch (ValidationException e) { - System.out.println(e.getMessage()); - assertTrue(e.getMessage().endsWith( - "For all ConceptDescriptions using data specification template IEC61360 (http://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/2/0) at least a preferred name in English shall be defined.")); - } - } - - private ConceptDescription createConceptDescription(LangString preferredName) { - ConceptDescription cd = ConstraintTestHelper.createConceptDescription("idShort1", "id", - "QUALIFIER"); - -// DataSpecificationIEC61360 urlDataTypeDS = new DefaultDataSpecificationIEC61360.Builder() -// .preferredName(preferredName) -// .preferredName(new LangString("test", "de")) -// .definition(new LangString("definition", "en")) -// .dataType(DataTypeIEC61360.URL) -// .build(); - -// EmbeddedDataSpecification urlDataTypeEDS = new DefaultEmbeddedDataSpecification.Builder() -// .dataSpecificationContent(urlDataTypeDS) -// .dataSpecification(new DefaultReference.Builder() -// .key(new DefaultKey.Builder() -// .idType(KeyType.CUSTOM) -// .value("foo_key") -// .build()) -// .build()) -// .build(); - -// cd.setEmbeddedDataSpecifications(Arrays.asList(urlDataTypeEDS)); - return cd; - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_077.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_077.java deleted file mode 100644 index 702df55c6..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_077.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import org.eclipse.digitaltwin.aas4j.v3.model.Extension; -import org.eclipse.digitaltwin.aas4j.v3.model.Referable; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultExtension; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodel; -import org.junit.Ignore; -import org.junit.Test; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -/** - * Tests the following constraint: - *

- * The name of an extension within HasExtensions needs to be unique. - *

- * - * @author bader - * - */ -public class TestAASd_077 { - - // TODO: Add HasExtensions to Referables in the Java Model and then uncomment the lines in the tests. - - @Test - @Ignore - public void repeatingExtensionName() throws ValidationException { - - Extension extension1 = new DefaultExtension.Builder() - .name("extension") - .build(); - - Extension extension2 = new DefaultExtension.Builder() - .name("extension") - .build(); - - Referable referable = new DefaultSubmodel.Builder() - .idShort("submodel_idShort") - .id("http://example.org/TestSubmodel") - //.setExtensions( new ArrayList() {{add(extension1); add(extension2);}} ) - .build(); - - try { - ShaclValidator.getInstance().validate(referable); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "The name of an extension within HasExtensions needs to be unique.")); - } - - - } - - @Test - public void uniqueExtensionNames() throws ValidationException { - Extension extension1 = new DefaultExtension.Builder() - .name("extension1") - .build(); - - Extension extension2 = new DefaultExtension.Builder() - .name("extension2") - .build(); - - Referable referable = new DefaultSubmodel.Builder() - .idShort("submodel_idShort") - .id("http://example.org/TestSubmodel") - //.setExtensions( new ArrayList() {{add(extension1); add(extension2);}} ) - .build(); - - ShaclValidator.getInstance().validate(referable); - - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_080.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_080.java deleted file mode 100644 index e9b7b7c1e..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_080.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import org.eclipse.digitaltwin.aas4j.v3.model.Key; -import org.eclipse.digitaltwin.aas4j.v3.model.KeyTypes; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * In case Key/type == GlobalReference idType shall not be any LocalKeyType - * (IdShort, FragmentId). - *

- * - * @author schnicke - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_080 { - private static final String ERRORMSG = "In case Key/type == GlobalReference idType shall not be any LocalKeyType (IdShort, FragmentId)."; - - @Test - public void correctIdType() throws ValidationException { - Key key = createWithTypeGlobalReferenceKey(); - - ShaclValidator.getInstance().validate(key); - } - - @Test - public void wrongIdTypeIdShort() { - Key key = createWithTypeGlobalReferenceKey(); - try { - ShaclValidator.getInstance().validate(key); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith(ERRORMSG)); - } - } - - @Test - public void wrongIdTypeFragmentId() { - Key key = createWithTypeGlobalReferenceKey(); - - try { - ShaclValidator.getInstance().validate(key); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith(ERRORMSG)); - } - } - - private Key createWithTypeGlobalReferenceKey() { - return new DefaultKey.Builder() - .value("value") - .type(KeyTypes.GLOBAL_REFERENCE) - .build(); - } - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_081.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_081.java deleted file mode 100644 index 3148280aa..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_081.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import org.eclipse.digitaltwin.aas4j.v3.model.Key; -import org.eclipse.digitaltwin.aas4j.v3.model.KeyTypes; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * In case Key/type==AssetAdministrationShell Key/idType shall not be any - * LocalKeyType (IdShort, FragmentId). - *

- * - * @author schnicke - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_081 { - private static final String ERRORMSG = "In case Key/type==AssetAdministrationShell Key/idType shall not be any LocalKeyType (IdShort, FragmentId)."; - - @Test - public void correctIdType() throws ValidationException { - Key key = createWithTypeAssetAdministrationShellKey(); - - ShaclValidator.getInstance().validate(key); - } - - @Test - public void wrongIdTypeIdShort() { - Key key = createWithTypeAssetAdministrationShellKey(); - try { - ShaclValidator.getInstance().validate(key); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith(ERRORMSG)); - } - } - - @Test - public void wrongIdTypeFragmentId() { - Key key = createWithTypeAssetAdministrationShellKey(); - - try { - ShaclValidator.getInstance().validate(key); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith(ERRORMSG)); - } - } - - private Key createWithTypeAssetAdministrationShellKey() { - return new DefaultKey.Builder() - .value("value") - .type(KeyTypes.ASSET_ADMINISTRATION_SHELL) - .build(); - } - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_090.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_090.java deleted file mode 100644 index ced00e731..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_090.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import org.eclipse.digitaltwin.aas4j.v3.model.Blob; -import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; -import org.eclipse.digitaltwin.aas4j.v3.model.File; -import org.eclipse.digitaltwin.aas4j.v3.model.Property; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultBlob; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultFile; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultProperty; -import org.junit.Test; - -/** - * Tests the following constraint: - *

- * For data elements DataElement/category shall be one of the following - * values: CONSTANT, PARAMETER or VARIABLE. Exception: File and Blob data - * elements. - *

- * - * @author schnicke - * - */ -public class TestAASd_090 { - @Test - public void correctCategoryConstant() throws ValidationException { - ShaclValidator.getInstance().validate(createProperty("idShort1", "CONSTANT")); - } - - @Test - public void correctCategoryParameter() throws ValidationException { - ShaclValidator.getInstance().validate(createProperty("idShort1", "PARAMETER")); - } - - @Test - public void correctCategoryVariable() throws ValidationException { - ShaclValidator.getInstance().validate(createProperty("idShort1", "VARIABLE")); - } - - @Test - public void fileCategoryDoesntMatter() throws ValidationException { - ShaclValidator.getInstance().validate(createFile()); - } - - @Test - public void blobCategoryDoesntMatter() throws ValidationException { - ShaclValidator.getInstance().validate(createBlob()); - } - - @Test - public void wrongCategory() { - try { - ShaclValidator.getInstance().validate(createProperty("idShort1", "WRONG")); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "For data elements Referable/category shall be one of the following values: CONSTANT, PARAMETER or VARIABLE. Exception: File and Blob data elements.")); - } - } - - private Property createProperty(String idShort, String category) { - return new DefaultProperty.Builder() - .idShort(idShort) - .category(category) - .value("test") - .valueType(DataTypeDefXsd.STRING) - .build(); - } - - private File createFile() { - return new DefaultFile.Builder() - .idShort("idShort1") - .category("DOESNTMATTER") - .contentType("application/json").value("file:///test.json") - .build(); - } - - private Blob createBlob() { - return new DefaultBlob.Builder() - .idShort("idShort2") - .category("DOESNTMATTER") - .contentType("application/json") - .value(new byte[] { 0, 1, 2 }) - .build(); - } - -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_092_059_ENTITY.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_092_059_ENTITY.java deleted file mode 100644 index 6e57d5a0a..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_092_059_ENTITY.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.Arrays; - -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodelElementCollection; -import org.junit.Ignore; -import org.junit.Test; - -import org.eclipse.digitaltwin.aas4j.v3.model.Environment; -import org.eclipse.digitaltwin.aas4j.v3.model.ConceptDescription; -import org.eclipse.digitaltwin.aas4j.v3.model.KeyTypes; -import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; -import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementCollection; - -/** - * Tests the following constraint: - *

- * If the semanticId of a SubmodelElementCollection with - * SubmodelElementCollection/allowDuplicates == false references a - * ConceptDescription then the ConceptDescription/category shall be ENTITY. - *

- * - * Additionally, covers part of AASd-059. Full coverage is achieved in - * combination with AASd-093 - * - * @author schnicke - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_092_059_ENTITY { - @Test - public void correctCategoryNoDuplicates() throws ValidationException { - String conceptDescriptionCollectionId = "conceptDescriptionCollection"; - - ConceptDescription correctCategoryCollectionCD = ConstraintTestHelper.createConceptDescription("idShort1", - conceptDescriptionCollectionId, "ENTITY"); - - SubmodelElementCollection noDuplicatesCollection = createSubmodelElementCollection("submodelElementIdShort2", - conceptDescriptionCollectionId); -// noDuplicatesCollection.setAllowDuplicates(false); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList( - )); - - Environment correctEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(correctCategoryCollectionCD, - ConstraintTestHelper.getIrrelevantConceptDescription())); - - ShaclValidator.getInstance().validate(correctEnv); - } - - @Test - public void wrongCategoryNoDuplicates() { - String conceptDescriptionCollectionId = "conceptDescriptionCollection"; - - ConceptDescription wrongCategoryCollectionCD = ConstraintTestHelper.createConceptDescription("idShort1", - conceptDescriptionCollectionId, "COLLECTION"); - - SubmodelElementCollection noDuplicatesCollection = createSubmodelElementCollection("submodelElementIdShort2", - conceptDescriptionCollectionId); -// noDuplicatesCollection.setAllowDuplicates(false); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList(noDuplicatesCollection)); - - Environment wrongEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(wrongCategoryCollectionCD, ConstraintTestHelper.getIrrelevantConceptDescription())); - try { - ShaclValidator.getInstance().validate(wrongEnv); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "If the semanticId of a SubmodelElementCollection with SubmodelElementCollection/allowDuplicates == false references a ConceptDescription then the ConceptDescription/category shall be ENTITY.")); - } - } - - private SubmodelElementCollection createSubmodelElementCollection(String idShort, String conceptDescriptionId) { - return new DefaultSubmodelElementCollection.Builder() - .idShort(idShort) - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value(conceptDescriptionId) - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .build()) - .build(); - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_093_059_COLLECTION.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_093_059_COLLECTION.java deleted file mode 100644 index 25e67c943..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_093_059_COLLECTION.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.Arrays; - -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodelElementCollection; -import org.junit.Ignore; -import org.junit.Test; - -import org.eclipse.digitaltwin.aas4j.v3.model.Environment; -import org.eclipse.digitaltwin.aas4j.v3.model.ConceptDescription; -import org.eclipse.digitaltwin.aas4j.v3.model.KeyTypes; -import org.eclipse.digitaltwin.aas4j.v3.model.Submodel; -import org.eclipse.digitaltwin.aas4j.v3.model.SubmodelElementCollection; - -/** - * Tests the following constraint: - *

- * If the semanticId of a SubmodelElementCollection with - * SubmodelElementCollection/allowDuplicates == true references a - * ConceptDescription then the ConceptDescription/category shall be COLLECTION. - * - *

- * - * Additionally, covers part of AASd-059. Full coverage is achieved in - * combination with AASd-092 - * - * @author schnicke - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_093_059_COLLECTION { - @Test - public void correctCategoryAllowDuplicates() throws ValidationException { - String conceptDescriptionCollectionId = "conceptDescriptionCollection"; - - ConceptDescription correctCategoryCollectionCD = ConstraintTestHelper.createConceptDescription("idShort1", - conceptDescriptionCollectionId, "COLLECTION"); - - SubmodelElementCollection noDuplicatesCollection = createSubmodelElementCollection("submodelElementIdShort2", - conceptDescriptionCollectionId); -// noDuplicatesCollection.setAllowDuplicates(true); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList( - )); - - Environment correctEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(correctCategoryCollectionCD, - ConstraintTestHelper.getIrrelevantConceptDescription())); - - ShaclValidator.getInstance().validate(correctEnv); - } - - @Test - public void wrongCategoryAllowDuplicates() { - String conceptDescriptionCollectionId = "conceptDescriptionCollection"; - - ConceptDescription wrongCategoryCollectionCD = ConstraintTestHelper.createConceptDescription("idShort1", - conceptDescriptionCollectionId, "ENTITY"); - - SubmodelElementCollection noDuplicatesCollection = createSubmodelElementCollection("submodelElementIdShort2", - conceptDescriptionCollectionId); -// noDuplicatesCollection.setAllowDuplicates(true); - - Submodel sm = ConstraintTestHelper - .createSubmodel(Arrays.asList(noDuplicatesCollection)); - - Environment wrongEnv = ConstraintTestHelper.createEnvironment(sm, - Arrays.asList(wrongCategoryCollectionCD, ConstraintTestHelper.getIrrelevantConceptDescription())); - try { - ShaclValidator.getInstance().validate(wrongEnv); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "If the semanticId of a SubmodelElementCollection with SubmodelElementCollection/allowDuplicates == true references a ConceptDescription then the ConceptDescription/category shall be COLLECTION.")); - } - } - - private SubmodelElementCollection createSubmodelElementCollection(String idShort, String conceptDescriptionId) { - return new DefaultSubmodelElementCollection.Builder() - .idShort(idShort) - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value(conceptDescriptionId) - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .build()) - .build(); - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_100.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_100.java deleted file mode 100644 index 08fb79790..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_100.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import org.eclipse.digitaltwin.aas4j.v3.model.Referable; -import org.junit.Test; - -import java.util.ArrayList; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -/** - * Tests the following constraint: - *

- * An attribute with data type "string" is not allowed to be empty. - *

- * - * @author bader, chang - * - */ - -public class TestAASd_100 { - @Test - public void idShortWithNotAllowedCharacters() throws ValidationException { - Referable wrongReferable = ConstraintTestHelper.createSubmodel(new ArrayList<>()); - - - wrongReferable.setIdShort(""); - try { - ShaclValidator.getInstance().validate(wrongReferable); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith("starting mandatory with a letter. I.e. [a-zA-Z][a-zA-Z0-9_]+.")); - } - - - } - - @Test - public void idShortWithAllowedCharacters() throws ValidationException { - Referable referable = ConstraintTestHelper.createSubmodel(new ArrayList<>()); - referable.setIdShort("id_Short"); - ShaclValidator.getInstance().validate(referable); - } -} diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_65a.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_65a.java deleted file mode 100644 index 62cd05c38..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_65a.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultKey; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultProperty; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultReference; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultSubmodel; - -import org.junit.Ignore; -import org.junit.Test; - -import java.util.ArrayList; - -/** - * Tests the following constraint: - *

- * If the semanticId of a Property references a ConceptDescription with the category VALUE - * then the value of the property is identical to DataSpecificationIEC61360/value and the valueId of - * the property is identical to DataSpecificationIEC61360/valueId. - *

- * - * @author bader, chang - * - */ -@Ignore("Constraint has been removed") -public class TestAASd_65a { - - @Ignore - @Test - public void missmatchingValueAndValueId() throws ValidationException { - - Property pr = new DefaultProperty.Builder() - .idShort("idShort") - .value("the value of property") - .valueId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value("DataSpecificationIEC61360") - .type(KeyTypes.GLOBAL_REFERENCE) - .build()) - .build()) - .valueType(DataTypeDefXsd.STRING) - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value("https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0/RC01/DataTypeIEC61360") - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .build()) - .build(); - -// DataSpecificationIEC61360 ds = new DefaultDataSpecificationIEC61360.Builder() -// .dataType(DataTypeIEC61360.STRING_TRANSLATABLE) // This should be DataTypeIEC61360.STRING_TRANSLATABLE -// .preferredName(new LangString("Data Specification", "en")) -// .definition(new LangString("A definition of a STRING_TRANSLATABLE in English.", "en")) -// .value("the value") -// .valueId(new DefaultReference.Builder(). -// keys(new DefaultKey.Builder() -// .value("DataSpecificationIEC61360") -// -// .type(KeyTypes.GLOBAL_REFERENCE) -// .build()) -// .build()) -// .build(); - -// EmbeddedDataSpecification embeddedDataSpecification = new DefaultEmbeddedDataSpecification.Builder() -// .dataSpecificationContent(ds) -// .dataSpecification( ConstraintTestHelper.createDummyReference() ) -// .build(); - - ConceptDescription cd = ConstraintTestHelper.createConceptDescription("Concept-Description", "http://example.org/MultilanguageCD", "CONSTANT"); - cd.setCategory("VALUE"); -// cd.setEmbeddedDataSpecifications(new ArrayList<>(){{ add(embeddedDataSpecification) ; }} ); - - Submodel submodel = new DefaultSubmodel.Builder() - .idShort("submodel_idShort") - .id("http://example.org/TestSubmodel") - .submodelElements(new ArrayList<>() {{add(pr);}}) - .build(); - - Environment assetAdministrationShellEnvironment = ConstraintTestHelper - .createEnvironment( - submodel, - new ArrayList<>() {{add(cd);}} - ); - - - ShaclValidator.getInstance().validate(assetAdministrationShellEnvironment); - - } - - @Ignore - @Test - public void matchingValueAndValueId() throws ValidationException { - - Property pr = new DefaultProperty.Builder() - .idShort("idShort") - .value("the value of Property value") - .valueId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value("DataSpecificationIEC61360") - - .type(KeyTypes.GLOBAL_REFERENCE) - .build()) - .build()) - .valueType(DataTypeDefXsd.STRING) - .semanticId(new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - - .value("https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0/RC01/DataTypeIEC61360") - .type(KeyTypes.CONCEPT_DESCRIPTION) - .build()) - .build()) - .build(); - -// DataSpecificationIEC61360 ds = new DefaultDataSpecificationIEC61360.Builder() -// .dataType(DataTypeIEC61360.STRING_TRANSLATABLE) // This should be DataTypeIEC61360.STRING_TRANSLATABLE -// .preferredName(new LangString("Data Specification", "en")) -// .definition(new LangString("A definition of a STRING_TRANSLATABLE in English.", "en")) -// .value("the value of Property value") -// .valueId(new DefaultReference.Builder(). -// keys(new DefaultKey.Builder() -// .value("DataSpecificationIEC61360") -// -// .type(KeyTypes.GLOBAL_REFERENCE) -// .build()) -// .build()) -// .build(); - -// EmbeddedDataSpecification embeddedDataSpecification = new DefaultEmbeddedDataSpecification.Builder() -// .dataSpecificationContent(ds) -// .dataSpecification( ConstraintTestHelper.createDummyReference() ) -// .build(); - - ConceptDescription cd = ConstraintTestHelper.createConceptDescription("Concept-Description", "http://example.org/MultilanguageCD", "CONSTANT"); - cd.setCategory("VALUE"); -// cd.setEmbeddedDataSpecifications(new ArrayList<>(){{ add(embeddedDataSpecification) ; }} ); - - Submodel submodel = new DefaultSubmodel.Builder() - .idShort("submodel_idShort") - .id("http://example.org/TestSubmodel") - .submodelElements(new ArrayList<>() {{add(pr);}}) - .build(); - - Environment assetAdministrationShellEnvironment = ConstraintTestHelper - .createEnvironment( - submodel, - new ArrayList<>() {{add(cd);}} - ); - - - ShaclValidator.getInstance().validate(assetAdministrationShellEnvironment); - - } -} \ No newline at end of file diff --git a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_66a.java b/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_66a.java deleted file mode 100644 index 2221df83d..000000000 --- a/validator/src/test/java/org/eclipse/digitaltwin/aas4j/v3/model/validator/TestAASd_66a.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 2021 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e. V. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.eclipse.digitaltwin.aas4j.v3.model.validator; - -import org.eclipse.digitaltwin.aas4j.v3.model.*; -import org.eclipse.digitaltwin.aas4j.v3.model.impl.*; - -import org.junit.Ignore; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.Arrays; - -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -/** - * Tests the following constraint: - *

- * If the semanticId of a MultiLanguageProperty or MultiLanguageMultiLanguageProperty references a ConceptDescription with the category MultiLanguageProperty and DataSpecificationIEC61360/valueList is defined the value and valueId of the MultiLanguageProperty is identical to one of the value reference pair types references in the value list, - * i.e. ValueReferencePairType/value or ValueReferencePairType/valueId, resp. - *

- * - * @author bader, chang - * - */ - -@Ignore("Constraint has been removed") -public class TestAASd_66a { - - @Test - @Ignore - public void wrongValueReferencePairTypesValue() throws ValidationException { - Reference multilanguageValueIdReference = new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value("This is the MultiLanguagePropertyReferenceKeyValue ") - .type(KeyTypes.GLOBAL_REFERENCE) - .build()) - .build(); - - -// DataSpecificationIEC61360 ds = new DefaultDataSpecificationIEC61360.Builder() -// .valueList(new DefaultValueList.Builder() -// .valueReferencePairTypes(new DefaultValueReferencePair.Builder() -// .value("This is not identical to Multilanguage property value.") -// .valueId(multilanguageValueIdReference) -// .build()) -// .build()) -// .build(); - -// EmbeddedDataSpecification embeddedDataSpecification = new DefaultEmbeddedDataSpecification.Builder() -// .dataSpecificationContent(ds) -// .dataSpecification( ConstraintTestHelper.createDummyReference() ) -// .build(); - - ConceptDescription cd = ConstraintTestHelper.createConceptDescription("Concept-Description", "http://example.org/MultilanguageCD", "CONSTANT"); - cd.setCategory("PROPERTY"); -// cd.setEmbeddedDataSpecifications(new ArrayList<>(){{ add(embeddedDataSpecification) ; }} ); - - Reference semanticIdReference = ConstraintTestHelper.createDummyReference(); - Key key = semanticIdReference.getKeys().get(0); - key.setType(KeyTypes.CONCEPT_DESCRIPTION); - key.setValue(cd.getId()); - - MultiLanguageProperty property = new DefaultMultiLanguageProperty.Builder() - .idShort("idShort") - .value(Arrays.asList( new DefaultLangString.Builder().text("This is the value of MultilanguageProperty").language("en").build()) ) - .valueId(multilanguageValueIdReference) - .semanticId(semanticIdReference) - .build(); - - Submodel submodel = new DefaultSubmodel.Builder() - .idShort("submodel_idShort") - .id("http://example.org/TestSubmodel") - .submodelElements(new ArrayList<>() {{add(property);}}) - .build(); - - Environment wrongAssetAdministrationShellEnvironment = ConstraintTestHelper - .createEnvironment( - submodel, - new ArrayList<>() {{add(cd);}} - ); - - - try { - ShaclValidator.getInstance().validate(wrongAssetAdministrationShellEnvironment); - fail(); - } catch (ValidationException e) { - assertTrue(e.getMessage().endsWith( - "If the semanticId of a MultiLanguageProperty or MultiLanguageMultiLanguageProperty references a ConceptDescription with the category MultiLanguageProperty and DataSpecificationIEC61360/valueList is defined the value and valueId of the MultiLanguageProperty is identical to one of the value reference pair types references in the value list, i.e. ValueReferencePairType/value or ValueReferencePairType/valueId, resp.")); - } - - } - - @Test - public void correctConceptDescriptionDatatype() throws ValidationException { - Reference reference = new DefaultReference.Builder() - .keys(new DefaultKey.Builder() - .value("1234") - .type(KeyTypes.GLOBAL_REFERENCE) - .build()) - .type(ReferenceTypes.GLOBAL_REFERENCE) - .build(); - -// DataSpecificationIEC61360 ds = new DefaultDataSpecificationIEC61360.Builder() -// .dataType(DataTypeIEC61360.STRING_TRANSLATABLE) // This should be DataTypeIEC61360.STRING_TRANSLATABLE -// .preferredName(new LangString("Data Specification", "en")) -// .definition(new LangString("A definition of a STRING_TRANSLATABLE in English.", "en")) -// .valueList(new DefaultValueList.Builder() -// .valueReferencePairTypes(new DefaultValueReferencePair.Builder() -// .value("Multilanguage") -// .valueId(reference) -// .build()) -// .build()) -// .build(); - -// EmbeddedDataSpecification embeddedDataSpecification = new DefaultEmbeddedDataSpecification.Builder() -// .dataSpecificationContent(ds) -// .dataSpecification( ConstraintTestHelper.createDummyReference() ) -// .build(); - - ConceptDescription cd = ConstraintTestHelper.createConceptDescription("Concept_Description", "http://example.org/MultilanguageCD", "CONSTANT"); - cd.setCategory("PROPERTY"); -// cd.setEmbeddedDataSpecifications(new ArrayList<>(){{ add(embeddedDataSpecification) ; }} ); - - Reference dummyReference = ConstraintTestHelper.createDummyReference(); - Key key = dummyReference.getKeys().get(0); - key.setType(KeyTypes.CONCEPT_DESCRIPTION); - key.setValue(cd.getId()); - - MultiLanguageProperty property = new DefaultMultiLanguageProperty.Builder() - .idShort("idShort") - .value(Arrays.asList(new DefaultLangString.Builder().text("Multilanguage").language("en").build())) - .valueId(reference) - .semanticId(dummyReference) - .build(); - - Submodel submodel = new DefaultSubmodel.Builder() - .idShort("submodel_idShort") - .id("http://example.org/TestSubmodel") - .submodelElements(new ArrayList<>() {{add(property);}}) - .build(); - - Environment assetAdministrationShellEnvironment = ConstraintTestHelper - .createEnvironment( - submodel, - new ArrayList<>() {{add(cd);}} - ); - - - ShaclValidator.getInstance().validate(assetAdministrationShellEnvironment); - - } -}