Dear Holger,
First let me thank you again for your hard work on SPIN. I can't
emphasize enough how much I like the SPIN concepts.
Now I can completely understand the thinking behind this wish for SPARQL
contents as a text string. Unfortunately, I am also worried that tools
will support one or the other of the syntaxes i.e. ones that just grep
out the sp:text and run those queries, won't support the rdf model. i.e.
we will get a lot more half backed support.
I just hope that there will be tooling to automatically generate the
RDF syntax. I use the RDF syntax a lot (and actually do write parts by
hand at times). Mostly because I have SPIN rules about SPIN rules. e.g.
for some of my purposes every SPIN rule should have a comment and
creator etc... And I would be very disappointed to lose this.
My belief (which might be very wrong) is that SPIN support by
implementers is limited by the lack of a public free test suite to help
them get started. Maybe we the community can work on this?
Regards,
Jerven
On 01/11/2013 07:23 AM, Holger Knublauch wrote:
Dear users,
for those interested in SPIN, I would like to get feedback on a small
internal change with potentially large implications.
Many people over the years (most recently [1]) have suggested that the
SPIN RDF syntax (representing SPARQL in RDF) is too hard to use in
conjunction with text editors and puts unnecessary obstacles in the way
of implementors.
What I'd like to add is some flexibility that makes the SPIN RDF syntax
no longer mandatory to encode SPIN rules, constraints, functions etc.
Here is how the pure textual SPIN syntax would look like
ss:Rectangle
spin:rule [
rdf:type sp:Construct ;
sp:text """
# Computes area := width * height
CONSTRUCT {
?this ss:area ?area .
}
WHERE {
?this ss:width ?width .
?this ss:height ?height .
BIND ((?width * ?height) AS ?area) .
}
"""^^xsd:string ;
] ;
In other words, the SPARQL query is embedded as entered into the file
and more easy to read for people examining the Turtle source code.
Another example, this time with an even more compact single-line string:
ss:Square
rdf:type rdfs:Class ;
spin:constraint [
rdf:type sp:Ask ;
sp:text "ASK WHERE { ?this ss:width ?width . ?this ss:height
?height . FILTER (?width != ?height) . }"
] ;
rdfs:label "Square"^^xsd:string ;
rdfs:subClassOf ss:Rectangle .
sp:text was already supported since the beginning, so the only change
that I want to make is to remove the need to use the RDF syntax if
sp:text is present. I expect that for most people who use SPIN through
TopBraid, the RDF syntax will remain the preferred storage mechanism,
because it does have several advantages:
- allows structural analysis and walking through the RDF graph
- makes it easier to find references to properties etc
- usages of properties and resources within queries get automatically
renamed
- no need to ever worry about prefixes
With those changes I hope to attract more external users and
implementations that will eventually grow the size of the SPIN community.
Feedback welcome.
Thanks,
Holger
[1] http://lists.w3.org/Archives/Public/public-vocabs/2013Jan/0079.html
--
-------------------------------------------------------------------
Jerven Bolleman [email protected]
SIB Swiss Institute of Bioinformatics Tel: +41 (0)22 379 58 85
CMU, rue Michel Servet 1 Fax: +41 (0)22 379 58 58
1211 Geneve 4,
Switzerland www.isb-sib.ch - www.uniprot.org
Follow us at https://twitter.com/#!/uniprot
-------------------------------------------------------------------
--
-- 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