Skip to content
This repository was archived by the owner on Feb 15, 2024. It is now read-only.

Commit c806d79

Browse files
committed
Fixing Constraint checks for #68 and #72
1 parent 88444c3 commit c806d79

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

validator/src/main/resources/constraint_shapes.ttl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -880,16 +880,16 @@ aas:ConceptDescriptionWithCategoryDocumentAndIEC61360CorrectDataType a sh:NodeSh
880880
sh:targetClass aas:ConceptDescription;
881881
sh:sparql [
882882
a sh:SPARQLConstraint ;
883-
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." ;
883+
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." ;
884884

885885
sh:select """
886886
SELECT ?conceptDescription
887887
WHERE {
888888
?element a <https://admin-shell.io/aas/3/0/RC01/ConceptDescription> .
889889
?conceptDescription <https://admin-shell.io/aas/3/0/RC01/Referable/category> "DOCUMENT" .
890890
?conceptDescription <https://admin-shell.io/aas/3/0/RC01/HasDataSpecification/embeddedDataSpecification> ?embeddedDataSpecification .
891-
?embeddedDataSpecification <https://admin-shell.io/aas/3/0/RC01/EmbeddedDataSpecification/dataSpecificationContent> <https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0/RC01/DataSpecificationIEC61360> .
892-
<https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0/RC01/DataSpecificationIEC61360> <https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0/RC01/DataSpecificationIEC61360/dataType> ?dataType .
891+
?embeddedDataSpecification <https://admin-shell.io/aas/3/0/RC01/EmbeddedDataSpecification/dataSpecificationContent> ?dataSpecification .
892+
?dataSpecification <https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0/RC01/DataSpecificationIEC61360/dataType> ?dataType .
893893
FILTER(?dataType != <https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0/RC01/URL> && ?dataType != <https://admin-shell.io/DataSpecificationTemplates/DataSpecificationIEC61360/3/0/RC01/String>)
894894
}
895895
""" ;

validator/src/test/java/io/adminshell/aas/v3/model/validator/TestAASd_068.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public void wrongConceptDescriptionDatatype() throws ValidationException {
8888
} catch (ValidationException e) {
8989
assertTrue(e.getMessage().endsWith("If the semanticId of a Range submodel element references a " +
9090
"ConceptDescription then DataSpecificationIEC61360/dataType shall be a numerical one, i.e. " +
91-
"REAL_* or RATIONAL_*."));
91+
"Real* or Rational*."));
9292
}
9393

9494

validator/src/test/java/io/adminshell/aas/v3/model/validator/TestAASd_072.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void wrongDataType() {
6868
fail();
6969
} catch (ValidationException e) {
7070
assertTrue(e.getMessage().endsWith(
71-
"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."));
71+
"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."));
7272
}
7373
}
7474

0 commit comments

Comments
 (0)