
Partly in response to some concerns about validation and RDF, I’ve built a little tool (‘Rosco’ – RDF mumble Schema Checker mumble) to check an RDF document against a schema. It’s pretty simple – all it does is find all the classes in the schema, all the properties of each class (including superclasses), and then see if the RDF document specified says something sensible with respect to those classes and properties. Here’s the result for my foaf file (with some deliberate ‘mistakes’).
It also finds any other properties in that document for each class. For FOAF files specifically it also suggests a few improvements, e.g. use an inverseFunctionalProperty if there isn’t one there; use foaf:maker, rdfs:seeAlso where appropriate. It should work for any RDF schema though.
There’s also a little tool for looking at a schema linked from the same page. That just tells you what the domains of classes are in an RDF schema file (not ranges yet). It’s just a useful view on an RDF schema file, which can let you know if you’ve forgotten to put a domain in etc – maybe it can help with consistency checking. The foaf schema for example doesn’t have specific domains for title, nick etc (although of course rdf:Resource is implied).
Rosco is polite (I hope) and non-judgemental (Dan wanted to name it after Viz’s liberal parents). Dan’s Missing isn’t broken: data validation and freedom on the Semantic Web rdfweb weblog entry is highly relevant here.
Rosco is also a generic tool – I tried it with the RDF calendar schema and it works – although the schema itself doesn’t have any domains more specific than rdf:Resource.
So something along the lines of schemarama can do a more interesting sort of validation – you can specify that when you find a pacticular thing (identified by a query, so that could be class or something more complex such as by the presence of a series of properties), then you want it to match a certain pattern (also by a query). So this would include any namespaces you chose, and wouldn’t be restricted to ones from a particular schema. However, I think advances in this direction probably need queries that handle optional clauses which my version of squish doesn’t do yet. While waiting for shellac’s Super Query Engine 57 in Java, Rosco’s version of RDF document schema checking is useful for debugging purposes (why isn’t this file working in my viewer?) and for lightweight checking of RDF documents generally (especially as the schema is improved and updated).
As for query, I liked darobin’s metaphor: <darobin> “I see the interest in the approach of having a query that’s a graph with missing bits, so you dip in in the graph you’re querying and the interesting bits stick to it”.
Rosco of course was the bumbling sheriff from the Dukes of Hazzard…
The whole thing is running off ‘Tinkling’, my tiny java RDF api, which is now in CVS (finally) but needs a whole lot of polishing…
-
Recent Posts
- Archers Avoider
- SVG D3.js bar chart
- Connecting a Wifly shield to an Arduino
- Nanode / twitter blink example
- A node.js bot in XMPP
- Archiving a Mediawiki Installation
- Web [on|and|in|for|with|via|through] TV Workshop
- Some FOAF stats
- Displaying Guardian book reviews for quick buying on Amazon
- Generating specs from RDFS / OWL docs
Archives
- April 2013
- March 2012
- February 2012
- January 2012
- December 2011
- October 2010
- September 2009
- June 2009
- May 2009
- March 2009
- February 2009
- January 2009
- November 2008
- October 2008
- January 2008
- February 2007
- May 2006
- April 2006
- March 2006
- February 2006
- November 2005
- October 2005
- September 2005
- July 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- April 2004
- March 2004
- February 2004
- December 2003
- October 2003
- September 2003
- August 2003
- July 2003
Nice work Libby!
Very trendy, suggested I use foaf:maker. It seems rather keen on seeAlso too, political correctness gone maaad.
Should certainly be useful, thanks.
heh, thanks Danny. Modern parents, that’s what I meant….
seealso, yep. It’s hard to make it only moderately interested in seealso, rather than obsessing on it. Made, I think, is A Good Thing…