- From: Nicholas Car <nick@kurrawong.ai>
- Date: Wed, 20 Nov 2024 03:41:27 +0000
- To: Steve Ray <steve@steveray.com>
- Cc: Public Shacl W3C <public-shacl@w3.org>
- Message-ID: <E_sXNVL_8jqt2WzLcE09D_D2XbJVMMg9h6cHmjKMVj5FDkalFTibvRy-9Kev5b7DYaWItI5-fNvvZgL>
Hi all, Thanks for your thoughts. Some reflections: > Simon: AFAIK, there is currently no way to reference individual SHACL shapes directly. Indeed and we want this, or some equivalent! > Håvard: In RDF4J, we’ve deviated a bit on our implementation of sh:shapesGraph. We require it to be used in the shapes graph and not in the data graph. This seems to be heading in the direction we need... > Håvard: If a user has three data graphs... We have, so far, handled all graph mushing in application code. Recently Ashley extended pySHACL to be more graph aware and do things like place triples built from SHACL rules into different Named Graphs from the Data Graph, but we don't yet have any sophistication in graph selection for either the data or shapes graphs in the SHACL itself. > Thomas: The pattern used in Sparnatural SHACL-based configuration [2][3] is to set sh:deactivated on the imported shapes (node or properties) I want to hide. My understanding is that this subtractive approach is the only way, you cannot have an additive approach I think we can have an additive approach, see below. > Thomas: I would very much be able to reuse and override not a shape but a *constraint* on a shape. Indeed, this would be vey naughty, if the shape was universally defined (identified by IRI) but perhaps not if IDed only with a BN and then you import it and change it which is effectively re-issuing it in your own context. > Steve: Does your work include the possibly simpler task of building profiles of instance data? We are considering that very thing for the QUDT ontology vocabularies. Not within SHACL WG work work perhaps but we do loads of this sort of thing elsewhere. We do profile data from other datasets all the time and use SHACL definitions to define the profile and the Prez API (https://github.com/rdflib/prez/) uses profile definitions to supply profiles of datasets via the Content Negotiation by Profile API spec (https://w3c.github.io/dx-connegp/connegp/), which can be boiled down to more specific APIs like the Open Geospatial Consortium's OGC Features API. A simpler example without SHACL profile definitions: we have (SKOS) vocabs that subset, extend or both other vocabs which we indicate with a PROV Qualified Derivation pointing to the source vocab and a role taken from our "Vocabulary Derivation Modes" vocab, see https://linked.data.gov.au/def/vocdermods. Additive SHACL profiling My current hack approach to this is to: - ensure each Shape within an Ontology of shapes has an IRI (not a Blank Node ID) - create a new ontology of Shapes that hasPart any Shapes it defines and any others that it wants to import - supply entire Shapes ontologies locally to allow tooling to pluck shapes out of RDF files, not download them off the web You can see some of this going on here https://github.com/AusBIGG/abis/blob/master/validators/abis.ttl#L22-L55 where whole other Shapes Onts are imported, potentially from local files, but individual Shapes could be in this way too. We may need better terms, or just stated conventions, around "ontologies of Shapes", Shape IRIs and hasPart use etc. Any thoughts on this welcome! Nick On Wednesday, 20 November 2024 at 00:08, Steve Ray <steve@steveray.com> wrote: > Nick, > Does your work include the possibly simpler task of building profiles of instance data? We are considering that very thing for the QUDT ontology vocabularies. > > Steve > > On Mon, Nov 18, 2024 at 9:03 PM Nicholas Car <nick@kurrawong.ai> wrote: > >> Dear SHACL CG, >> >> One of the deliverables of the proposed "Data Shapes WG" [1] is a "SHACL 1.2 Profiling" specification. The intention is to "define methods for using SHACL to create formal profiles of (RDF) standards" and, by extension, define how bundles of SHACL Shapes can import / depend on / reuse other SHACL Shapes. >> >> Even before this WG starts, if it does, I need to create SHACL Shape collections that pick and choose Shapes from other collections. I would like community input here to both get my job done and to start working up towards an implementation of this deliverable. >> >> You can see wholescale importation in the ABIS specification [2] but not selective importation. >> >> What methods / modelling patterns have you used to import Shapes 1, 2 and 4, but not 3 from Shapes Collection A into Collection B? >> >> If this area is of really great interest to you, please consider joining the WG too. >> >> Thanks, Nick >> >> [1] https://w3c.github.io/shacl/charter-1.2/shacl-wg.html#deliverables >> [2] https://github.com/AusBIGG/abis/blob/master/validators/abis.ttl#L26-L55
Received on Wednesday, 20 November 2024 03:41:38 UTC