Closed EmmanuelOga closed 3 years ago
@EmmanuelOga can you try adding the rdfs:subClassOf
statements as part of your data instead of the shapes (eg. don't add it to the shacl graph)?
@hmottestad that was exactly what was happening:
try {
conn.add(shapes) // <<-- Adding this line solves the issue!
conn.add(shapes, RDF4J.SHACL_SHAPE_GRAPH)
conn.commit()
println("OK")
} catch (exception: RepositoryException) { ...
Not sure if there are any lessons that I should get from this... should I always commit the data to both the default graph and the shapes graph in the general case?
thx again
I think we will call this a bug. I should be retrieving rdfs:subClassOf
statements from both the base sail and the SHACL graph.
@EmmanuelOga https://rdf4j.org/release-notes/3.4.3/
Hello, I'm using the SHACL validator as documented here with RDF4J version 3.4.0.
I'm using the schema.org shapes available here.
I have these triples:
... for which RDF4J fails to validate
schema:homeLocation
(see validation report at the bottom). Note that I commented outa schema:ContactPoint
on the data. If I use ContactPoint, the data validates fine. But since the schema.org shapes say:... I suspect
rdfs:subClassOf
is not being considered. The documentation says "By default the ShaclSail supports the simple rdfs:subClassOf reasoning", and I verified this is enabled on my code (isRdfsSubClassReasoning returnstrue
).Maybe I'm misunderstanding how this is supposed to work? I was assuming since
PostalAddress
is defined a subclass ofContactPoint
, I should be able to provide aPostalAddress
where a ContactPoint is expected.Thank you!
RD4J Validation Report: