Hi Irene,
I am not aware of a "standard" way of doing this, so you could just make
up your own property to point to an rdf:List (if the ordering matters)
or just a plain property otherwise.
Related work:
- spl:TestCase can be used to capture a SPIN function call plus its results
- http://spinrdf.org/spr.html#spra is one way of representing arbitrary
SPARQL result sets in RDF, plus SPIN functions to query those. This
approach is used heavily in SWP.
Holger
On 10/31/2012 1:50, Irene Celino wrote:
Hi Scott,
thanks for your detailed reply. I recognize I wasn't clear at all in
my original request.
First of all, my issue does not deal at all with TBC (which I like
very much) or with rule execution, but only with an RDF modelling choice.
Let's say I have some data that define people:
my:Person1 a my:Person.
my:Person2 a my:Person.
Then I define the query to get all instances of the class my:Person:
my:QueryToGetAllPersons a sp:Select ;
sp:text "select ?x where {?x a my:Person} "^^xsd:string ;
# ...rest of the query definition using SPIN
.
If I run the query my:QueryToGetAllPersons on my data, I'll get
my:Person1 and my:Person2 as results.
I'd like to model this "relationship" in RDF, like:
my:QueryToGetAllPersons my:hasResult my:Person1, my:Person2 .
I'm looking for a potentially-existing definition of the
"my:hasResult" predicate.
For example, I noticed that SPIN vocabulary defines the sp:resultNodes
predicates for Describe queries as "Contains the result nodes (URI
resources or Variables) of a Describe query".
I'm looking for something similar for Select queries.
Thanks a lot again for your valuable time,
Irene
2012/10/30 Scott Henninger <[email protected]
<mailto:[email protected]>>
Irene, I'm not entirely clear what you mean by linking a query to
results. If by this you mean that you have CONSTRUCTed some triples
and want the query to be associated with this query, you could insert
a a reference to the query in the SPIN rule itself. Suppose you have
a property named my:createdBy that is to point to the rule and the
rule is defined in my:ClassX. Then this example rule would include a
reference for the rule in the constructed triple.
CONSTRUCT
{ my:rscA a my:SomeClass .
my:rscA my:createdBy ?rule .
}
WHERE
{ my:ClassX spin:rule ?rule .
}
One could even use RDF reification to specify the rule that created a
triple. But if this is the use case you seek, then couldn't you use
Explain inference? This appears both in the Inferences View after
running inferences and in the Form View for the inferred data (click
the menu triangle to the right of the text box). This will point you
to the rule that created the triple.
-- Scott
On Oct 30, 3:41 am, Irene Celino <[email protected]
<mailto:[email protected]>> wrote:
> Dear all,
> I've always loved the way the SPIN vocabulary can be used to
"model" and
> store SPARQL queries together with RDF data.
> Now I'm facing the need to link a SPARQL SELECT query "object" -
modelled
> with SPIN - to its results, which are again RDF resources.
>
> I was wondering if anybody else has ever felt the same need and,
in case,
> if anybody has created/defined an RDF property to link queries
and their
> respective results.
> (Of course I can model it on my own, I was just curious if this
happened
> before).
>
> Thanks in advance,
> Irene
>
> --
>
> " If you understand what you're doing,
> you're not learning anything. "
--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include
Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live,
TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]
<mailto:topbraid-users%[email protected]>
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
--
" If you understand what you're doing,
you're not learning anything. "
--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise
Vocabulary Network (EVN), TopBraid Composer, TopBraid Live,
TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary
Network (EVN), TopBraid Composer, TopBraid Live,
TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en