Versa

From Wikipedia, the free encyclopedia

Versa is a RDF query language, used to query RDF data. Versa differs from most other RDF query languages, which are typically based on SQL or specialized XML vocabularies. Although the design of Versa was inspired by XPath, its compact, functional syntax also somewhat resembles Lisp. As of 2006, the only Versa implementation is in the Python-language, open-source 4Suite XML framework.

[edit] History and status

Versa's origins can be traced to 2000, when professional XML consultancy Fourthought, Inc. began developing RIL, an open, XML-based RDF inference language. RIL was implemented briefly in Fourthought's 4Suite Server product, which allowed for persistent storage and querying of an RDF model and associated XML document store.

In October 2001, the query portion of RIL was spun off into a separate project named Versa, with the intent that after Versa stabilized, development would resume in order to establish RIL as a formal language for working Versa query results. RIL development never resumed, however; inference capabilities in 4Suite were easily handled by XSLT extensions and did not require a separate language.

Versa initially had limitations that required the language to be redesigned. The overhaul was performed in late 2001 and early 2002 by software engineers from Sun Microsystems and Fourthought, in order to facilitate internal knowledge management applications at Sun and to drive applications that were in development for Fourthought's other clients. 4Suite's Versa library was used as the reference implementation, and a draft specification was published.

Versa development slowed in 2002, although Sun and Fourthought continued to work together to develop Versa based applications through 2004. In mid-2005, Chimezie Ogbuji and Daniel Krech began planning to fold the capabilities of 4Suite's outdated RDF libraries (4RDF), including Versa support, into RDFLib, which offers complementary features and would allow Versa to be used independently of 4Suite. This coincided with renewed interest in refining the Versa draft specification and publishing a "1.0" version.

As of 2006, the development of Versa is being coordinated primarily by Chimezie and Uche Ogbuji of Fourthought.

[edit] Syntax examples

Get the URIs of all known resources:

all()

Get the URIs of all known instances of type edu:Subject:

type(edu:Subject)

Get the rdfs:labels of all edu:Subjects having one or more rdfs:label:

type(edu:Subject) - rdfs:label -> *

Get the URIs of all edu:Subjects having a rdfs:label matching "Russian language":

type(edu:Subject) |- rdfs:label -> eq("Russian language")

Get the URIs of all "super-edu:Subjects" (transitively) of the edu:Subject identified by "http://en.wikipedia.org/wiki/Russian_language":

traverse(@"http://en.wikipedia.org/wiki/Russian_language", @"http://example.com/education#subTopicOf",
         vtrav:forward, vtrav:transitive)


[edit] External links

In other languages