AKSW / RDFUnit

An RDF Unit Testing Suite
http://RDFUnit.aksw.org
Apache License 2.0
150 stars 42 forks source link

Question: number of instances for a given class rule #97

Open m1ci opened 4 years ago

m1ci commented 4 years ago

Is it possible to implement in SHACL/RDFUnit a validaiton rule that in the graph there must be 8 instances of some class? Thanks!

jimkont commented 4 years ago

I don't think this can be done in SHACL but in the RDFUnit test case format you can put any SPARQL query and that should be easily implemented

m1ci commented 4 years ago

ok, thanks for the info. Can you please provide a pointer to some hello world example of an RDFUnit test case?

gcpdev commented 4 years ago

ok, thanks for the info. Can you please provide a pointer to some hello world example of an RDFUnit test case?

Here are some example tests that includes SPARQL queries:

https://github.com/dbpedia/ontology-tracker/blob/master/guidelines/dbo.tests.shapes.ttl

jimkont commented 4 years ago

there are many examples in the rdfunit-manual module as well. e.g. for nif