sparql.anything icon indicating copy to clipboard operation
sparql.anything copied to clipboard

SHACL definition of Facade-X

Open enridaga opened this issue 4 years ago • 2 comments

It would be a useful tool for validating the output of sparql.anything transformers.

enridaga avatar Jan 16 '21 17:01 enridaga

I resumed this issue as I would like to see whether can be addressed. I had a look at the SHACL specification which seems to me unsuitable for defining a constraint that validates Facade-X. Maybe I have misunderstood something, but it seems to me that it is not possible to define constraints such as:

  • The generated graph must have a single root
  • The properties of the graph must be container membership properties, rdf:type, properties having xyz: or xhtml: (see HTML triplifier) as namespace
  • Containers are all IRIs or Blank nodes

I don't know if someone with more familiarity with SHACL is able to translate these constraints into shapes.

Otherwise, these could be written as AS SPARQL queries.

luigi-asprino avatar Jun 26 '23 14:06 luigi-asprino

Anyway, 35edfd4 introduces the method AbstractTriplifierTester.assertConformanceToFxShapes() which validates the resulting dataset graph against the shapes declared in sparql-anything-testutils/src/main/resources/Facade-X-shapes.ttl

So, if anyone comes up with a shape for Facade-X this can be included there.

luigi-asprino avatar Jun 26 '23 14:06 luigi-asprino