Introduction | Quick Start | Interface | Query Language | Publication | Download | FAQ | Mailing List
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.
Requirements
${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.
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" .
} .
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:
context parameter denotes the name (URI) of the model, e.g. yars/my/contextq parameter (urlencoded) is used to pass the N3QL query.q parameter from the storeYARS is released under a BSD-style license.
We use BerkeleyDB Java Edition for storing data in B+-Trees.
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.
Release beta3 (2006-06-28):
For stand-alone applications, you need .jars for BerkeleyDB and Lucene. These jars are already included in the .war.
Nightly builds (trunk)
There is a subversion repository with full source code available.