
h1. RIOT
[Jena ARQ RIOT|http://openjena.org/wiki/RIOT] is an RDF conversion/validation tool.
It's Java based so it runs on Linux or Windows:
- [Download ARQ|http://sourceforge.net/projects/jena/files/ARQ/] ([ARQ-2.8.8|http://downloads.sourceforge.net/project/jena/ARQ/ARQ-2.8.8/arq-2.8.8.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fjena%2Ffiles%2FARQ%2FARQ-2.8.8%2F&ts=1324486745&use_mirror=ignum] is current as of 2011-04-21)
- unzip to a path that includes *no spaces* (eg on Windows: c:\prog\ARQ-2.8.8)
- On Linux it's easier:
-- add ARQ-2.8.8/bin to your path
- On Windows you need to jump through more hoops:
-- add c:\prog\ARQ-2.8.8\bat to your path
-- write a batch file riot.bat in the same dir:
{code}
@echo off
set ARQROOT=c:\prog\ARQ-2.8.8
call %ARQROOT%\bat\make_classpath.bat %ARQROOT%
set JVM_ARGS=-Xmx1200M -server
java %JVM_ARGS% -cp %CP% riotcmd.riot %*
{code}
- call it like this. If there are no errors, you'll see no output
{code}riot --validate myfile.ttl{code}
TODO: integrate this as a SVN commit hook, or emacs vc-before-checkin-hook
h2. Emacs integration
Here's how to integrate RIOT to the Emacs 'compile' command
# Get and install n3-mode.el (it's rather primitive but still useful for Turtle editing), then
{code}
(autoload 'n3-mode "n3-mode" "Major mode for OWL or N3 files" t)
(add-to-list 'auto-mode-alist '("\\.ttl$" . n3-mode))
(add-to-list 'auto-mode-alist '("\\.nt$" . n3-mode))
(add-to-list 'auto-mode-alist '("\\.owl$" . n3-mode))
{code}
# Get and install [smart-compile.el|http://sourceforge.jp/projects/macwiki/svn/view/zenitani/elisp/smart-compile.el?view=co&root=macwiki], then
{code}
(autoload 'smart-compile "smart-compile" nil t)
(global-set-key "\C-cc" 'smart-compile)
(eval-after-load "smart-compile"
'(add-to-list 'smart-compile-alist '(n3-mode . "riot --validate %f")))
{code}
# Add regexp's to recognize RIOT's error messages:
{code}
(add-to-list 'compilation-error-regexp-alist 'riot1)
(add-to-list 'compilation-error-regexp-alist 'riot2)
(add-to-list 'compilation-error-regexp-alist-alist
'(riot1 "riot --validate \\(.*\\)" 1 nil nil 0)) ; file: INFO
(add-to-list 'compilation-error-regexp-alist-alist
'(riot2 "ERROR \\[line: \\([0-9]+\\), col: \\([0-9]+\\)" nil 1 2)) ; line, col
{code}
# When editing a TTL file, invoke compilation with "C-c c". It jumps automatically to the first error, eg:
!emacs-compile-riot-turtle.png!
h1. Any23
"any23" stands for "anything to triples" and converts from RDFa, microformats, rdf/xml, ntriples etc to turtle and other formats
- install from [http://code.google.com/p/any23/downloads/list] and run it with a batch file like this:
{code:title=any23.bat}
@echo off
java -cp c:\prog\any23-0.6.1\any23-core\target\any23-core-0.6.1-jar-with-dependencies.jar -Xmx256M org.deri.any23.cli.Rover %*
{code}
- or use their web service using the wget program (similar with curl):
{code}wget -q --post-file=myfile.ttl --output-document=myfile.nt --header=Content-Type:text/turtle http://any23.org/any23/nt{code}
NOTICE: the file must be valid. Else the site crashes
h1. Online Validator
For a one-off validation job, you can use [http://www.rdfabout.com/demo/validator/].
TODO: we can easily automate calling this with wget, eg see below
h1. [Validating RDF Parser (VRP)|http://139.91.183.30:9090/RDF/VRP/]
ICS-FORTH Validating RDF Parser: a tool for analyzing, validating and processing RDF schemas and resource descriptions. SVG visualization.
- Tried [install|http://139.91.183.30:9090/RDF/VRP/Install.html]
- converted susana.ttl to susana.rdf
{noformat}any23 -f xmlrdf susana.ttl > susana.rdf{noformat}
- runVRP.bat: fixed VRP_HOME, removed JAVA_HOME, fixed command line:
{noformat}"%JAVA_HOME%\bin\java" -mx1000m -classpath "%JAVA_HOME%;..."{noformat}
- ran it, trying various options
- specified susana-browseSchema.svg as one of the outputs.
Had to add namespaces:
{code:xml}
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
{code}
and it shows a page with some control buttons, but no content
- it was never able to produce schemaVisualization.svg
- turns out it's buggy:
{noformat}
Couldn't repair and continue parse
gr.forth.ics.vrp.corevrp.RDF_Error:
java.lang.NullPointerException
d = 13 dec
Exception in thread "AWT-EventQueue-0" java.lang.Error: Symbol recycling detected (fix your scanner).
at java_cup.runtime.lr_parser.parse(lr_parser.java:545)
at gr.forth.ics.vrp.corevrp.model.Model.fetch_all_ns(Model.java:621)
at gr.forth.ics.vrp.corevrp.model.Model.fetch_all(Model.java:583)
{noformat}
h2. [RDFSuite|http://139.91.183.30:9090/RDF/index.html]
It's part of RDFSuite that includes
- Validating RDF Parser (VRP): The First RDF Parser supporting semantic validation of both resource descriptions and schemas
- RDF Schema Specific DataBase (RSSDB): The First RDF Store using schema knowledge to automatically generate an Object-Relational (SQL3) representation of RDF metadata and load resource descriptions.
- RDF Query Language (RQL): The First Declarative Language for uniformly querying RDF schemas and resource descriptions.
- RDF Update Language (RUL): The First Declarative Language for uniformly updating resource descriptions
But it's done 2002-2003 and given the above experience, I won't try it.
h1. Eyeball
Jena Eyeball [http://jena.sourceforge.net/Eyeball/]
- RDF's open world assumption means "anything goes" so eg a misspelt prop name is not considered a mistake.
Eyeball tries to overcome this. It includes a lot of configurable checks over RDF data
- Windows download: http://sourceforge.net/projects/jena/files/Eyeball/Eyeball%202.3/eyeball-2.3.zip/download
See {jira:RS-1071}
for a first attempt and pieces of advice. Once we apply it successfully, we should move the info here.
h1. TODO
Sebastian Hellmann [mailto:hellmann@informatik.uni-leipzig.de] on OA mlist:
I convert/validate with
- Rapper http://librdf.org/raptor/rapper.html
- rdf.sh https://github.com/seebi/rdf.sh (Note the RDF diff function)
- Jena CLI http://jena.sourceforge.net/tools.html
- Pellet http://clarkparsia.com/pellet
Pellint http://weblog.clarkparsia.com/2008/07/02/pellint-an-ontology-repair-tool/