I would like to add a validation (using SHACL or ADS) to verify that the depth of my taxonomy does not exceed a preset limit. This should ideally be able to handle a multi-hierarchy (if that is the correct term), calculating the maximum depth where any concept appears.
One approach would be to infer a :depth property using the following basic logic [?concept, :depth, 1] :- [?concept, skos:topConceptOf, ?scheme]. [?concept, :depth, ?depth] :- [?concept, skos:broader, ?parent], [?parent, :depth, ?parentDepth], BIND(?parentDepth + 1 as ?depth). And then use SHACL to set a max value on this property. Is there a way to accomplish this using sh:values? It would be challenging to do this with a query-based constraint as a string count of transitive parents does not handle multi-hierarchies well. Perhaps an ADS-based JS validator that walks up the tree finding the longest path to the ConceptScheme - are those relationships easily available from the focusNode NamedNode provided to the JS rule? -- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/2aef80d8-f0d9-4fbc-852d-a7ca9ddc82e1n%40googlegroups.com.
