- From: Holger Knublauch <holger@topquadrant.com>
- Date: Tue, 29 Aug 2017 09:26:57 +1000
- To: public-rdf-shapes@w3.org
- Message-ID: <42a5b57f-3be6-2f2b-5720-a4a6caa6a3a2@topquadrant.com>
Hi Ruben,
it is unclear to me what exactly you are attempting to represent. Below
you present an outline for a solution but the problem statement isn't
clear. Could you elaborate a bit?
Note that the SHACL vocabulary (see TTL file) includes the class
sh:Parameterizable that can be used as superclass of all kinds of
"templates". For example to state that something takes three arguments,
you could do
my:Operation rdfs:subClassOf sh:Parameterizable .
ex:findMatchingTriples
a my:Operation ;
sh:parameter [
sh:path ex:subject ;
sh:order 0 ;
sh:nodeKind sh:BlankNodeOrIRI ;
] ;
sh:parameter [
sh:path ex:predicate ;
sh:order 1 ;
sh:nodeKind sh:IRI ;
] ;
sh:parameter [
sh:path ex:object ;
sh:order 2 ;
] ;
...
(and then attach whatever you like as other triples to the
ex:findMatchingTriples - in the case of SHACL-SPARQL there are SPARQL
queries, in the case of SHACL-JS there are JS snippets).
The above may be on the wrong meta-level, but as I said I don't really
understand your use case yet.
Regards
Holger
On 28/08/2017 21:41, Ruben Taelman wrote:
> Dear all,
>
> I have a question regarding the potential use of SHACL for a certain
> use-case,
> and I'm wondering if someone here can help me identify whether or not
> SHACL is a good solution for this.
>
> I am looking for a vocabulary that can declaratively describe RDF results
> of a certain operation, based on certain parameters.
>
> For example, assume the following operation can evaluate triple
> pattern queries:
> findMatchingTriples(subject, predicate, object)
>
> As far as I can see, SHACL doesn't provide a way to bind 'variables'
> to nodes in a shape.
> The closest I have come to describing such a triple pattern operation
> is using the following (invalid) SHACL shape:
>
> _:shape a sh:NodeShape;
> sh:targetNode _:subject;
> sh:property [
> sh:path _:predicate;
> sh:hasValue _:object.
> ].
>
> _:subject, _:predicate and _:object refer to the variable parameters
> of the operation.
>
> I assume I need some kind of abstraction layer above SHACL,
> that basically 'instantiates' SHACL shapes based on certain parameters.
>
> So my question is:
> is such an abstraction already possible in some form, or are there
> future plans for something like this?
> Or would you suggest using a SPARQL-based vocabulary for this, such as
> SPIN,
> as I don't really need SHACL's validation and constraint
> checking-features.
>
> Kind regards,
> Ruben Taelman
Received on Monday, 28 August 2017 23:27:24 UTC