logo

DIP D2.5: YARS Ontology Repository

Prototype Fact Sheet, 30 June 2006

This version:
http://sw.deri.org/2005/03/diprdf/FactSheet-20060630
Latest version:
http://sw.deri.org/2005/03/diprdf/FactSheet
Previous version:
http://sw.deri.org/2005/03/diprdf/FactSheet-20051231 

Author:
Andreas Harth, NUIG, andreas.harth@deri.org
Reviewers :
Gábor Nagypál, FZI Karlsruhe, Nagypal@fzi.de
Damyan Ognyanoff, Sirma, damyan@sirma.bg

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.


Document Information

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
Prototype Report Dissemination Ontology
Dissemination Level
Public Consortium

Authors Andreas Harth (National University of Ireland, Galway)
Responsible Author
Andreas Harth Email andreas.harth@deri.org
Partner NUIG Phone +353 85 702 1881

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
Gábor Nagypál Email Nagypal@fzi.de
Partner FZI Karlsruhe Phone +49-721-9654-714
2
Damyan Ognyanoff Email damyan@sirma.bg
Partner Sirma Phone +359 2 9768 303

 


 

Table of contents

1. Availability and Contacts
2. Purpose and Functionality
3. Requirements
4. Licensing
4.1. YARS License Agreement
4.2. Licensing of Third Party Libraries
5. Installation and Usage
5.1. Download
5.2. Installation of YARS Web Application
5.3. N3 Usage Example
5.4. ORDI Usage Example
6. Conclusion
References

1 Availability and Contacts

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

2 Purpose and Functionality

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.

3 Requirements

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.

4 Licensing

YARS is released under a BSD-style license.

4.1 YARS License Agreement

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.

4.2 Licensing of Third Party Libraries

Licensing of third party libraries and components required for ORDI:

5 Installation and Usage

In the following, we describe installation of YARS, plus usage example for the N3/HTTP interface and the WSML/ORDI interface.

5.1 Download

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.

5.2 Installation of YARS Web Application

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.

5.3 N3 Usage Example

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.

5.4 ORDI Usage Example

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:

To compile and run the ordiexamples.StoreOntologyExample with ORDI/YARS:

  1. Download the YORDI package
  2. Install the YARS web application (you find yars-0.3.war in the lib/ directory)
  3. Add all jars in lib/ to the classpath (part of the package are .classpath and .project files for the Eclipse IDE)
  4. Compile src/org.deri.yordi classes and test/org.deri.yordi test cases
  5. Run the StoreOntologyTest test case
  6. Point your browser to http://localhost/yars/context to see the RDF representation of the stored WSML file

6 Conclusion

We 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.

References

[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 $