/// <summary> /// Classes must be referenced as target class. This must be added to the shacls. /// </summary> /// <param name="store">InMemory store with metadata</param> private void ModifiyShapesForTargetClass(VDS.RDF.TripleStore store) { store.ExecuteUpdate(@" PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX sh: <http://www.w3.org/ns/shacl#> INSERT { graph ?g { ?subclass sh:targetClass ?subclass } } WHERE { graph ?g { ?subclass a ?type } } "); }
/// <summary> /// Currently the referenced instances are not contained in the resource graph. /// The shacl validator would therefore throw a error, which is suppressed by this function to the metadata graph. /// </summary> /// <param name="store">InMemory store with metadata</param> private void ModifyShapesForShaclClass(VDS.RDF.TripleStore store) { store.ExecuteUpdate(@" PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX sh: <http://www.w3.org/ns/shacl#> DELETE { graph ?g { ?s sh:class ?o } } WHERE { graph ?g { ?s sh:class ?o } } "); }