Created
July 29, 2021 18:31
-
-
Save gtfierro/e26afc54243db49c2ab7d01f8650ad6e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# baseURI: http://data.ashrae.org/standard223/1.0/inference/owl-subset | |
# imports: http://data.ashrae.org/standard223/1.0/model/all | |
# imports: http://www.w3.org/ns/shacl# | |
# prefix: os223 | |
@prefix s223: <http://data.ashrae.org/standard223#> . | |
@prefix owl: <http://www.w3.org/2002/07/owl#> . | |
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
@prefix sh: <http://www.w3.org/ns/shacl#> . | |
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | |
<http://data.ashrae.org/standard223/1.0/inference/owl-subset> | |
a owl:Ontology ; | |
owl:imports <http://data.ashrae.org/standard223/1.0/model/all> ; | |
owl:imports <http://www.w3.org/ns/shacl#> ; | |
owl:versionInfo "Created with TopBraid Composer" ; | |
sh:declare [ | |
sh:namespace "http://www.w3.org/2002/07/owl#"^^xsd:anyURI ; | |
sh:prefix "owl" ; | |
] ; | |
sh:declare [ | |
sh:namespace "http://www.w3.org/2000/01/rdf-schema#"^^xsd:anyURI ; | |
sh:prefix "rdfs" ; | |
] ; | |
sh:declare [ | |
sh:namespace "http://www.w3.org/1999/02/22-rdf-syntax-ns#"^^xsd:anyURI ; | |
sh:prefix "rdf" ; | |
] ; | |
. | |
s223:InversePropertyShape | |
a sh:NodeShape ; | |
sh:rule [ | |
a sh:SPARQLRule ; | |
sh:construct """ | |
CONSTRUCT { | |
?o ?invP $this . | |
} | |
WHERE { | |
$this ?p ?o . | |
?p owl:inverseOf ?invP . | |
} | |
""" ; | |
sh:prefixes <http://data.ashrae.org/standard223/1.0/inference/owl-subset> ; | |
] ; | |
sh:targetClass s223:Concept ; | |
. | |
s223:SymmetricPropertyShape | |
a sh:NodeShape ; | |
sh:rule [ | |
a sh:SPARQLRule ; | |
sh:construct """ | |
CONSTRUCT { | |
?o ?p $this . | |
} | |
WHERE { | |
$this ?p ?o . | |
?p a owl:SymmetricProperty . | |
} | |
""" ; | |
sh:prefixes <http://data.ashrae.org/standard223/1.0/inference/owl-subset> ; | |
] ; | |
sh:targetClass s223:Concept ; | |
. | |
s223:SubClassPropertyShape | |
a sh:NodeShape ; | |
sh:rule [ | |
a sh:SPARQLRule ; | |
sh:construct """ | |
CONSTRUCT { | |
$this rdf:type ?class . | |
} | |
WHERE { | |
$this rdf:type ?subclass . | |
?subclass rdfs:subClassOf+ ?class . | |
} | |
""" ; | |
sh:prefixes <http://data.ashrae.org/standard223/1.0/inference/owl-subset> ; | |
] ; | |
sh:targetClass s223:Concept ; | |
. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================= test session starts ============================== | |
platform linux -- Python 3.9.5, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /home/gabe/src/Brick/223p/223standard/tests/venv/bin/python3 | |
cachedir: .pytest_cache | |
rootdir: /home/gabe/src/Brick/223p/223standard/tests | |
plugins: parallel-0.1.0 | |
collecting ... collected 34 items | |
pytest-parallel: 4 workers (processes), 1 test per worker (thread) | |
test_use_cases.py::test_use_case_implementation_query[FC#2_SZVAV_AHU:fc2brick] | |
test_use_cases.py::test_use_case_implementation_query[Example_test:223impl] | |
test_use_cases.py::test_use_case_implementation_shape[Example_test:223impl] | |
test_validation.py::test_schema_validation PASSEDPASSED | |
test_use_cases.py::test_use_case_implementation_query[Example_test:223impl] PASSED | |
test_use_cases.py::test_use_case_implementation_query[FC#2_SZVAV_AHU:fc2brick] PASSED | |
test_validation.py::test_data_validation[../data/sample.ttl] | |
test_validation.py::test_data_validation[../data/FourSystemExample.ttl] PASSED | |
test_use_cases.py::test_use_case_implementation_shape[Example_test:223impl] PASSED | |
test_validation.py::test_data_validation[../data/system1.ttl] PASSED | |
test_validation.py::test_schema_validation PASSED | |
test_validation.py::test_data_validation[../data/belimo-example1.ttl] PASSED | |
test_validation.py::test_data_validation[../data/belimo-example1.ttl] PASSED | |
test_validation.py::test_data_validation[../data/system2.ttl] PASSED | |
test_validation.py::test_data_validation[../data/system1.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-1.ttl] PASSED | |
test_validation.py::test_data_validation[../data/FourSystemExample.ttl] PASSED | |
test_validation.py::test_data_validation[../data/system4.ttl] FAILED | |
test_validation.py::test_data_validation[../data/sample.ttl] FAILED | |
test_validation.py::test_data_validation[../data/mr33-sample.ttl] PASSED | |
test_validation.py::test_data_validation[../data/system2.ttl] PASSED | |
test_validation.py::test_data_validation[../data/FigureA-12-PS.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-1.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-9.ttl] PASSED | |
test_validation.py::test_data_validation[../data/system4.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-3.ttl] FAILED | |
test_validation.py::test_data_validation[../data/mr33-sample.ttl] FAILED | |
test_validation.py::test_data_validation[../data/junction-testcase-b.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-9.ttl] PASSED | |
test_validation.py::test_data_validation[../data/IBAL.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-3.ttl] PASSED | |
test_validation.py::test_data_validation[../data/branch-20-sample.ttl] FAILED | |
test_validation.py::test_data_validation[../data/FigureA-12-PS.ttl] FAILED | |
test_validation.py::test_data_validation[../data/g36-ahu-a9-brick.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-ahu-a9-brick.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-6.ttl] FAILED | |
test_validation.py::test_data_validation[../data/junction-testcase-b.ttl] FAILED | |
test_validation.py::test_data_validation[../data/junction-testcase.ttl] FAILED | |
test_validation.py::test_data_validation[../data/IBAL.ttl] FAILED | |
test_validation.py::test_data_validation[../data/junction-testcase-c.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-6.ttl] PASSED | |
test_validation.py::test_data_validation[../data/PS-Figure A-9.ttl] FAILED | |
test_validation.py::test_data_validation[../data/branch-20-sample.ttl] FAILED | |
test_validation.py::test_data_validation[../data/g36-figure-a-8.ttl] FAILED | |
test_validation.py::test_data_validation[../data/junction-testcase.ttl] FAILED | |
test_validation.py::test_data_validation[../data/system3.ttl] FAILED | |
test_validation.py::test_data_validation[../data/junction-testcase-c.ttl] FAILED | |
test_validation.py::test_data_validation[../data/g36-figure-a-2.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-8.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-11.ttl] FAILED | |
test_validation.py::test_data_validation[../data/PS-Figure A-9.ttl] FAILED | |
test_validation.py::test_data_validation[../data/g36-figure-a-10.ttl] PASSED | |
test_validation.py::test_data_validation[../data/system3.ttl] PASSED | |
test_validation.py::test_data_validation[../data/mr43-sample.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-2.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-7.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-11.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-4.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-10.ttl] PASSED | |
test_validation.py::test_data_validation[../data/awkward-problem1.ttl] PASSED | |
test_validation.py::test_data_validation[../data/mr43-sample.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-5.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-7.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-12.ttl] PASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-4.ttl] PASSEDPASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-5.ttl] PASSEDFAILED | |
test_validation.py::test_data_validation[../data/awkward-problem1.ttl] FAILEDPASSED | |
test_validation.py::test_data_validation[../data/g36-figure-a-12.ttl] PASSED | |
=================================== FAILURES =================================== | |
___________________ test_data_validation[../data/sample.ttl] ___________________ | |
data_file = '../data/sample.ttl' | |
def test_data_validation(data_file): | |
""" | |
Validates the graphs in the data/ folder against the data and model shapes | |
WARNS but does not fail the test on a validation error for a shape with sh:Info severity | |
""" | |
env = ontoenv.OntoEnv() | |
data_graph = rdflib.Graph() | |
# validate each data file independently | |
data_graph.parse(data_file, format="turtle") | |
# load in all dependent data validation and model definition shapes | |
env.import_dependencies(data_graph) | |
logger.info("Validating data definition of %s ( %d triples)", data_file, len(data_graph)) | |
#data_graph.expand('owlrl', backend='allegro') | |
#valid, x, res_text = pyshacl.validate( | |
# data_graph=data_graph, advanced=True, js=True, inference="owlrl", allow_warnings=True | |
#) | |
valid, x, res_text = pyshacl.validate( | |
data_graph=data_graph, advanced=True, js=True, allow_warnings=True | |
) | |
if not valid: | |
data_graph.serialize(f"/tmp/{os.path.basename(data_file)}", format="ttl") | |
> assert valid, f"{data_file}:\n{res_text}" | |
E AssertionError: ../data/sample.ttl: | |
E Validation Report | |
E Conforms: False | |
E Results (5): | |
E Constraint Violation in ClassConstraintComponent (http://www.w3.org/ns/shacl#ClassConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:hasPropertyShape | |
E Focus Node: sample:Fan2AirOutletConnectionPoint | |
E Value Node: sample:Fan2OutletPressure | |
E Result Path: s223:hasProperty | |
E Message: Value does not have class s223:Property | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: sample:Fan2AirOutletConnectionPoint | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: sample:Fan2AirOutletConnectionPoint | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Constraint Violation in ClassConstraintComponent (http://www.w3.org/ns/shacl#ClassConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:hasPropertyShape | |
E Focus Node: sample:Fan1 | |
E Value Node: sample:Fan1OutletPressure | |
E Result Path: s223:hasProperty | |
E Message: Value does not have class s223:Property | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:class s223:ConnectionPoint ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:name Literal("Inlet or Outlet point property") ; sh:path s223:hasConnectionPoint ; sh:severity sh:Info ] | |
E Focus Node: sample:Pump_1 | |
E Result Path: s223:hasConnectionPoint | |
E Message: Less than 2 values on sample:Pump_1->s223:hasConnectionPoint | |
E | |
E assert False | |
test_validation.py:85: AssertionError | |
------------------------------ Captured log call ------------------------------- | |
INFO test_validation:test_validation.py:75 Validating data definition of ../data/sample.ttl ( 77475 triples) | |
________________ test_data_validation[../data/mr33-sample.ttl] _________________ | |
data_file = '../data/mr33-sample.ttl' | |
def test_data_validation(data_file): | |
""" | |
Validates the graphs in the data/ folder against the data and model shapes | |
WARNS but does not fail the test on a validation error for a shape with sh:Info severity | |
""" | |
env = ontoenv.OntoEnv() | |
data_graph = rdflib.Graph() | |
# validate each data file independently | |
data_graph.parse(data_file, format="turtle") | |
# load in all dependent data validation and model definition shapes | |
env.import_dependencies(data_graph) | |
logger.info("Validating data definition of %s ( %d triples)", data_file, len(data_graph)) | |
#data_graph.expand('owlrl', backend='allegro') | |
#valid, x, res_text = pyshacl.validate( | |
# data_graph=data_graph, advanced=True, js=True, inference="owlrl", allow_warnings=True | |
#) | |
valid, x, res_text = pyshacl.validate( | |
data_graph=data_graph, advanced=True, js=True, allow_warnings=True | |
) | |
if not valid: | |
data_graph.serialize(f"/tmp/{os.path.basename(data_file)}", format="ttl") | |
> assert valid, f"{data_file}:\n{res_text}" | |
E AssertionError: ../data/mr33-sample.ttl: | |
E Validation Report | |
E Conforms: False | |
E Results (13): | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: mr33:C1 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: mr33:C2 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: mr33:C4 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: mr33:C3 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: mr33:C1 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: mr33:C2 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: mr33:C4 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: mr33:C3 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Constraint Violation in ClassConstraintComponent (http://www.w3.org/ns/shacl#ClassConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:hasPropertyShape | |
E Focus Node: mr33:Damper_1 | |
E Value Node: mr33:Damper_1PositionCommand | |
E Result Path: s223:hasProperty | |
E Message: Value does not have class s223:Property | |
E Constraint Violation in ClassConstraintComponent (http://www.w3.org/ns/shacl#ClassConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:hasPropertyShape | |
E Focus Node: mr33:AirFlowStation | |
E Value Node: mr33:AirFlowStation-FlowRateProperty | |
E Result Path: s223:hasProperty | |
E Message: Value does not have class s223:Property | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:class s223:ConnectionPoint ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:name Literal("Inlet or Outlet point property") ; sh:path s223:hasConnectionPoint ; sh:severity sh:Info ] | |
E Focus Node: mr33:AirFlowStation | |
E Result Path: s223:hasConnectionPoint | |
E Message: Less than 2 values on mr33:AirFlowStation->s223:hasConnectionPoint | |
E Constraint Violation in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:class s223:ConnectionPoint ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:name Literal("Air inlet point") ; sh:path s223:hasConnectionPoint ] | |
E Focus Node: mr33:Damper_1 | |
E Result Path: s223:hasConnectionPoint | |
E Message: Less than 2 values on mr33:Damper_1->s223:hasConnectionPoint | |
E Constraint Violation in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ sh:class s223:Domain ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:hasDomain ] | |
E Focus Node: mr33:Zone_1 | |
E Result Path: s223:hasDomain | |
E Message: Less than 1 values on mr33:Zone_1->s223:hasDomain | |
E | |
E assert False | |
test_validation.py:85: AssertionError | |
------------------------------ Captured log call ------------------------------- | |
INFO test_validation:test_validation.py:75 Validating data definition of ../data/mr33-sample.ttl ( 77449 triples) | |
_______________ test_data_validation[../data/FigureA-12-PS.ttl] ________________ | |
data_file = '../data/FigureA-12-PS.ttl' | |
def test_data_validation(data_file): | |
""" | |
Validates the graphs in the data/ folder against the data and model shapes | |
WARNS but does not fail the test on a validation error for a shape with sh:Info severity | |
""" | |
env = ontoenv.OntoEnv() | |
data_graph = rdflib.Graph() | |
# validate each data file independently | |
data_graph.parse(data_file, format="turtle") | |
# load in all dependent data validation and model definition shapes | |
env.import_dependencies(data_graph) | |
logger.info("Validating data definition of %s ( %d triples)", data_file, len(data_graph)) | |
#data_graph.expand('owlrl', backend='allegro') | |
#valid, x, res_text = pyshacl.validate( | |
# data_graph=data_graph, advanced=True, js=True, inference="owlrl", allow_warnings=True | |
#) | |
valid, x, res_text = pyshacl.validate( | |
data_graph=data_graph, advanced=True, js=True, allow_warnings=True | |
) | |
if not valid: | |
data_graph.serialize(f"/tmp/{os.path.basename(data_file)}", format="ttl") | |
> assert valid, f"{data_file}:\n{res_text}" | |
E AssertionError: ../data/FigureA-12-PS.ttl: | |
E Validation Report | |
E Conforms: False | |
E Results (9): | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00050 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00011 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00037 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00066 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00074 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00053 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00034 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00059 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Constraint Violation in MaxCountConstraintComponent (http://www.w3.org/ns/shacl#MaxCountConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ sh:maxCount Literal("1", datatype=xsd:integer) ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:or ( [ sh:class s223:ConnectionPoint ] [ sh:class s223:SystemConnectionPoint ] [ sh:class s223:Junction ] ) ; sh:path s223:mapsTo ] | |
E Focus Node: ex:00009 | |
E Result Path: s223:mapsTo | |
E Message: More than 1 values on ex:00009->s223:mapsTo | |
E | |
E assert False | |
test_validation.py:85: AssertionError | |
------------------------------ Captured log call ------------------------------- | |
INFO test_validation:test_validation.py:75 Validating data definition of ../data/FigureA-12-PS.ttl ( 78028 triples) | |
____________ test_data_validation[../data/junction-testcase-b.ttl] _____________ | |
data_file = '../data/junction-testcase-b.ttl' | |
def test_data_validation(data_file): | |
""" | |
Validates the graphs in the data/ folder against the data and model shapes | |
WARNS but does not fail the test on a validation error for a shape with sh:Info severity | |
""" | |
env = ontoenv.OntoEnv() | |
data_graph = rdflib.Graph() | |
# validate each data file independently | |
data_graph.parse(data_file, format="turtle") | |
# load in all dependent data validation and model definition shapes | |
env.import_dependencies(data_graph) | |
logger.info("Validating data definition of %s ( %d triples)", data_file, len(data_graph)) | |
#data_graph.expand('owlrl', backend='allegro') | |
#valid, x, res_text = pyshacl.validate( | |
# data_graph=data_graph, advanced=True, js=True, inference="owlrl", allow_warnings=True | |
#) | |
valid, x, res_text = pyshacl.validate( | |
data_graph=data_graph, advanced=True, js=True, allow_warnings=True | |
) | |
if not valid: | |
data_graph.serialize(f"/tmp/{os.path.basename(data_file)}", format="ttl") | |
> assert valid, f"{data_file}:\n{res_text}" | |
E AssertionError: ../data/junction-testcase-b.ttl: | |
E Validation Report | |
E Conforms: False | |
E Results (40): | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:VCPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:VCPin2 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:ChillerCPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP2CPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:VCPin1 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:FMtoHeatDumpCPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HeatDumpCPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:ChillerCPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:FMCPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP1CPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:CP3 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:FMtoHeatDumpCPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP1CPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HeatDumpCPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP2CPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:CP2 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jtb:Damper1InletConnectionPoint_1 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:FMCPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:VCPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:VCPin2 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP2CPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:ChillerCPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:CP3 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:FMtoHeatDumpCPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP1CPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:HeatDumpCPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:CP2 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jtb:Damper1InletConnectionPoint_1 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:FMCPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:SubSystem1 | |
E Value Node: jt:TSout | |
E Result Path: s223:contains | |
E Message: Node jt:TSout does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:SubSystem1 | |
E Value Node: jt:TSin | |
E Result Path: s223:contains | |
E Message: Node jt:TSin does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:SubSystem1 | |
E Value Node: jt:FM1 | |
E Result Path: s223:contains | |
E Message: Node jt:FM1 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:System1 | |
E Value Node: jt:FMtoHeatDump | |
E Result Path: s223:contains | |
E Message: Node jt:FMtoHeatDump does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:System1 | |
E Value Node: jt:TSoutHeatDump | |
E Result Path: s223:contains | |
E Message: Node jt:TSoutHeatDump does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:System1 | |
E Value Node: jt:HHWP1 | |
E Result Path: s223:contains | |
E Message: Node jt:HHWP1 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:System1 | |
E Value Node: jt:HHWP2 | |
E Result Path: s223:contains | |
E Message: Node jt:HHWP2 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Warning | |
E Source Shape: [ sh:maxCount Literal("2", datatype=xsd:integer) ; sh:message Literal("Segment is missing one or both endpoints (Junction or ConnectionPoint)") ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:or ( [ sh:class s223:Junction ] [ sh:class s223:ConnectionPoint ] ) ; sh:path s223:lnx ; sh:qualifiedMaxCount Literal("1", datatype=xsd:integer) ; sh:qualifiedValueShape [ sh:class s223:ConnectionPoint ] ; sh:severity sh:Warning ] | |
E Focus Node: jt:Segment2 | |
E Result Path: s223:lnx | |
E Message: Segment is missing one or both endpoints (Junction or ConnectionPoint) | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:class s223:ConnectionPoint ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:name Literal("Inlet or Outlet point property") ; sh:path s223:hasConnectionPoint ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP2 | |
E Result Path: s223:hasConnectionPoint | |
E Message: Less than 2 values on jt:HHWP2->s223:hasConnectionPoint | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:class s223:ConnectionPoint ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:name Literal("Inlet or Outlet point property") ; sh:path s223:hasConnectionPoint ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP1 | |
E Result Path: s223:hasConnectionPoint | |
E Message: Less than 2 values on jt:HHWP1->s223:hasConnectionPoint | |
E Constraint Violation in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:class s223:ConnectionPoint ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:name Literal("Air inlet point") ; sh:path s223:hasConnectionPoint ] | |
E Focus Node: jtb:Damper_1 | |
E Result Path: s223:hasConnectionPoint | |
E Message: Less than 2 values on jtb:Damper_1->s223:hasConnectionPoint | |
E | |
E assert False | |
test_validation.py:85: AssertionError | |
------------------------------ Captured log call ------------------------------- | |
INFO test_validation:test_validation.py:75 Validating data definition of ../data/junction-testcase-b.ttl ( 77578 triples) | |
____________________ test_data_validation[../data/IBAL.ttl] ____________________ | |
self = <pyshacl.validate.Validator object at 0x7fa735276af0> | |
def run(self): | |
if self.target_graph is not None: | |
the_target_graph = self.target_graph | |
else: | |
has_cloned = False | |
if self.ont_graph is not None: | |
# creates a copy of self.data_graph, doesn't modify it | |
the_target_graph = self.mix_in_ontology() | |
has_cloned = True | |
else: | |
the_target_graph = self.data_graph | |
inference_option = self.options.get('inference', 'none') | |
if inference_option and not self.pre_inferenced and str(inference_option) != "none": | |
if not has_cloned and not self.inplace: | |
the_target_graph = clone_graph(the_target_graph) | |
self._run_pre_inference(the_target_graph, inference_option, self.logger) | |
self.pre_inferenced = True | |
self._target_graph = the_target_graph | |
shapes = self.shacl_graph.shapes # This property getter triggers shapes harvest. | |
iterate_rules = self.options.get("iterate_rules", False) | |
if self.options['advanced']: | |
target_types = gather_target_types(self.shacl_graph) | |
advanced = { | |
'functions': gather_functions(self.shacl_graph), | |
'rules': gather_rules(self.shacl_graph, iterate_rules=iterate_rules), | |
} | |
for s in shapes: | |
s.set_advanced(True) | |
apply_target_types(target_types) | |
else: | |
advanced = {} | |
if isinstance(the_target_graph, (rdflib.Dataset, rdflib.ConjunctiveGraph)): | |
named_graphs = [ | |
rdflib.Graph(the_target_graph.store, i, namespace_manager=the_target_graph.namespace_manager) | |
if not isinstance(i, rdflib.Graph) | |
else i | |
for i in the_target_graph.store.contexts(None) | |
] | |
else: | |
named_graphs = [the_target_graph] | |
reports = [] | |
abort_on_first: bool = bool(self.options.get("abort_on_first", False)) | |
allow_warnings: bool = bool(self.options.get("allow_warnings", False)) | |
non_conformant = False | |
aborted = False | |
for g in named_graphs: | |
if advanced: | |
apply_functions(advanced['functions'], g) | |
apply_rules(advanced['rules'], g, iterate=iterate_rules) | |
try: | |
for s in shapes: | |
> _is_conform, _reports = s.validate(g, abort_on_first=abort_on_first, allow_warnings=allow_warnings) | |
venv/lib/python3.9/site-packages/pyshacl/validate.py:258: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <pyshacl.shape.Shape object at 0x7fa731ca62c0> | |
target_graph = <Graph identifier=Nb7222cd0f5264a229eb8e5c2f6063f0d (<class 'rdflib.graph.Graph'>)> | |
focus = {rdflib.term.BNode('ub129bL1018C18'), rdflib.term.BNode('ub129bL1024C9'), rdflib.term.BNode('ub129bL1505C29'), rdflib.term.BNode('ub129bL1508C21'), rdflib.term.BNode('ub129bL1511C29'), rdflib.term.BNode('ub129bL1515C21'), ...} | |
abort_on_first = False, allow_warnings = True | |
_evaluation_path = [<pyshacl.shape.Shape object at 0x7fa731ca62c0>] | |
def validate( | |
self, | |
target_graph: GraphLike, | |
focus: Optional[ | |
Union[ | |
Tuple[Union[URIRef, BNode]], | |
List[Union[URIRef, BNode]], | |
Set[Union[URIRef, BNode]], | |
Union[URIRef, BNode], | |
] | |
] = None, | |
abort_on_first: Optional[bool] = False, | |
allow_warnings: Optional[bool] = False, | |
_evaluation_path: Optional[List] = None, | |
): | |
if self.deactivated: | |
return True, [] | |
if focus is not None: | |
if not isinstance(focus, (tuple, list, set)): | |
focus = [focus] | |
else: | |
focus = self.focus_nodes(target_graph) | |
if len(focus) < 1: | |
# Its possible for shapes to have _no_ focus nodes | |
# (they are called in other ways) | |
return True, [] | |
if _evaluation_path is None: | |
_evaluation_path = [] | |
elif len(_evaluation_path) >= 30: | |
# 27 is the depth required to successfully do the meta-shacl test on shacl.ttl | |
path_str = "->".join((str(e) for e in _evaluation_path)) | |
raise ReportableRuntimeError("Evaluation path too deep!\n{}".format(path_str)) | |
# Lazy import here to avoid an import loop | |
CONSTRAINT_PARAMETERS, PARAMETER_MAP = getattr(module, 'CONSTRAINT_PARAMS', (None, None)) | |
if not CONSTRAINT_PARAMETERS: | |
from .constraints import ALL_CONSTRAINT_PARAMETERS, CONSTRAINT_PARAMETERS_MAP | |
setattr(module, 'CONSTRAINT_PARAMS', (ALL_CONSTRAINT_PARAMETERS, CONSTRAINT_PARAMETERS_MAP)) | |
CONSTRAINT_PARAMETERS = ALL_CONSTRAINT_PARAMETERS | |
PARAMETER_MAP = CONSTRAINT_PARAMETERS_MAP | |
if self.sg.js_enabled: | |
search_parameters = CONSTRAINT_PARAMETERS.copy() | |
constraint_map = PARAMETER_MAP.copy() | |
from pyshacl.extras.js.constraint import JSConstraint, SH_js | |
search_parameters.append(SH_js) | |
constraint_map[SH_js] = JSConstraint | |
else: | |
search_parameters = CONSTRAINT_PARAMETERS | |
constraint_map = PARAMETER_MAP | |
parameters = (p for p, v in self.sg.predicate_objects(self.node) if p in search_parameters) | |
reports = [] | |
focus_value_nodes = self.value_nodes(target_graph, focus) | |
filter_reports: bool = False | |
allow_conform: bool = False | |
if allow_warnings: | |
if self.severity in (SH_Warning, SH_Info): | |
allow_conform = True | |
else: | |
filter_reports = True | |
non_conformant = False | |
done_constraints = set() | |
run_count = 0 | |
_evaluation_path.append(self) | |
constraint_components = [constraint_map[p] for p in iter(parameters)] | |
for constraint_component in constraint_components: # type: Type[ConstraintComponent] | |
if constraint_component in done_constraints: | |
continue | |
try: | |
c = constraint_component(self) | |
except ConstraintLoadWarning as w: | |
self.logger.warning(repr(w)) | |
continue | |
except ConstraintLoadError as e: | |
self.logger.error(repr(e)) | |
raise e | |
_e_p = _evaluation_path[:] | |
_e_p.append(c) | |
_is_conform, _r = c.evaluate(target_graph, focus_value_nodes, _e_p) | |
if _is_conform or allow_conform: | |
... | |
elif filter_reports: | |
all_warn = True | |
for _r_inner in _r: | |
v_str, v_node, v_parts = _r_inner | |
severity_bits = list(filter(lambda p: p[0] == v_node and p[1] == SH_resultSeverity, v_parts)) | |
if severity_bits: | |
all_warn = all_warn and severity_bits[0][2] in (SH_Warning, SH_Info) | |
non_conformant = not all_warn | |
else: | |
non_conformant = non_conformant or (not _is_conform) | |
reports.extend(_r) | |
run_count += 1 | |
done_constraints.add(constraint_component) | |
if non_conformant and abort_on_first: | |
break | |
applicable_custom_constraints = self.find_custom_constraints() | |
for a in applicable_custom_constraints: | |
if non_conformant and abort_on_first: | |
break | |
_e_p = _evaluation_path[:] | |
> validator = a.make_validator_for_shape(self) | |
venv/lib/python3.9/site-packages/pyshacl/shape.py:611: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <pyshacl.constraints.constraint_component.CustomConstraintComponent object at 0x7fa7392e57c0> | |
shape = <pyshacl.shape.Shape object at 0x7fa731ca62c0> | |
def make_validator_for_shape(self, shape: 'Shape'): | |
> raise NotImplementedError() | |
E NotImplementedError | |
venv/lib/python3.9/site-packages/pyshacl/constraints/constraint_component.py:406: NotImplementedError | |
During handling of the above exception, another exception occurred: | |
data_file = '../data/IBAL.ttl' | |
def test_data_validation(data_file): | |
""" | |
Validates the graphs in the data/ folder against the data and model shapes | |
WARNS but does not fail the test on a validation error for a shape with sh:Info severity | |
""" | |
env = ontoenv.OntoEnv() | |
data_graph = rdflib.Graph() | |
# validate each data file independently | |
data_graph.parse(data_file, format="turtle") | |
# load in all dependent data validation and model definition shapes | |
env.import_dependencies(data_graph) | |
logger.info("Validating data definition of %s ( %d triples)", data_file, len(data_graph)) | |
#data_graph.expand('owlrl', backend='allegro') | |
#valid, x, res_text = pyshacl.validate( | |
# data_graph=data_graph, advanced=True, js=True, inference="owlrl", allow_warnings=True | |
#) | |
> valid, x, res_text = pyshacl.validate( | |
data_graph=data_graph, advanced=True, js=True, allow_warnings=True | |
) | |
test_validation.py:80: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
venv/lib/python3.9/site-packages/pyshacl/validate.py:414: in validate | |
conforms, report_graph, report_text = validator.run() | |
venv/lib/python3.9/site-packages/pyshacl/validate.py:268: in run | |
unapply_functions(advanced['functions'], g) | |
venv/lib/python3.9/site-packages/pyshacl/functions/__init__.py:108: in unapply_functions | |
f.unapply(data_graph) | |
venv/lib/python3.9/site-packages/pyshacl/functions/shacl_function.py:197: in unapply | |
unregister_custom_function(self.node, self.execute_from_sparql) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
uri = rdflib.term.URIRef('http://datashapes.org/dash#toString') | |
func = <bound method SPARQLFunction.execute_from_sparql of <pyshacl.functions.shacl_function.SPARQLFunction object at 0x7fa731c11820>> | |
def unregister_custom_function(uri, func): | |
if _CUSTOM_FUNCTIONS.get(uri, (None, None))[0] != func: | |
> raise ValueError("This function is not registered as %s" % uri.n3()) | |
E ValueError: This function is not registered as <http://datashapes.org/dash#toString> | |
venv/lib/python3.9/site-packages/rdflib/plugins/sparql/operators.py:616: ValueError | |
------------------------------ Captured log call ------------------------------- | |
INFO test_validation:test_validation.py:75 Validating data definition of ../data/IBAL.ttl ( 81716 triples) | |
______________ test_data_validation[../data/branch-20-sample.ttl] ______________ | |
data_file = '../data/branch-20-sample.ttl' | |
def test_data_validation(data_file): | |
""" | |
Validates the graphs in the data/ folder against the data and model shapes | |
WARNS but does not fail the test on a validation error for a shape with sh:Info severity | |
""" | |
env = ontoenv.OntoEnv() | |
data_graph = rdflib.Graph() | |
# validate each data file independently | |
data_graph.parse(data_file, format="turtle") | |
# load in all dependent data validation and model definition shapes | |
env.import_dependencies(data_graph) | |
logger.info("Validating data definition of %s ( %d triples)", data_file, len(data_graph)) | |
#data_graph.expand('owlrl', backend='allegro') | |
#valid, x, res_text = pyshacl.validate( | |
# data_graph=data_graph, advanced=True, js=True, inference="owlrl", allow_warnings=True | |
#) | |
valid, x, res_text = pyshacl.validate( | |
data_graph=data_graph, advanced=True, js=True, allow_warnings=True | |
) | |
if not valid: | |
data_graph.serialize(f"/tmp/{os.path.basename(data_file)}", format="ttl") | |
> assert valid, f"{data_file}:\n{res_text}" | |
E AssertionError: ../data/branch-20-sample.ttl: | |
E Validation Report | |
E Conforms: False | |
E Results (12): | |
E Constraint Violation in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: qudt:Concept-rdfs_label | |
E Focus Node: b20:Fan20InletPressureValue | |
E Result Path: rdfs:label | |
E Message: Less than 1 values on b20:Fan20InletPressureValue->rdfs:label | |
E Constraint Violation in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: qudt:Concept-rdfs_label | |
E Focus Node: b20:Fan20SpeedValue | |
E Result Path: rdfs:label | |
E Message: Less than 1 values on b20:Fan20SpeedValue->rdfs:label | |
E Constraint Violation in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: qudt:Concept-rdfs_label | |
E Focus Node: b20:Fan20OutletFlowRateValue | |
E Result Path: rdfs:label | |
E Message: Less than 1 values on b20:Fan20OutletFlowRateValue->rdfs:label | |
E Constraint Violation in ClassConstraintComponent (http://www.w3.org/ns/shacl#ClassConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:hasPropertyShape | |
E Focus Node: b20:Fan20OutletConnectionPoint | |
E Value Node: b20:Fan20OutletPressure | |
E Result Path: s223:hasProperty | |
E Message: Value does not have class s223:Property | |
E Constraint Violation in ClassConstraintComponent (http://www.w3.org/ns/shacl#ClassConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:hasPropertyShape | |
E Focus Node: b20:Fan20OutletConnectionPoint | |
E Value Node: b20:Fan20OutletFlowRate | |
E Result Path: s223:hasProperty | |
E Message: Value does not have class s223:Property | |
E Constraint Violation in ClassConstraintComponent (http://www.w3.org/ns/shacl#ClassConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:hasPropertyShape | |
E Focus Node: b20:Fan20InletConnectionPoint | |
E Value Node: b20:Fan20InletPressure | |
E Result Path: s223:hasProperty | |
E Message: Value does not have class s223:Property | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: b20:Fan20OutletConnectionPoint | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: b20:Fan20InletConnectionPoint | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: b20:Fan20OutletConnectionPoint | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: b20:Fan20InletConnectionPoint | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: qudt:Quantifiable-qudt_value | |
E Focus Node: b20:SIValue | |
E Value Node: Literal("19123" = None, datatype=qudt:valueUnion) | |
E Result Path: qudt:value | |
E Message: Node Literal("19123" = None, datatype=qudt:valueUnion) does not conform to one or more shapes in [ sh:datatype xsd:float ] , [ sh:datatype xsd:double ] , [ sh:datatype xsd:integer ] , [ sh:datatype xsd:decimal ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: qudt:Quantifiable-qudt_value | |
E Focus Node: b20:USValue | |
E Value Node: Literal("2.7" = None, datatype=qudt:valueUnion) | |
E Result Path: qudt:value | |
E Message: Node Literal("2.7" = None, datatype=qudt:valueUnion) does not conform to one or more shapes in [ sh:datatype xsd:float ] , [ sh:datatype xsd:double ] , [ sh:datatype xsd:integer ] , [ sh:datatype xsd:decimal ] | |
E | |
E assert False | |
test_validation.py:85: AssertionError | |
------------------------------ Captured log call ------------------------------- | |
INFO test_validation:test_validation.py:75 Validating data definition of ../data/branch-20-sample.ttl ( 77464 triples) | |
_____________ test_data_validation[../data/junction-testcase.ttl] ______________ | |
data_file = '../data/junction-testcase.ttl' | |
def test_data_validation(data_file): | |
""" | |
Validates the graphs in the data/ folder against the data and model shapes | |
WARNS but does not fail the test on a validation error for a shape with sh:Info severity | |
""" | |
env = ontoenv.OntoEnv() | |
data_graph = rdflib.Graph() | |
# validate each data file independently | |
data_graph.parse(data_file, format="turtle") | |
# load in all dependent data validation and model definition shapes | |
env.import_dependencies(data_graph) | |
logger.info("Validating data definition of %s ( %d triples)", data_file, len(data_graph)) | |
#data_graph.expand('owlrl', backend='allegro') | |
#valid, x, res_text = pyshacl.validate( | |
# data_graph=data_graph, advanced=True, js=True, inference="owlrl", allow_warnings=True | |
#) | |
valid, x, res_text = pyshacl.validate( | |
data_graph=data_graph, advanced=True, js=True, allow_warnings=True | |
) | |
if not valid: | |
data_graph.serialize(f"/tmp/{os.path.basename(data_file)}", format="ttl") | |
> assert valid, f"{data_file}:\n{res_text}" | |
E AssertionError: ../data/junction-testcase.ttl: | |
E Validation Report | |
E Conforms: False | |
E Results (37): | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:VCPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:VCPin2 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP2CPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:ChillerCPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:CP3 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:FMtoHeatDumpCPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP1CPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:HeatDumpCPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:CP2 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:FMCPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:VCPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:VCPin2 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:ChillerCPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP2CPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:VCPin1 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:FMtoHeatDumpCPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HeatDumpCPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:ChillerCPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:FMCPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP1CPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:CP3 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:FMtoHeatDumpCPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP1CPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HeatDumpCPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP2CPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:CP2 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:FMCPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:SubSystem1 | |
E Value Node: jt:TSout | |
E Result Path: s223:contains | |
E Message: Node jt:TSout does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:SubSystem1 | |
E Value Node: jt:TSin | |
E Result Path: s223:contains | |
E Message: Node jt:TSin does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:SubSystem1 | |
E Value Node: jt:FM1 | |
E Result Path: s223:contains | |
E Message: Node jt:FM1 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:System1 | |
E Value Node: jt:FMtoHeatDump | |
E Result Path: s223:contains | |
E Message: Node jt:FMtoHeatDump does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:System1 | |
E Value Node: jt:TSoutHeatDump | |
E Result Path: s223:contains | |
E Message: Node jt:TSoutHeatDump does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:System1 | |
E Value Node: jt:HHWP1 | |
E Result Path: s223:contains | |
E Message: Node jt:HHWP1 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:System1 | |
E Value Node: jt:HHWP2 | |
E Result Path: s223:contains | |
E Message: Node jt:HHWP2 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Warning | |
E Source Shape: [ sh:maxCount Literal("2", datatype=xsd:integer) ; sh:message Literal("Segment is missing one or both endpoints (Junction or ConnectionPoint)") ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:or ( [ sh:class s223:Junction ] [ sh:class s223:ConnectionPoint ] ) ; sh:path s223:lnx ; sh:qualifiedMaxCount Literal("1", datatype=xsd:integer) ; sh:qualifiedValueShape [ sh:class s223:ConnectionPoint ] ; sh:severity sh:Warning ] | |
E Focus Node: jt:Segment2 | |
E Result Path: s223:lnx | |
E Message: Segment is missing one or both endpoints (Junction or ConnectionPoint) | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:class s223:ConnectionPoint ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:name Literal("Inlet or Outlet point property") ; sh:path s223:hasConnectionPoint ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP2 | |
E Result Path: s223:hasConnectionPoint | |
E Message: Less than 2 values on jt:HHWP2->s223:hasConnectionPoint | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:class s223:ConnectionPoint ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:name Literal("Inlet or Outlet point property") ; sh:path s223:hasConnectionPoint ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP1 | |
E Result Path: s223:hasConnectionPoint | |
E Message: Less than 2 values on jt:HHWP1->s223:hasConnectionPoint | |
E | |
E assert False | |
test_validation.py:85: AssertionError | |
------------------------------ Captured log call ------------------------------- | |
INFO test_validation:test_validation.py:75 Validating data definition of ../data/junction-testcase.ttl ( 77565 triples) | |
____________ test_data_validation[../data/junction-testcase-c.ttl] _____________ | |
data_file = '../data/junction-testcase-c.ttl' | |
def test_data_validation(data_file): | |
""" | |
Validates the graphs in the data/ folder against the data and model shapes | |
WARNS but does not fail the test on a validation error for a shape with sh:Info severity | |
""" | |
env = ontoenv.OntoEnv() | |
data_graph = rdflib.Graph() | |
# validate each data file independently | |
data_graph.parse(data_file, format="turtle") | |
# load in all dependent data validation and model definition shapes | |
env.import_dependencies(data_graph) | |
logger.info("Validating data definition of %s ( %d triples)", data_file, len(data_graph)) | |
#data_graph.expand('owlrl', backend='allegro') | |
#valid, x, res_text = pyshacl.validate( | |
# data_graph=data_graph, advanced=True, js=True, inference="owlrl", allow_warnings=True | |
#) | |
valid, x, res_text = pyshacl.validate( | |
data_graph=data_graph, advanced=True, js=True, allow_warnings=True | |
) | |
if not valid: | |
data_graph.serialize(f"/tmp/{os.path.basename(data_file)}", format="ttl") | |
> assert valid, f"{data_file}:\n{res_text}" | |
E AssertionError: ../data/junction-testcase-c.ttl: | |
E Validation Report | |
E Conforms: False | |
E Results (43): | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:VCPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:VCPin2 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP2CPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jtc:Damper1InletConnectionPoint_1 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:ChillerCPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:CP3 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:FMtoHeatDumpCPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP1CPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:HeatDumpCPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:CP2 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jtb:Damper1InletConnectionPoint_1 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: jt:FMCPout | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:VCPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:VCPin2 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:ChillerCPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP2CPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:VCPin1 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:FMtoHeatDumpCPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HeatDumpCPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jtc:Damper1InletConnectionPoint_1 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:ChillerCPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:FMCPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP1CPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:CP3 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:FMtoHeatDumpCPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP1CPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HeatDumpCPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP2CPin | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:CP2 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jtb:Damper1InletConnectionPoint_1 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: jt:FMCPout | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:SubSystem1 | |
E Value Node: jt:TSout | |
E Result Path: s223:contains | |
E Message: Node jt:TSout does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:SubSystem1 | |
E Value Node: jt:TSin | |
E Result Path: s223:contains | |
E Message: Node jt:TSin does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:SubSystem1 | |
E Value Node: jt:FM1 | |
E Result Path: s223:contains | |
E Message: Node jt:FM1 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:System1 | |
E Value Node: jt:FMtoHeatDump | |
E Result Path: s223:contains | |
E Message: Node jt:FMtoHeatDump does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:System1 | |
E Value Node: jt:TSoutHeatDump | |
E Result Path: s223:contains | |
E Message: Node jt:TSoutHeatDump does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:System1 | |
E Value Node: jt:HHWP1 | |
E Result Path: s223:contains | |
E Message: Node jt:HHWP1 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: jt:System1 | |
E Value Node: jt:HHWP2 | |
E Result Path: s223:contains | |
E Message: Node jt:HHWP2 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Warning | |
E Source Shape: [ sh:maxCount Literal("2", datatype=xsd:integer) ; sh:message Literal("Segment is missing one or both endpoints (Junction or ConnectionPoint)") ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:or ( [ sh:class s223:Junction ] [ sh:class s223:ConnectionPoint ] ) ; sh:path s223:lnx ; sh:qualifiedMaxCount Literal("1", datatype=xsd:integer) ; sh:qualifiedValueShape [ sh:class s223:ConnectionPoint ] ; sh:severity sh:Warning ] | |
E Focus Node: jt:Segment2 | |
E Result Path: s223:lnx | |
E Message: Segment is missing one or both endpoints (Junction or ConnectionPoint) | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:class s223:ConnectionPoint ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:name Literal("Inlet or Outlet point property") ; sh:path s223:hasConnectionPoint ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP2 | |
E Result Path: s223:hasConnectionPoint | |
E Message: Less than 2 values on jt:HHWP2->s223:hasConnectionPoint | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:class s223:ConnectionPoint ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:name Literal("Inlet or Outlet point property") ; sh:path s223:hasConnectionPoint ; sh:severity sh:Info ] | |
E Focus Node: jt:HHWP1 | |
E Result Path: s223:hasConnectionPoint | |
E Message: Less than 2 values on jt:HHWP1->s223:hasConnectionPoint | |
E Constraint Violation in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:class s223:ConnectionPoint ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:name Literal("Air inlet point") ; sh:path s223:hasConnectionPoint ] | |
E Focus Node: jtc:Damper_1 | |
E Result Path: s223:hasConnectionPoint | |
E Message: Less than 2 values on jtc:Damper_1->s223:hasConnectionPoint | |
E Constraint Violation in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:class s223:ConnectionPoint ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:name Literal("Air inlet point") ; sh:path s223:hasConnectionPoint ] | |
E Focus Node: jtb:Damper_1 | |
E Result Path: s223:hasConnectionPoint | |
E Message: Less than 2 values on jtb:Damper_1->s223:hasConnectionPoint | |
E | |
E assert False | |
test_validation.py:85: AssertionError | |
------------------------------ Captured log call ------------------------------- | |
INFO test_validation:test_validation.py:75 Validating data definition of ../data/junction-testcase-c.ttl ( 77592 triples) | |
_______________ test_data_validation[../data/PS-Figure A-9.ttl] ________________ | |
data_file = '../data/PS-Figure A-9.ttl' | |
def test_data_validation(data_file): | |
""" | |
Validates the graphs in the data/ folder against the data and model shapes | |
WARNS but does not fail the test on a validation error for a shape with sh:Info severity | |
""" | |
env = ontoenv.OntoEnv() | |
data_graph = rdflib.Graph() | |
# validate each data file independently | |
data_graph.parse(data_file, format="turtle") | |
# load in all dependent data validation and model definition shapes | |
env.import_dependencies(data_graph) | |
logger.info("Validating data definition of %s ( %d triples)", data_file, len(data_graph)) | |
#data_graph.expand('owlrl', backend='allegro') | |
#valid, x, res_text = pyshacl.validate( | |
# data_graph=data_graph, advanced=True, js=True, inference="owlrl", allow_warnings=True | |
#) | |
valid, x, res_text = pyshacl.validate( | |
data_graph=data_graph, advanced=True, js=True, allow_warnings=True | |
) | |
if not valid: | |
data_graph.serialize(f"/tmp/{os.path.basename(data_file)}", format="ttl") | |
> assert valid, f"{data_file}:\n{res_text}" | |
E AssertionError: ../data/PS-Figure A-9.ttl: | |
E Validation Report | |
E Conforms: False | |
E Results (63): | |
E Constraint Violation in NotConstraintComponent (http://www.w3.org/ns/shacl#NotConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:Concept | |
E Focus Node: ex:00011 | |
E Value Node: ex:00011 | |
E Message: Node ex:00011 conforms to shape [ rdf:type sh:PropertyShape ; sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:message Literal("You cannot have an instance of an abstract class") ; sh:path ( rdf:type s223:abstract ) ] | |
E Constraint Violation in NotConstraintComponent (http://www.w3.org/ns/shacl#NotConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:Concept | |
E Focus Node: ex:00036 | |
E Value Node: ex:00036 | |
E Message: Node ex:00036 conforms to shape [ rdf:type sh:PropertyShape ; sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:message Literal("You cannot have an instance of an abstract class") ; sh:path ( rdf:type s223:abstract ) ] | |
E Constraint Violation in NotConstraintComponent (http://www.w3.org/ns/shacl#NotConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:Concept | |
E Focus Node: ex:00047 | |
E Value Node: ex:00047 | |
E Message: Node ex:00047 conforms to shape [ rdf:type sh:PropertyShape ; sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:message Literal("You cannot have an instance of an abstract class") ; sh:path ( rdf:type s223:abstract ) ] | |
E Constraint Violation in NotConstraintComponent (http://www.w3.org/ns/shacl#NotConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:Concept | |
E Focus Node: ex:00007 | |
E Value Node: ex:00007 | |
E Message: Node ex:00007 conforms to shape [ rdf:type sh:PropertyShape ; sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:message Literal("You cannot have an instance of an abstract class") ; sh:path ( rdf:type s223:abstract ) ] | |
E Constraint Violation in NotConstraintComponent (http://www.w3.org/ns/shacl#NotConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:Concept | |
E Focus Node: ex:00021 | |
E Value Node: ex:00021 | |
E Message: Node ex:00021 conforms to shape [ rdf:type sh:PropertyShape ; sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:message Literal("You cannot have an instance of an abstract class") ; sh:path ( rdf:type s223:abstract ) ] | |
E Constraint Violation in NotConstraintComponent (http://www.w3.org/ns/shacl#NotConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:Concept | |
E Focus Node: ex:00061 | |
E Value Node: ex:00061 | |
E Message: Node ex:00061 conforms to shape [ rdf:type sh:PropertyShape ; sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:message Literal("You cannot have an instance of an abstract class") ; sh:path ( rdf:type s223:abstract ) ] | |
E Constraint Violation in NotConstraintComponent (http://www.w3.org/ns/shacl#NotConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:Concept | |
E Focus Node: ex:00025 | |
E Value Node: ex:00025 | |
E Message: Node ex:00025 conforms to shape [ rdf:type sh:PropertyShape ; sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:message Literal("You cannot have an instance of an abstract class") ; sh:path ( rdf:type s223:abstract ) ] | |
E Constraint Violation in NotConstraintComponent (http://www.w3.org/ns/shacl#NotConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:Concept | |
E Focus Node: ex:00001 | |
E Value Node: ex:00001 | |
E Message: Node ex:00001 conforms to shape [ rdf:type sh:PropertyShape ; sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:message Literal("You cannot have an instance of an abstract class") ; sh:path ( rdf:type s223:abstract ) ] | |
E Constraint Violation in NotConstraintComponent (http://www.w3.org/ns/shacl#NotConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:Concept | |
E Focus Node: ex:00041 | |
E Value Node: ex:00041 | |
E Message: Node ex:00041 conforms to shape [ rdf:type sh:PropertyShape ; sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:message Literal("You cannot have an instance of an abstract class") ; sh:path ( rdf:type s223:abstract ) ] | |
E Constraint Violation in NotConstraintComponent (http://www.w3.org/ns/shacl#NotConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:Concept | |
E Focus Node: ex:00030 | |
E Value Node: ex:00030 | |
E Message: Node ex:00030 conforms to shape [ rdf:type sh:PropertyShape ; sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:message Literal("You cannot have an instance of an abstract class") ; sh:path ( rdf:type s223:abstract ) ] | |
E Constraint Violation in NotConstraintComponent (http://www.w3.org/ns/shacl#NotConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:Concept | |
E Focus Node: ex:00056 | |
E Value Node: ex:00056 | |
E Message: Node ex:00056 conforms to shape [ rdf:type sh:PropertyShape ; sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:message Literal("You cannot have an instance of an abstract class") ; sh:path ( rdf:type s223:abstract ) ] | |
E Constraint Violation in NotConstraintComponent (http://www.w3.org/ns/shacl#NotConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:Concept | |
E Focus Node: ex:00016 | |
E Value Node: ex:00016 | |
E Message: Node ex:00016 conforms to shape [ rdf:type sh:PropertyShape ; sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:message Literal("You cannot have an instance of an abstract class") ; sh:path ( rdf:type s223:abstract ) ] | |
E Constraint Violation in NotConstraintComponent (http://www.w3.org/ns/shacl#NotConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:Concept | |
E Focus Node: ex:00051 | |
E Value Node: ex:00051 | |
E Message: Node ex:00051 conforms to shape [ rdf:type sh:PropertyShape ; sh:hasValue Literal("true" = True, datatype=xsd:boolean) ; sh:message Literal("You cannot have an instance of an abstract class") ; sh:path ( rdf:type s223:abstract ) ] | |
E Constraint Violation in ClassConstraintComponent (http://www.w3.org/ns/shacl#ClassConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:hasPropertyShape | |
E Focus Node: ex:00023 | |
E Value Node: ex:mxtmp | |
E Result Path: s223:hasProperty | |
E Message: Value does not have class s223:Property | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00014 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00037 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00044 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00032 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00043 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00053 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00010 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00039 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00026 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00063 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00018 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00019 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00013 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00005 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00009 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00052 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00002 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00023 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00028 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00040 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00049 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00024 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00033 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00029 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00003 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00064 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00004 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00038 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00027 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00058 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00059 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ex:00048 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: ex:00005 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: ex:00002 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: ex:00003 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: ex:00004 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: ex:SupplySystem | |
E Value Node: ex:00050 | |
E Result Path: s223:contains | |
E Message: Node ex:00050 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: ex:SupplySystem | |
E Value Node: ex:00020 | |
E Result Path: s223:contains | |
E Message: Node ex:00020 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: ex:SupplySystem | |
E Value Node: ex:00006 | |
E Result Path: s223:contains | |
E Message: Node ex:00006 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: ex:SupplySystem | |
E Value Node: ex:00035 | |
E Result Path: s223:contains | |
E Message: Node ex:00035 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: ex:SupplySystem | |
E Value Node: ex:00015 | |
E Result Path: s223:contains | |
E Message: Node ex:00015 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: ex:SupplySystem | |
E Value Node: ex:00046 | |
E Result Path: s223:contains | |
E Message: Node ex:00046 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: ex:ReturnSystem | |
E Value Node: ex:00054 | |
E Result Path: s223:contains | |
E Message: Node ex:00054 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: ex:ReturnSystem | |
E Value Node: ex:00055 | |
E Result Path: s223:contains | |
E Message: Node ex:00055 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in OrConstraintComponent (http://www.w3.org/ns/shacl#OrConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ rdf:type sh:PropertyShape ; sh:minCount Literal("0", datatype=xsd:integer) ; sh:name Literal("system contains shape") ; sh:or ( [ sh:class s223:Device ] [ sh:class s223:System ] [ sh:class s223:Junction ] ) ; sh:path s223:contains ] | |
E Focus Node: ex:ReturnSystem | |
E Value Node: ex:00060 | |
E Result Path: s223:contains | |
E Message: Node ex:00060 does not conform to one or more shapes in [ sh:class s223:Device ] , [ sh:class s223:System ] , [ sh:class s223:Junction ] | |
E Constraint Violation in ClassConstraintComponent (http://www.w3.org/ns/shacl#ClassConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:hasPropertyShape | |
E Focus Node: ex:00006 | |
E Value Node: ex:oatmp | |
E Result Path: s223:hasProperty | |
E Message: Value does not have class s223:Property | |
E Constraint Violation in ClassConstraintComponent (http://www.w3.org/ns/shacl#ClassConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:hasPropertyShape | |
E Focus Node: ex:00054 | |
E Value Node: ex:ratmp | |
E Result Path: s223:hasProperty | |
E Message: Value does not have class s223:Property | |
E Constraint Violation in ClassConstraintComponent (http://www.w3.org/ns/shacl#ClassConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:hasPropertyShape | |
E Focus Node: ex:00060 | |
E Value Node: ex:exatmp | |
E Result Path: s223:hasProperty | |
E Message: Value does not have class s223:Property | |
E Constraint Violation in ClassConstraintComponent (http://www.w3.org/ns/shacl#ClassConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: s223:hasPropertyShape | |
E Focus Node: ex:00070 | |
E Value Node: ex:satmp | |
E Result Path: s223:hasProperty | |
E Message: Value does not have class s223:Property | |
E | |
E assert False | |
test_validation.py:85: AssertionError | |
------------------------------ Captured log call ------------------------------- | |
INFO test_validation:test_validation.py:75 Validating data definition of ../data/PS-Figure A-9.ttl ( 77845 triples) | |
______________ test_data_validation[../data/awkward-problem1.ttl] ______________ | |
data_file = '../data/awkward-problem1.ttl' | |
def test_data_validation(data_file): | |
""" | |
Validates the graphs in the data/ folder against the data and model shapes | |
WARNS but does not fail the test on a validation error for a shape with sh:Info severity | |
""" | |
env = ontoenv.OntoEnv() | |
data_graph = rdflib.Graph() | |
# validate each data file independently | |
data_graph.parse(data_file, format="turtle") | |
# load in all dependent data validation and model definition shapes | |
env.import_dependencies(data_graph) | |
logger.info("Validating data definition of %s ( %d triples)", data_file, len(data_graph)) | |
#data_graph.expand('owlrl', backend='allegro') | |
#valid, x, res_text = pyshacl.validate( | |
# data_graph=data_graph, advanced=True, js=True, inference="owlrl", allow_warnings=True | |
#) | |
valid, x, res_text = pyshacl.validate( | |
data_graph=data_graph, advanced=True, js=True, allow_warnings=True | |
) | |
if not valid: | |
data_graph.serialize(f"/tmp/{os.path.basename(data_file)}", format="ttl") | |
> assert valid, f"{data_file}:\n{res_text}" | |
E AssertionError: ../data/awkward-problem1.ttl: | |
E Validation Report | |
E Conforms: False | |
E Results (6): | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: ap1:ConnectionPoint_1 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:message Literal("This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:path s223:isConnectionPointOf ; sh:severity sh:Info ] | |
E Focus Node: ap1:ConnectionPoint_2 | |
E Result Path: s223:isConnectionPointOf | |
E Message: This ConnectionPoint must (eventually) be associated with a Device or Enclosure using s223:hasConnectionPoint. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ap1:ConnectionPoint_1 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Connection ; sh:maxCount Literal("1", datatype=xsd:integer) ; sh:message Literal("This ConnectionPoint must be associated with exactly 1 Connection.") ; sh:minCount Literal("1", datatype=xsd:integer) ; sh:name Literal("ConnectionPointToConnectionShape") ; sh:path s223:connectsThrough ; sh:severity sh:Info ] | |
E Focus Node: ap1:ConnectionPoint_2 | |
E Result Path: s223:connectsThrough | |
E Message: This ConnectionPoint must be associated with exactly 1 Connection. | |
E Validation Result in MinCountConstraintComponent (http://www.w3.org/ns/shacl#MinCountConstraintComponent): | |
E Severity: sh:Info | |
E Source Shape: [ sh:class s223:Segment ; sh:message Literal("Junction is missing one or more Segments") ; sh:minCount Literal("2", datatype=xsd:integer) ; sh:path s223:lnx ; sh:severity sh:Info ] | |
E Focus Node: ap1:Junction_1 | |
E Result Path: s223:lnx | |
E Message: Junction is missing one or more Segments | |
E Constraint Violation in SPARQLConstraintComponent (http://www.w3.org/ns/shacl#SPARQLConstraintComponent): | |
E Severity: sh:Violation | |
E Source Shape: [ sh:name Literal("Test SCP1") ; sh:path s223:mapsTo ; sh:sparql [ rdf:type sh:SPARQLConstraint ; rdfs:comment Literal("Ensure that every SystemConnectionPoint maps to a target that is associated with the same System as that associated with the SystemConnectionPoint. | |
E The test depends on the class of the target - one of ConnectionPoint, Junction, or a SystemConnectionPoint of a contained subSystem.") ; sh:message Literal("{$this} is associated with {?system}, but it mapsTo a target associated with {?targetSystem}") ; sh:prefixes <http://data.ashrae.org/standard223/1.0/validation/model> ; sh:select Literal(" | |
E SELECT $this ?system ?targetSystem | |
E WHERE { | |
E $this ^s223:hasSystemConnectionPoint ?system . | |
E $this s223:mapsTo ?target . | |
E { | |
E ?class rdfs:subClassOf* s223:ConnectionPoint . | |
E ?target a ?class . | |
E ?target s223:isConnectionPointOf/^s223:contains ?targetSystem . | |
E } | |
E UNION | |
E { | |
E ?target a s223:Junction . | |
E ?target ^s223:contains ?targetSystem . | |
E } | |
E UNION | |
E { | |
E ?target a s223:SystemConnectionPoint . | |
E ?target ^s223:hasSystemConnectionPoint/^s223:contains ?targetSystem . | |
E } | |
E FILTER (?system != ?targetSystem ) . | |
E } | |
E ") ] ] | |
E Focus Node: ap1:SystemConnectionPoint_3 | |
E Result Path: s223:mapsTo | |
E Source Constraint: [ rdf:type sh:SPARQLConstraint ; rdfs:comment Literal("Ensure that every SystemConnectionPoint maps to a target that is associated with the same System as that associated with the SystemConnectionPoint. | |
E The test depends on the class of the target - one of ConnectionPoint, Junction, or a SystemConnectionPoint of a contained subSystem.") ; sh:message Literal("{$this} is associated with {?system}, but it mapsTo a target associated with {?targetSystem}") ; sh:prefixes <http://data.ashrae.org/standard223/1.0/validation/model> ; sh:select Literal(" | |
E SELECT $this ?system ?targetSystem | |
E WHERE { | |
E $this ^s223:hasSystemConnectionPoint ?system . | |
E $this s223:mapsTo ?target . | |
E { | |
E ?class rdfs:subClassOf* s223:ConnectionPoint . | |
E ?target a ?class . | |
E ?target s223:isConnectionPointOf/^s223:contains ?targetSystem . | |
E } | |
E UNION | |
E { | |
E ?target a s223:Junction . | |
E ?target ^s223:contains ?targetSystem . | |
E } | |
E UNION | |
E { | |
E ?target a s223:SystemConnectionPoint . | |
E ?target ^s223:hasSystemConnectionPoint/^s223:contains ?targetSystem . | |
E } | |
E FILTER (?system != ?targetSystem ) . | |
E } | |
E ") ] | |
E Message: http://data.ashrae.org/standard223/data/awkward-problem1#SystemConnectionPoint_3 is associated with {?system}, but it mapsTo a target associated with {?targetSystem} | |
E | |
E assert False | |
test_validation.py:85: AssertionError | |
------------------------------ Captured log call ------------------------------- | |
INFO test_validation:test_validation.py:75 Validating data definition of ../data/awkward-problem1.ttl ( 77450 triples) | |
=========================== short test summary info ============================ | |
FAILED test_validation.py::test_data_validation[../data/sample.ttl] - Asserti... | |
FAILED test_validation.py::test_data_validation[../data/mr33-sample.ttl] - As... | |
FAILED test_validation.py::test_data_validation[../data/FigureA-12-PS.ttl] - ... | |
FAILED test_validation.py::test_data_validation[../data/junction-testcase-b.ttl] | |
FAILED test_validation.py::test_data_validation[../data/IBAL.ttl] - ValueErro... | |
FAILED test_validation.py::test_data_validation[../data/branch-20-sample.ttl] | |
FAILED test_validation.py::test_data_validation[../data/junction-testcase.ttl] | |
FAILED test_validation.py::test_data_validation[../data/junction-testcase-c.ttl] | |
FAILED test_validation.py::test_data_validation[../data/PS-Figure A-9.ttl] - ... | |
FAILED test_validation.py::test_data_validation[../data/awkward-problem1.ttl] | |
================== 10 failed, 24 passed in 422.96s (0:07:02) =================== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment