YARS: Yet Another RDF Store

yars logo

Introduction | Quick Start | Interface | Query Language | Publication | Download | FAQ | Mailing List

Introduction

YARS is a data store for RDF in Java and allows for querying RDF based on a declarative query language, which offers a somewhat higher abstraction layer than the APIs of RDF toolkits such as Jena or Redland. YARS uses Notation3 as a way of encoding facts and queries.

The interface for interacting with YARS is plain HTTP (GET, PUT, and DELETE) and is built upon the REST principle.

Much more information can be found on the YARS wiki.

The main requirement for YARS is to enable fast storage and retrieval of large amounts of RDF (in the order of millions of triples) while keeping a small footprint and a lightweight architecture approach.

Quick Start

Requirements

  1. download yars war file and deploy to webapps/yars.war in Tomcat
  2. disable the Tomcat security manager (or selectively allow YARS to access the local file system)
  3. point your browser to ${tomcat-uri}/yars/

You can issue queries using HTTP GET. Append the query (in N3QL) to ${tomcat-uri}/yars</context>, parameter "q". The results are currently returned in NTriples format, a subset of N3.

Doing a HTTP PUT to ${tomcat-uri}/yars</context> loads RDF in N3 format into the repository. You have to specify the context (location) where you want to put the set of triples you're uploading. You can use curl -T test/onetriple.nt tomcat-uri/yars/my_context -H "Content-Type: application/rdf+n3" to send the file using HTTP PUT.

Query Language

We are currently implementing a subset of Notation3 as query language (see N3 query for details). Notation3 is based on the RDF data model, but introduces variables and adds some syntactic sugar for graph quoting and lists. The current version supports the evaluation of tree-shaped datalog queries with one shared variable.

Query results are returned in RDF/NTRIPLES format.

The following shows a simple query that returns a list of identifiers for the resource with the predicate dc:title and the object "DERI".

@prefix ql: <http://www.w3.org/2004/12/ql#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .

<> ql:select {
   ?x dc:title "DERI" .
}; ql:where {
   ?x dc:title "DERI" .
} .

Interface

The method to interact with YARS is HTTP.

You can use any browser to issue queries. For all other operations you can use command-line tools such as wget (only GET), or curl (does also PUT and DELETE).

There is a JDBC-like API for YARS available that can be used to issue calls either locally or via HTTP within Java programs. ActiveRDF is a library for accessing RDF data from within Ruby programs by addressing RDF resources, classes, properties, etc. programmatically, without queries. RDF2Go is an abstraction over triple (and quad) stores and has support for YARS as a backend store.

The following operations are supported:

Add Data
Adding data is done using HTTP PUT. Import an N3 document. The context parameter denotes the name (URI) of the model, e.g. yars/my/context
Issue Queries
Queries are issued using HTTP GET. Query and retrieve the answer in RDF/NTRIPLES format. The q parameter (urlencoded) is used to pass the N3QL query.
Delete Data
Deleting data is done using HTTP DELETE. Currently only partially implemented. Remove the result of a query specified with the q parameter from the store

Contributors

YARS is released under a BSD-style license.

We use BerkeleyDB Java Edition for storing data in B+-Trees.

Publication

Andreas Harth, Stefan Decker. "Optimized Index Structures for Querying RDF from the Web". 3rd Latin American Web Congress, Buenos Aires - Argentina, Oct. 31 - Nov. 2 2005.

Download

Releases

Release beta3 (2006-06-28):

For stand-alone applications, you need .jars for BerkeleyDB and Lucene. These jars are already included in the .war.

Builds

Nightly builds (trunk)

Subversion

There is a subversion repository with full source code available.


$Id: index.html 4058 2006-07-21 11:52:53Z aharth $