README.md in rdf-3.2.12 vs README.md in rdf-3.3.0

- old
+ new

@@ -12,30 +12,32 @@ ## Table of contents 1. [Features](#features) 2. [Differences between RDF 1.0 and RDF 1.1](#differences-between-rdf-1-0-and-rdf-1-1) -3. [Tutorials](#tutorials) -4. [Command Line](#command-line) -5. [Examples](#examples) -6. [Reader/Writer convenience methods](#reader/writer-convenience-methods) -7. [RDF* (RDFStar)](#rdf*-(rdfstar)) -8. [Documentation](#documentation) -9. [Dependencies](#dependencies) -10. [Installation](#installation) -11. [Download](#download) -12. [Resources](#resources) -13. [Mailing List](#mailing-list) -14. [Authors](#authors) -15. [Contributors](#contributors) -16. [Contributing](#contributing) -17. [License](#license) +3. [Differences between RDF 1.1 and RDF 1.2](#differences-between-rdf-1-1-and-rdf-1-2) +4. [Tutorials](#tutorials) +5. [Command Line](#command-line) +6. [Examples](#examples) +7. [Reader/Writer convenience methods](#reader/writer-convenience-methods) +8. [RDF 1.2](#rdf\_12) +9. [Documentation](#documentation) +10. [Dependencies](#dependencies) +11. [Installation](#installation) +12. [Download](#download) +13. [Resources](#resources) +14. [Mailing List](#mailing-list) +15. [Authors](#authors) +16. [Contributors](#contributors) +17. [Contributing](#contributing) +18. [License](#license) ## Features * 100% pure Ruby with minimal dependencies and no bloat. * Fully compatible with [RDF 1.1][] specifications. +* Provisional support for [RDF 1.2][] specifications. * 100% free and unencumbered [public domain](https://unlicense.org/) software. * Provides a clean, well-designed RDF object model and related APIs. * Supports parsing and serializing [N-Triples][] and [N-Quads][] out of the box, with more serialization format support available through add-on extensions. * Includes in-memory graph and repository implementations, with more storage @@ -43,15 +45,14 @@ * Implements basic graph pattern (BGP) query evaluation. * Plays nice with others: entirely contained in the `RDF` module, and does not modify any of Ruby's core classes or standard library. * Based entirely on Ruby's autoloading, meaning that you can generally make use of any one part of the library without needing to load up the rest. -* Compatible with Ruby Ruby >= 2.4, Rubinius and JRuby 9.0+. - * Note, changes in mapping hashes to keyword arguments for Ruby 2.7+ may require that arguments be passed more explicitly, especially when the first argument is a Hash and there are optional keyword arguments. In this case, Hash argument may need to be explicitly included within `{}` and the optional keyword arguments may need to be specified using `**{}` if there are no keyword arguments. +* Compatible with Ruby Ruby >= 3.0, Rubinius and JRuby 9.0+. + * Note, changes in mapping hashes to keyword arguments for Ruby 3+ may require that arguments be passed more explicitly, especially when the first argument is a Hash and there are optional keyword arguments. In this case, Hash argument may need to be explicitly included within `{}` and the optional keyword arguments may need to be specified using `**{}` if there are no keyword arguments. * Performs auto-detection of input to select appropriate Reader class if one cannot be determined from file characteristics. -* Provisional support for [RDF*][]. ### HTTP requests RDF.rb uses `Net::HTTP` for retrieving HTTP and HTTPS resources. If the [RestClient][] gem is included, that will be used instead to retrieve remote @@ -100,10 +101,14 @@ * {RDF::StrictVocabulary} added with an easy way to keep vocabulary definitions up to date based on their OWL or RDFS definitions. Most vocabularies are now StrictVocabularies meaning that an attempt to resolve a particular term in that vocabulary will error if the term is not defined in the vocabulary. * New vocabulary definitions have been added for [ICal](http://www.w3.org/2002/12/cal/icaltzd#), [Media Annotations (MA)](http://www.w3.org/ns/ma-ont#), [Facebook OpenGraph (OG)](http://ogp.me/ns#), [PROV](http://www.w3.org/ns/prov#), [SKOS-XL (SKOSXL)](http://www.w3.org/2008/05/skos-xl#), [Data Vocabulary (V)](http://rdf.data-vocabulary.org/), [VCard](http://www.w3.org/2006/vcard/ns#), [VOID](http://rdfs.org/ns/void#http://rdfs.org/ns/void#), [Powder-S (WDRS)](http://www.w3.org/2007/05/powder-s#), and [XHV](http://www.w3.org/1999/xhtml/vocab#). Notably, {RDF::Queryable#query} and {RDF::Query#execute} are now completely symmetric; this allows an implementation of {RDF::Queryable} to optimize queries using implementation-specific logic, allowing for substantial performance improvements when executing BGP queries. +## Differences between RDF 1.1 and RDF 1.2 +* {RDF::Literal} has an optional `direction` property for directional language-tagged strings. +* Removes support for legacy `text/plain` (as an alias for `application/n-triples`) and `text/x-nquads` (as an alias for `application/n-quads`) + ## Tutorials * [Getting data from the Semantic Web using Ruby and RDF.rb](https://semanticweb.org/wiki/Getting_data_from_the_Semantic_Web_%28Ruby%29) * [Using RDF.rb and Spira to process RDF data from the British Ordnance Survey](https://stephenpope.co.uk/?p=85) * [Getting started with RDF and SPARQL using 4store and RDF.rb](https://www.jenitennison.com/blog/node/152) @@ -258,43 +263,37 @@ foaf = RDF::Vocabulary.new("http://xmlns.com/foaf/0.1/") foaf.knows #=> RDF::URI("http://xmlns.com/foaf/0.1/knows") foaf[:name] #=> RDF::URI("http://xmlns.com/foaf/0.1/name") foaf['mbox'] #=> RDF::URI("http://xmlns.com/foaf/0.1/mbox") -## RDF* (RDFStar) +## RDF 1.2 -[RDF.rb][] includes provisional support for [RDF*][] with an N-Triples/N-Quads syntax extension that uses inline statements in the _subject_ or _object_ position. +[RDF.rb][] includes provisional support for [RDF 1.2][] with an N-Triples/N-Quads syntax for quoted triples in the _subject_ or _object_ position. +[RDF.rb][] includes provisional support for [RDF 1.2][] directional language-tagged strings, which are literals of type `rdf:dirLangString` having both a `language` and `direction`. Internally, an `RDF::Statement` is treated as another resource, along with `RDF::URI` and `RDF::Node`, which allows an `RDF::Statement` to have a `#subject` or `#object` which is also an `RDF::Statement`. **Note: This feature is subject to change or elimination as the standards process progresses.** -### Serializing a Graph containing embedded statements +### Serializing a Graph containing quoted triples require 'rdf/ntriples' statement = RDF::Statement(RDF::URI('bob'), RDF::Vocab::FOAF.age, RDF::Literal(23)) graph = RDF::Graph.new << [statement, RDF::URI("ex:certainty"), RDF::Literal(0.9)] graph.dump(:ntriples, validate: false) # => '<<<bob> <http://xmlns.com/foaf/0.1/age> "23"^^<http://www.w3.org/2001/XMLSchema#integer>>> <ex:certainty> "0.9"^^<http://www.w3.org/2001/XMLSchema#double> .' -### Reading a Graph containing embedded statements +### Reading a Graph containing quoted triples By default, the N-Triples reader will reject a document containing a subject resource. nt = '<<<bob> <http://xmlns.com/foaf/0.1/age> "23"^^<http://www.w3.org/2001/XMLSchema#integer>>> <ex:certainty> "0.9"^^<http://www.w3.org/2001/XMLSchema#double> .' graph = RDF::Graph.new do |graph| RDF::NTriples::Reader.new(nt) {|reader| graph << reader} end # => RDF::ReaderError -Readers support a boolean valued `rdfstar` option. - - graph = RDF::Graph.new do |graph| - RDF::NTriples::Reader.new(nt, rdfstar: true) {|reader| graph << reader} - end - graph.count #=> 1 - ## Documentation <https://ruby-rdf.github.io/rdf> ### RDF Object Model @@ -396,20 +395,21 @@ * {RDF::XSD} - XML Schema (XSD) ## Dependencies -* [Ruby](https://ruby-lang.org/) (>= 2.6) +* [Ruby](https://ruby-lang.org/) (>= 3.0) * [LinkHeader][] (>= 0.0.8) +* [bcp47_spec][] ( ~> 0.2) * Soft dependency on [RestClient][] (>= 2.1) ## Installation The recommended installation method is via [RubyGems](https://rubygems.org/). To install the latest official release of RDF.rb, do: - % [sudo] gem install rdf # Ruby 2.6+ + % [sudo] gem install rdf # Ruby 3+ ## Download To get a local working copy of the development repository, do: @@ -479,12 +479,14 @@ This is free and unencumbered public domain software. For more information, see <https://unlicense.org/> or the accompanying {file:UNLICENSE} file. [RDF]: https://www.w3.org/RDF/ -[N-Triples]: https://www.w3.org/TR/n-triples/ -[N-Quads]: https://www.w3.org/TR/n-quads/ +[LinkHeader]: https://github.com/asplake/link_header +[bcp47_spec]: https://github.com/dadah89/bcp47_spec +[N-Triples]: https://www.w3.org/TR/rdf-n-triples/ +[N-Quads]: https://www.w3.org/TR/rdf-n-quads/ [YARD]: https://yardoc.org/ [YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md [PDD]: https://unlicense.org/#unlicensing-contributions [JSONLD doc]: https://ruby-rdf.github.io/json-ld [LinkedData doc]: https://ruby-rdf.github.io/linkeddata @@ -494,10 +496,11 @@ [RDFXML doc]: https://ruby-rdf.github.io/rdf-rdfxml [Turtle doc]: https://ruby-rdf.github.io/rdf-turtle [SPARQL doc]: https://ruby-rdf.github.io/sparql [RDF 1.0]: https://www.w3.org/TR/2004/REC-rdf-concepts-20040210/ [RDF 1.1]: https://www.w3.org/TR/rdf11-concepts/ +[RDF 1.2]: https://www.w3.org/TR/rdf12-concepts/ [SPARQL 1.1]: https://www.w3.org/TR/sparql11-query/ [RDF.rb]: https://ruby-rdf.github.io/ [RDF::DO]: https://ruby-rdf.github.io/rdf-do [RDF::Mongo]: https://ruby-rdf.github.io/rdf-mongo [RDF::Sesame]: https://ruby-rdf.github.io/rdf-sesame @@ -508,10 +511,9 @@ [RDF::RDFXML]: https://ruby-rdf.github.io/rdf-rdfxml [RDF::TriG]: https://ruby-rdf.github.io/rdf-trig [RDF::TriX]: https://ruby-rdf.github.io/rdf-trix [RDF::Turtle]: https://ruby-rdf.github.io/rdf-turtle [RDF::Raptor]: https://ruby-rdf.github.io/rdf-raptor -[RDF*]: https://w3c.github.io/rdf-star/rdf-star-cg-spec.html [LinkedData]: https://ruby-rdf.github.io/linkeddata [JSON::LD]: https://ruby-rdf.github.io/json-ld [RestClient]: https://rubygems.org/gems/rest-client [RestClient Components]: https://rubygems.org/gems/rest-client-components [Rack::Cache]: https://rtomayko.github.io/rack-cache/