This document is also available in non-normative PDF
version.
Copyright © 2006 by DIP. All Rights
Reserved. DIP liability, trademark,
document use, and software licensing rules apply.
| IST Project Number | FP6 – 507483 | Acronym | DIP |
| Full Title | Data, Information, and Process Integration with Semantic Web Services | ||
| Project URL | http://dip.semanticweb.org | ||
| Document URL | http://sw.deri.org/2005/03/diprdf/FactSheet | ||
| EU Project Officer | Kai Tullius | ||
| Deliverable Number | 2.5 | Title | YARS Ontology Repository |
| Work package Number | 2 | Title | Ontology Management |
| Date of Delivery | contractual | M30 | actual | 30-June-2006 |
| Status | version | 1.0 | final | |
| Nature | ||||
| Dissemination Level | ||||
| Authors | Andreas Harth (National University of Ireland, Galway) | ||||||||
| Responsible Author |
|
||||||||
| Abstract (for dissemination) |
This fact sheet describes the YARS ontology repository prototype. YARS is a high-performance, 100% pure Java ontology repository based on RDF with a link to ORDI. |
| Keywords | Ontology repository |
| Version Log | |||
| issue date (dd-mm-yy) | revision no. | author | change |
| 31-12-05 | 001 | Andreas Harth | first internal version (version 1.0) |
| 09-06-06 | 002 | Andreas Harth | final version for internal review |
| 30-06-06 | 003 | Andreas Harth | final submitted version (version 3.0) |
| Reviewer Information | |||||||||
| 1 |
|
||||||||
| 2 |
|
||||||||
Version: 0.3, 30 June 2006.
Download:
Source control: Available from Subversion at http://sw.deri.org/svn/sw/2004/06/yars/.
Contact person: Andreas Harth, andreas.harth@deri.org
YARS [YARS] is a data store for RDF in Java. YARS uses [Notation 3] as a way to encode facts and queries. The current version supports tree-shaped datalog queries with one shared variable. Please note that YARS is intended for storage and retrieval of RDF, which offers a somewhat higher abstraction layer than the APIs of RDF toolkits such as Jena or Redland. The interface for interacting with YARS is HTTP (GET, PUT, and DELETE) and built upon the REST (Representational State Transfer) principle [REST]. Much more information can be found on the YARS homepage.
The current version 0.3 of YARS is a release which is fully functional with a stable access interface via HTTP. Queries can be posed using any web browser by pointing your browser to the URL of the web application in your servlet container.
Please note that in the context of WP2, there is no stand-alone user interface available, since the repository functionality is transparent to the user of any user interface that builds upon ORDI. YARS can be plugged in as an ORDI storage back-end implementation if an application programmer using ORDI wishes to do so. The Installation and Usage section explains how to use YARS as a back-end storage system from within Java.
Nature: A Web application for use in Servlet containers.
Interfaces (API, Web Services): a HTTP REST interface.
Platform: JDK 1.4.2.
Supported standards:
Required Libraries (OMWG, SDK Cluster, WSMO-related):
(for using the ORDI link)Required Libraries (others):
Included in the web application archive, separately available in SVN repository or on the respective websites.
If you wish to include YARS as a stand-alone library, make sure to include yars.jar, yars-api.jar and both BerkeleyDB and Lucene libraries in your classpath.
YARS is released under a BSD-style license.
Copyright (c) 2004, 2005, 2006, Andreas Harth
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Licensing of third party libraries and components required for ORDI:
In the following, we describe installation of YARS, plus usage example for the N3/HTTP interface and the WSML/ORDI interface.
All source code including third-party libraries is available in the DOME CVS with modulename yordi.
We also provide a current snapshot (yordi-20060630.tar.gz) of the contents for download.
YARS is distributed as a web application (war) archive for
deployment in a servlet container such as Apache Tomcat or Jetty. To deploy, copy the yars.war
file to the web applications directory of the servlet container and restart the
servlet container.
In the following, we describe how to interact with YARS using RDF/N3 files. For this purpose we provide a command-line client.
lib$ java -jar yars-api-0.3.jar
USAGE java -jar yars-api.jar [-p|-g|-d] [-q] -u <baseuri> -c <context> <file1> <file2> ... <fileN>
-p put (upload) data (--put)
-g get (query) (--get)
-d delete (remove) (--delete)
-q quiet (--quiet)
-u baseuri of yars instance (--baseuri)
-c context (--context)
-h this help (--help)
<file1>...<fileN> Notation3 files
Assuming a simple N3 file hello.n3:
@prefix ex: <http://example.org/> .
ex:subject ex:predicate "hello world" .
You can upload the contents of that file to YARS using the following command:
$ java -jar yars-api-0.3.jar -p -u http://localhost/yars/ -c world hello.n3
Sending data...done in 231 ms.
$
Point your web browser to http://localhost/yars/world to retrieve the content of the file you have uploaded.
Posing queries and deleting data works analogously.
In the following, we give a step-by-step description on how to set up YARS in conjunction with ORDI.
We illustrate the process with an example included in the ORDI distribution.
The StoreOntologyExample loads a WSML ontology in human-readable syntax, converts the ontology to WSML/RDF, and saves the ontology in an RDF repository.
Using YARS as ORDI repository backend requires the following adjustments in your already existing ORDI code.
We adapted the ordiexamples.StoreOntologyExample example from the ORDI distribution by doing the following:
createParams.put(TripleRepository.TRIPLESTORE_PROVIDER_CLASS, "org.deri.yordi.YARSTripleStore");createParams.put(YARSTripleStore.YARS_URI, "http://localhost:8180/yars/");
To compile and run the ordiexamples.StoreOntologyExample with ORDI/YARS:
yars-0.3.war in the lib/ directory)jars in lib/ to the classpath (part of the package are .classpath and .project files for the Eclipse IDE)src/org.deri.yordi classes and test/org.deri.yordi test casesStoreOntologyTest test casehttp://localhost/yars/context to see the RDF representation of the stored WSML fileWe have described the YARS ontology repository prototype in this document. YARS is a high-performance, 100% pure Java ontology repository based on RDF with a link to ORDI.
[Notation3] Tim Berners-Lee: An RDF language for the Semantic Web http://www.w3.org/DesignIssues/Notation3.html
[YARS] Andreas Harth, Stefan Decker: Optimized Index Structures for Querying RDF from the Web, 3rd Latin American Web Congress, Buenos Aires, Argentina, October 31 to November 2, 2005, pp. 71-80. http://sw.deri.org/2005/02/dexa/yars.pdf
[REST] Roy Thomas Fielding: Architectural Styles and the Design of Network-based Software Architectures, Ph.D. Thesis, University of California, Irvine, 2000. http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
$Id: FactSheet-20060630.html 3831 2006-06-29 13:36:52Z aharth $