W3C home > Mailing lists > Public > public-rdf-ruby@w3.org > March 2013

RDF.rb version 1.0.4 and 1.1.0.p0

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Sat, 23 Mar 2013 16:15:29 -0700
Message-Id: <E639286B-99E9-48BE-AA71-8B5533034798@greggkellogg.net>
To: "public-rdf-ruby@w3.org" <public-rdf-ruby@w3.org>
I just pushed out a fairly big update to RDF.rb, and a pre-release of RDF.rb version 1.1.

Primary changes in version 1.0.4 [1] include the following:

* Better validation of N-Triples, now passing 100% of the N-Triples test suite at <https://dvcs.w3.org/hg/rdf/raw-file/default/rdf-turtle/tests-nt/manifest.ttl>; mostly through the use of RegExps from RDF::Turtle. It also includes the \f and \b escape sequences.
* Added Term#to_base to create a single method (overridden, of course) for serializing to the N-Triples format.
* Updated deprecation notices: Named graphs are only supported when projected from a repo supporting contexts, which is now not the case. In RDF 1.1, graphs don't have names, a dataset as zero of more <name,graph> pairs. Note that names are also restricted to be URIs, and we may want to add this as supports? feature, but I don't see a big reason to remove it altogether.
* Fixed Format.reader_symbols and Format.writer_symbols to not fault in all readers/writers. Also added Format.reader_types/writer_types. reader_types is not used in Util::File.open_file to add appropriate Accept entries (in addition to */*;q=0.1). (This fixes issue #107)
* Added Enumerable#to_{writer} and Mutable#from_{reader} based on those symbols, so that you can now do, e.g., RDF::Graph.new.to_ttl, if RDF::Turtle::Reader is included. (Fixes issue #105)
* Backed of on undef_object in Vocab and Solution.
* Fixed JRuby issue with Queryable#first, which behaved differently than other rubies for pretty obscure reasons.
* RDF::List and RDF::Graph now mixin RDF::Value instead of RDF::Term. RDF::Term is reserved just for things which can be in an RDF::Statement.

Additionally, Release 1.1.0.p0 [2] makes the following incompatible changes:

* Support for Ruby <= 1.9 is dropped; with the coming final release of Ruby 2.0, there is no longer any need for deployment on earlier versions (particularly Ruby Enterprise Edition) and it is getting to be more difficult to support.
* All literals are typed; plain literals now get xsd:string (which has been SPARQL behavior) and language tagged literals get rdf:langString. These are both compatible with changes introduced in RDF 1.1 Concepts [3].
* Generating RDF for lists no does not output rdf:type rdf:Collection, but allows any other properties, as long as rdf:rest has a single value which is either a BNode or rdf:nil; this allows for inference rules on intermediate nodes without invalidating it as a list.
* RDF::Graph now may be used as a projection on an RDF::Repository (or other enumerable). It only supports named graphs if the repository supports contexts. Previously, you could create a graph instance with a name, disconnected from a repository. In RDF 1.1, graphs do not have names; they are associated with names only in the context of a dataset.
* Adds RDF::Dataset and RDF::IRI as class aliases to RDF::Repository and RDF::URI respectively.

Expect Release 1.1 to be made officially around the time of the RDF 1.1 candidate release, in the mean time, certain semantics are subject to change, but it should be fairly stable. I'd certainly like feedback on the version 1.1.0.p0 differences.

To install version 1.1.0.p0 (or any other pre-release), try the following:

gem install rdf --pre

Gregg Kellogg

[1] https://rubygems.org/gems/rdf
[2] https://rubygems.org/gems/rdf/versions/1.1.0.p0
[3] http://www.w3.org/TR/rdf11-concepts/
Received on Saturday, 23 March 2013 23:15:59 GMT

This archive was generated by hypermail 2.3.1 : Saturday, 23 March 2013 23:15:59 GMT