Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 484 lines (375 sloc) 23.622 kB
7145c47 @gkellogg Added travis-ci badge.
gkellogg authored
1 # RDF.rb: Linked Data for Ruby
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
2
c553a11 @bendiken Added a link to the introductory blog post.
bendiken authored
3 This is a pure-Ruby library for working with [Resource Description Framework
4 (RDF)][RDF] data.
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
5
cf9bf59 @gkellogg Update README
gkellogg authored
6 * <http://ruby-rdf.github.com/rdf>
a812506 @bendiken Added a link to the What's New in RDF.rb 0.3.0 blog post.
bendiken authored
7 * <http://blog.datagraph.org/2010/12/rdf-for-ruby>
c553a11 @bendiken Added a link to the introductory blog post.
bendiken authored
8 * <http://blog.datagraph.org/2010/03/rdf-for-ruby>
a4a59f4 @bendiken Added a link to the parsing/serialization tutorial.
bendiken authored
9 * <http://blog.datagraph.org/2010/04/parsing-rdf-with-ruby>
80a5480 @bendiken Added a link to Ben's RDF::Repository tutorial.
bendiken authored
10 * <http://blog.datagraph.org/2010/04/rdf-repository-howto>
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
11
bcf3c3d @gkellogg Update gem badge.
gkellogg authored
12 [![Gem Version](https://badge.fury.io/rb/rdf.png)](http://badge.fury.io/rb/rdf)
d6c269c @gkellogg Update status tags in README
gkellogg authored
13 [![Build Status](https://travis-ci.org/ruby-rdf/rdf.png?branch=master)](http://travis-ci.org/ruby-rdf/rdf)
5958c49 @gkellogg Add Gitter badge to README.
gkellogg authored
14 [![Join the chat at https://gitter.im/ruby-rdf/rdf](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ruby-rdf/rdf?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
d6c269c @gkellogg Update status tags in README
gkellogg authored
15
7145c47 @gkellogg Added travis-ci badge.
gkellogg authored
16 ## Features
7ec6798 @bendiken Added a brief feature list to the README.
bendiken authored
17
81c2abf @bendiken Added a note about the library's use of autoloading.
bendiken authored
18 * 100% pure Ruby with minimal dependencies and no bloat.
eb88603 @gkellogg Alpha0 release of RDF 1.1.
gkellogg authored
19 * Fully compatible with [RDF 1.1][] specifications.
7ec6798 @bendiken Added a brief feature list to the README.
bendiken authored
20 * 100% free and unencumbered [public domain](http://unlicense.org/) software.
21 * Provides a clean, well-designed RDF object model and related APIs.
bdf3a46 @gkellogg Update DOAP and references for N-Triples/N-Quads.
gkellogg authored
22 * Supports parsing and serializing [N-Triples][] and [N-Quads][] out of the box, with more
f8551d4 @dwbutler Change terminology from "plugin" to "extension"
dwbutler authored
23 serialization format support available through add-on extensions.
962fe06 @bendiken Added a brief note about BGP queries to the README's feature list.
bendiken authored
24 * Includes in-memory graph and repository implementations, with more storage
4603223 @dwbutler Change terminology from "plugin" to "extension"
dwbutler authored
25 adapter support available through add-on extensions.
962fe06 @bendiken Added a brief note about BGP queries to the README's feature list.
bendiken authored
26 * Implements basic graph pattern (BGP) query evaluation.
7ec6798 @bendiken Added a brief feature list to the README.
bendiken authored
27 * Plays nice with others: entirely contained in the `RDF` module, and does
28 not modify any of Ruby's core classes or standard library.
81c2abf @bendiken Added a note about the library's use of autoloading.
bendiken authored
29 * Based entirely on Ruby's autoloading, meaning that you can generally make
30 use of any one part of the library without needing to load up the rest.
bb63255 @gkellogg Minimum Ruby version is 1.9.2
gkellogg authored
31 * Compatible with Ruby Ruby 1.9.2, Ruby 2.0, Rubinius and JRuby 1.7+.
cfeff6b @bendiken Bumped the minimum Ruby dependency to 1.8.7 (or 1.8.1 with Backports).
bendiken authored
32 * Compatible with older Ruby versions with the help of the [Backports][] gem.
08b329c @gkellogg Perform auto-detection of input to select appropriate Reader class if…
gkellogg authored
33 * Performs auto-detection of input to select appropriate Reader class if one
34 cannot be determined from file characteristics.
7ec6798 @bendiken Added a brief feature list to the README.
bendiken authored
35
7dd3a59 @gkellogg Use RestClient in Util::File.open_file, which can enable client-side …
gkellogg authored
36 ### HTTP requests
37
c54a6f1 @gkellogg Util::File.open_file now uses RestClient only if it is previously def…
gkellogg authored
38 RDF.rb uses `Net::HTTP` for retrieving HTTP and HTTPS resources. If the
39 [RestClient][] gem is included, that will be used instead to retrieve remote
40 resources. Clients may also consider using [RestClient Components][] to enable
41 client-side caching of HTTP results using [Rack::Cache][] or other Rack
42 middleware.
7dd3a59 @gkellogg Use RestClient in Util::File.open_file, which can enable client-side …
gkellogg authored
43
eb88603 @gkellogg Alpha0 release of RDF 1.1.
gkellogg authored
44 ## Differences between RDF 1.0 and RDF 1.1
45
46 This version of RDF.rb is fully compatible with [RDF 1.1][], but it creates some
47 marginal incompatibilities with [RDF 1.0][], as implemented in versions prior to
48 the 1.1 release of RDF.rb:
49
c21d556 @gkellogg Add more tests to verify that Query#execute is equivalent to Queryabl…
gkellogg authored
50 * Introduces {RDF::IRI}, as a synonym for {RDF::URI} either {RDF::IRI} or {RDF::URI} can be used interchangeably. Versions of RDF.rb prior to the 1.1 release were already compatible with IRIs. Internationalized Resource Identifiers (see [RFC3987][]) are a super-set of URIs (see [RFC3986][]) which allow for characters other than standard US-ASCII.
51 * {RDF::URI} no longer uses the `Addressable` gem. As URIs typically don't need to be parsed, this provides a substantial performance improvement when enumerating or querying graphs and repositories.
52 * {RDF::List} no longer emits a `rdf:List` type. However, it will now recognize any subjects that are {RDF::Node} instances as being list elements, as long as they have both `rdf:first` and `rdf:rest` predicates.
53 * {RDF::Graph} adding a `context` to a graph may only be done when the underlying storage model supports contexts (the default {RDF::Repository} does). The notion of `context` in RDF.rb is treated equivalently to [Named Graphs](http://www.w3.org/TR/rdf11-concepts/#dfn-named-graph) within an RDF Dataset, and graphs on their own are not named.
54 * {RDF::Graph}, {RDF::Statement} and {RDF::List} now include {RDF::Value}, and not {RDF::Resource}. Made it clear that using {RDF::Graph} does not mean that it may be used within an {RDF::Statement}, for this see {RDF::Term}.
55 * {RDF::Statement} now is stricter about checking that all elements are valid when validating.
56 * {RDF::NTriples::Writer} and {RDF::NQuads::Writer} now default to validate output, only allowing valid statements to be emitted. This may disabled by setting the `:validate` option to `false`.
57 * {RDF::Dataset} is introduced as a class alias of {RDF::Repository}. This allows closer alignment to the RDF concept of [Dataset](http://www.w3.org/TR/rdf11-concepts/#dfn-dataset).
bda1796 @gkellogg Update README with new RDF::Query::Solutions behavior.
gkellogg authored
58 * The `context` (or `name`) of a named graph within a Dataset or Repository may be either an {RDF::IRI} or {RDF::Node}. Implementations of repositories may restrict this to being only {RDF::IRI}.
c21d556 @gkellogg Add more tests to verify that Query#execute is equivalent to Queryabl…
gkellogg authored
59 * There are substantial and somewhat incompatible changes to {RDF::Literal}. In [RDF 1.1][], all literals are typed, including plain literals and language tagged literals. Internally, plain literals are given the `xsd:string` datatype and language tagged literals are given the `rdf:langString` datatype. Creating a plain literal, without a datatype or language, will automatically provide the `xsd:string` datatype; similar for language tagged literals. Note that most serialization formats will remove this datatype. Code which depends on a literal having the `xsd:string` datatype being different from a plain literal (formally, without a datatype) may break. However note that the `#has\_datatype?` will continue to return `false` for plain or language-tagged literals.
82013d3 @gkellogg Refactor to back-off extensive Enumerator changes to RDF::Query. RDF:…
gkellogg authored
60 * {RDF::Query#execute} now accepts a block and returns {RDF::Query::Solutions}. This allows `enumerable.query(query)` to behave like `query.execute(enumerable)` and either return an enumerable or yield each solution.
61 * {RDF::Queryable#query} now returns {RDF::Query::Solutions} instead of an Enumerator if it's argument is an {RDF::Query}.
207d8be @gkellogg Update RDF::Util::File.open_file to use Net::HTTP, follow redirects, …
gkellogg authored
62 * {RDF::Util::File.open\_file} now performs redirects and manages `base_uri` based on W3C recommendations:
63 * `base_uri` is set to the original URI if a status 303 is provided, otherwise any other redirect will set `base_uri` to the redirected location.
64 * `base_uri` is set to the content of the `Location` header if status is _success_.
65 * Additionally, {RDF::Util::File.open\_file} sets the result encoding from `charset` if provided, defaulting to `UTF-8`. Other access methods include `last_modified` and `content_type`,
0e9c76c @gkellogg Finish StrictVocabularies.
gkellogg authored
66 * {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.
67 * 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#).
eb88603 @gkellogg Alpha0 release of RDF 1.1.
gkellogg authored
68
207d8be @gkellogg Update RDF::Util::File.open_file to use Net::HTTP, follow redirects, …
gkellogg authored
69 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.
c21d556 @gkellogg Add more tests to verify that Query#execute is equivalent to Queryabl…
gkellogg authored
70
7145c47 @gkellogg Added travis-ci badge.
gkellogg authored
71 ## Tutorials
ae4fbfb @bendiken Added links to existing RDF.rb tutorials.
bendiken authored
72
27a330e @gkellogg Yard documentation updates.
gkellogg authored
73 * [Getting data from the Semantic Web using Ruby and RDF.rb](http://semanticweb.org/wiki/Getting_data_from_the_Semantic_Web_%28Ruby%29)
74 * [Using RDF.rb and Spira to process RDF data from the British Ordnance Survey](http://stephenpope.co.uk/?p=85)
75 * [Getting started with RDF and SPARQL using 4store and RDF.rb](http://www.jenitennison.com/blog/node/152)
76
7145c47 @gkellogg Added travis-ci badge.
gkellogg authored
77 ## Command Line
27a330e @gkellogg Yard documentation updates.
gkellogg authored
78 When installed, RDF.rb includes a `rdf` shell script which acts as a wrapper to perform a number of different
79 operations on RDF files using available readers and writers.
80
bdf3a46 @gkellogg Update DOAP and references for N-Triples/N-Quads.
gkellogg authored
81 * `serialize`: Parse an RDF input and re-serializing to [N-Triples][] or another available format using `--output-format` option.
27a330e @gkellogg Yard documentation updates.
gkellogg authored
82 * `count`: Parse and RDF input and count the number of statements.
83 * `subjects`: Returns unique subjects from parsed input.
84 * `objects`: Returns unique objects from parsed input.
85 * `predicates`: Returns unique objects from parsed input.
ae4fbfb @bendiken Added links to existing RDF.rb tutorials.
bendiken authored
86
7145c47 @gkellogg Added travis-ci badge.
gkellogg authored
87 ## Examples
3589db2 @bendiken Added a simple usage example.
bendiken authored
88
89 require 'rdf'
97f43f3 @bendiken Added a BGP query code example to the README file.
bendiken authored
90 include RDF
3589db2 @bendiken Added a simple usage example.
bendiken authored
91
bdf3a46 @gkellogg Update DOAP and references for N-Triples/N-Quads.
gkellogg authored
92 ### Writing RDF data using the [N-Triples][] format
3589db2 @bendiken Added a simple usage example.
bendiken authored
93
dd48434 @bendiken Started updating and improving the README (long overdue).
bendiken authored
94 require 'rdf/ntriples'
0443149 @gkellogg Documentation improvement.
gkellogg authored
95 graph = RDF::Graph.new << [:hello, RDF::DC.title, "Hello, world!"]
96 graph.dump(:ntriples)
bd7bd66 @bendiken Updated usage examples.
bendiken authored
97
0443149 @gkellogg Documentation improvement.
gkellogg authored
98 or
99
909cd9b @gkellogg Fix README example indentation bug.
gkellogg authored
100 RDF::Writer.open("hello.nt") { |writer| writer << graph }
dd48434 @bendiken Started updating and improving the README (long overdue).
bendiken authored
101
bdf3a46 @gkellogg Update DOAP and references for N-Triples/N-Quads.
gkellogg authored
102 ### Reading RDF data in the [N-Triples][] format
dd48434 @bendiken Started updating and improving the README (long overdue).
bendiken authored
103
104 require 'rdf/ntriples'
cf9bf59 @gkellogg Update README
gkellogg authored
105 graph = RDF::Graph.load("http://ruby-rdf.github.com/rdf/etc/doap.nt")
dd48434 @bendiken Started updating and improving the README (long overdue).
bendiken authored
106
0443149 @gkellogg Documentation improvement.
gkellogg authored
107 or
108
cf9bf59 @gkellogg Update README
gkellogg authored
109 RDF::Reader.open("http://ruby-rdf.github.com/rdf/etc/doap.nt") do |reader|
dd48434 @bendiken Started updating and improving the README (long overdue).
bendiken authored
110 reader.each_statement do |statement|
111 puts statement.inspect
112 end
113 end
3589db2 @bendiken Added a simple usage example.
bendiken authored
114
27a330e @gkellogg Yard documentation updates.
gkellogg authored
115 ### Reading RDF data in other formats
0443149 @gkellogg Documentation improvement.
gkellogg authored
116 {RDF::Reader.open} and {RDF::Repository.load} use a number of mechanisms to determine the appropriate reader
117 to use when loading a file. The specific format to use can be forced using, e.g. `:format => :ntriples`
118 option where the specific format symbol is determined by the available readers. Both also use
119 MimeType or file extension, where available.
f4b7b64 @gkellogg NQuads support.
gkellogg authored
120
382bd27 @gkellogg Improve README example specs.
gkellogg authored
121 require 'rdf/nquads'
0443149 @gkellogg Documentation improvement.
gkellogg authored
122
cf9bf59 @gkellogg Update README
gkellogg authored
123 graph = RDF::Graph.load("http://ruby-rdf.github.com/rdf/etc/doap.nq", :format => :nquads)
f4b7b64 @gkellogg NQuads support.
gkellogg authored
124
0443149 @gkellogg Documentation improvement.
gkellogg authored
125 A specific sub-type of Reader can also be invoked directly:
f4b7b64 @gkellogg NQuads support.
gkellogg authored
126
127 require 'rdf/nquads'
128
cf9bf59 @gkellogg Update README
gkellogg authored
129 RDF::NQuads::Reader.open("http://ruby-rdf.github.com/rdf/etc/doap.nq") do |reader|
f4b7b64 @gkellogg NQuads support.
gkellogg authored
130 reader.each_statement do |statement|
131 puts statement.inspect
132 end
133 end
134
27a330e @gkellogg Yard documentation updates.
gkellogg authored
135 Reader/Writer implementations may override {RDF::Format.detect}, which takes a small sample if input
136 and return a boolean indicating if it matches that specific format. In the case that a format cannot
137 be detected from filename or other options, or that more than one format is identified,
138 {RDF::Format.for} will query each loaded format by invoking it's `detect` method, and the first successful
139 match will be used to read the input.
140
0443149 @gkellogg Documentation improvement.
gkellogg authored
141 ### Writing RDF data using other formats
27a330e @gkellogg Yard documentation updates.
gkellogg authored
142 {RDF::Writer.open}, {RDF::Enumerable#dump}, {RDF::Writer.dump} take similar options to {RDF::Reader.open} to determine the
0443149 @gkellogg Documentation improvement.
gkellogg authored
143 appropriate writer to use.
144
145 require 'linkeddata'
146
147 RDF::Writer.open("hello.nq", :format => :nquads) do |writer|
148 writer << RDF::Repository.new do |repo|
149 repo << RDF::Statement.new(:hello, RDF::DC.title, "Hello, world!", :context => RDF::URI("context"))
150 end
151 end
152
153 A specific sub-type of Writer can also be invoked directly:
154
382bd27 @gkellogg Improve README example specs.
gkellogg authored
155 require 'rdf/nquads'
156
157 repo = RDF::Repository.new << RDF::Statement.new(:hello, RDF::DC.title, "Hello, world!", :context => RDF::URI("context"))
158 File.open("hello.nq", "w") {|f| f << repo.dump(:nquads)}
0443149 @gkellogg Documentation improvement.
gkellogg authored
159
3ff7ee9 @gkellogg Added Enumerable#to_{writer} and Mutable#from_{reader} behavior in me…
gkellogg authored
160 ## Reader/Writer convenience methods
161 {RDF::Enumerable} implements `to_{format}` for each available instance of {RDF::Reader}.
162 For example, if `rdf/turtle` is loaded, this allows the following:
163
164 graph = RDF::Graph.new << [:hello, RDF::DC.title, "Hello, world!"]
165 graph.to_ttl
166
167 Similarly, {RDF::Mutable} implements `from_{format}` for each available instance
168 of {RDF::Writer}. For example:
169
170 graph = RDF::Graph.new
171 graph.from_ttl("[ a <http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource>]")
172
173 Note that no prefixes are loaded automatically, however they can be provided as arguments:
174
175 graph.from_ttl("[ a rdf:Resource]", :prefixes => {:rdf => RDF.to_uri})
176
97f43f3 @bendiken Added a BGP query code example to the README file.
bendiken authored
177 ### Querying RDF data using basic graph patterns (BGPs)
bd7bd66 @bendiken Updated usage examples.
bendiken authored
178
97f43f3 @bendiken Added a BGP query code example to the README file.
bendiken authored
179 require 'rdf/ntriples'
bd7bd66 @bendiken Updated usage examples.
bendiken authored
180
cf9bf59 @gkellogg Update README
gkellogg authored
181 graph = RDF::Graph.load("http://ruby-rdf.github.com/rdf/etc/doap.nt")
97f43f3 @bendiken Added a BGP query code example to the README file.
bendiken authored
182 query = RDF::Query.new({
183 :person => {
184 RDF.type => FOAF.Person,
185 FOAF.name => :name,
186 FOAF.mbox => :email,
187 }
188 })
189
c21d556 @gkellogg Add more tests to verify that Query#execute is equivalent to Queryabl…
gkellogg authored
190 query.execute(graph) do |solution|
191 puts "name=#{solution.name} email=#{solution.email}"
192 end
193
194 The same query may also be run from the graph:
195
196 graph.query(query) do |solution|
97f43f3 @bendiken Added a BGP query code example to the README file.
bendiken authored
197 puts "name=#{solution.name} email=#{solution.email}"
198 end
199
c21d556 @gkellogg Add more tests to verify that Query#execute is equivalent to Queryabl…
gkellogg authored
200 In general, querying from using the `queryable` instance allows a specific implementation of `queryable` to perform query optimizations specific to the datastore on which it is based.
201
27a330e @gkellogg Yard documentation updates.
gkellogg authored
202 A separate [SPARQL][SPARQL doc] gem builds on basic BGP support to provide full support for [SPARQL 1.0](http://www.w3.org/TR/rdf-sparql-query/) queries.
203
97f43f3 @bendiken Added a BGP query code example to the README file.
bendiken authored
204 ### Using pre-defined RDF vocabularies
205
ecba294 @bendiken Improved RDF::Vocabulary specs.
bendiken authored
206 DC.title #=> RDF::URI("http://purl.org/dc/terms/title")
a34c30d @bendiken Added usage examples.
bendiken authored
207 FOAF.knows #=> RDF::URI("http://xmlns.com/foaf/0.1/knows")
6c2a21d @bendiken Added an RDF.type code example.
bendiken authored
208 RDF.type #=> RDF::URI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")
a34c30d @bendiken Added usage examples.
bendiken authored
209 RDFS.seeAlso #=> RDF::URI("http://www.w3.org/2000/01/rdf-schema#seeAlso")
210 RSS.title #=> RDF::URI("http://purl.org/rss/1.0/title")
211 OWL.sameAs #=> RDF::URI("http://www.w3.org/2002/07/owl#sameAs")
212 XSD.dateTime #=> RDF::URI("http://www.w3.org/2001/XMLSchema#dateTime")
213
214 ### Using ad-hoc RDF vocabularies
215
216 foaf = RDF::Vocabulary.new("http://xmlns.com/foaf/0.1/")
217 foaf.knows #=> RDF::URI("http://xmlns.com/foaf/0.1/knows")
483f9a4 @bendiken Added usage examples.
bendiken authored
218 foaf[:name] #=> RDF::URI("http://xmlns.com/foaf/0.1/name")
219 foaf['mbox'] #=> RDF::URI("http://xmlns.com/foaf/0.1/mbox")
bd7bd66 @bendiken Updated usage examples.
bendiken authored
220
7145c47 @gkellogg Added travis-ci badge.
gkellogg authored
221 ## Documentation
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
222
60009a2 @gkellogg Update ruby-rdf links.
gkellogg authored
223 <http://rubydoc.info/github/ruby-rdf/rdf/frames>
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
224
1eb1c3e @bendiken Updated README.
bendiken authored
225 ### RDF Object Model
62c7dda @bendiken Fleshed out the object model.
bendiken authored
226
dd48434 @bendiken Started updating and improving the README (long overdue).
bendiken authored
227 <http://blog.datagraph.org/2010/03/rdf-for-ruby>
228
09f7916 @bendiken Updated README.
bendiken authored
229 * {RDF::Value}
a60f64d @bendiken Added an RDF::Term mixin module to supplement RDF::Value.
bendiken authored
230 * {RDF::Term}
231 * {RDF::Literal}
27a330e @gkellogg Yard documentation updates.
gkellogg authored
232 * {RDF::Literal::Boolean}
233 * {RDF::Literal::Date}
234 * {RDF::Literal::DateTime}
235 * {RDF::Literal::Decimal}
236 * {RDF::Literal::Double}
237 * {RDF::Literal::Integer}
238 * {RDF::Literal::Time}
f8551d4 @dwbutler Change terminology from "plugin" to "extension"
dwbutler authored
239 * [RDF::XSD](http://rubydoc.info/github/gkellogg/rdf-xsd/master/frames) (extension)
a60f64d @bendiken Added an RDF::Term mixin module to supplement RDF::Value.
bendiken authored
240 * {RDF::Resource}
241 * {RDF::Node}
242 * {RDF::URI}
cfdac64 @gkellogg Update class heirarchy in the readme.
gkellogg authored
243 * {RDF::List}
244 * {RDF::Graph}
6ed7d18 @bendiken Added links to all current plugins.
bendiken authored
245 * {RDF::Statement}
62c7dda @bendiken Fleshed out the object model.
bendiken authored
246
247 ### RDF Serialization
248
dd48434 @bendiken Started updating and improving the README (long overdue).
bendiken authored
249 <http://blog.datagraph.org/2010/04/parsing-rdf-with-ruby>
250
09f7916 @bendiken Updated README.
bendiken authored
251 * {RDF::Format}
252 * {RDF::Reader}
253 * {RDF::Writer}
62c7dda @bendiken Fleshed out the object model.
bendiken authored
254
09f7916 @bendiken Updated README.
bendiken authored
255 ### RDF Serialization Formats
c76e09e @bendiken Added links to vocabulary documentation.
bendiken authored
256
0443149 @gkellogg Documentation improvement.
gkellogg authored
257 The following is a partial list of RDF formats implemented either natively, or through the inclusion of
258 other gems:
259
09f7916 @bendiken Updated README.
bendiken authored
260 * {RDF::NTriples}
f4b7b64 @gkellogg NQuads support.
gkellogg authored
261 * {RDF::NQuads}
4603223 @dwbutler Change terminology from "plugin" to "extension"
dwbutler authored
262 * [JSON::LD][] (extension)
263 * [RDF::JSON][] (extension)
264 * [RDF::Microdata][] (extension)
265 * [RDF::N3][] (extension)
266 * [RDF::Raptor::RDFXML](http://ruby-rdf.github.io/rdf-raptor) (extension)
267 * [RDF::Raptor::Turtle](http://ruby-rdf.github.io/rdf-raptor) (extension)
268 * [RDF::RDFa][] (extension)
269 * [RDF::RDFXML][] (extension)
270 * [RDF::TriG][] (extension)
271 * [RDF::TriX][] (extension)
272 * [RDF::Turtle][] (extension)
0443149 @gkellogg Documentation improvement.
gkellogg authored
273
274 The meta-gem [LinkedData][LinkedData doc] includes many of these gems.
c76e09e @bendiken Added links to vocabulary documentation.
bendiken authored
275
eb88603 @gkellogg Alpha0 release of RDF 1.1.
gkellogg authored
276 ### RDF Datatypes
277
278 RDF.rb only implements core datatypes from the
279 [RDF Datatype Map](http://www.w3.org/TR/rdf11-concepts/#datatype-maps). Most other
280 XSD and RDF datatype implementations can be find in the following:
281
282 * {RDF::XSD}
283
284 ### Graph Isomorphism
285
286 Two graphs may be compared with each other to determine if they are _isomorphic_.
287 As BNodes within two different graphs are no equal, graphs may not be directly compared.
fb0791f @gkellogg Yard updates.
gkellogg authored
288 The `RDF::Isomorphic` gem may be used to determine if they make the same statements, aside
eb88603 @gkellogg Alpha0 release of RDF 1.1.
gkellogg authored
289 from BNode identity (i.e., they each entail the other)
290
fb0791f @gkellogg Yard updates.
gkellogg authored
291 * `RDF::Isomorphic`
eb88603 @gkellogg Alpha0 release of RDF 1.1.
gkellogg authored
292
09f7916 @bendiken Updated README.
bendiken authored
293 ### RDF Storage
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
294
dd48434 @bendiken Started updating and improving the README (long overdue).
bendiken authored
295 <http://blog.datagraph.org/2010/04/rdf-repository-howto>
296
09f7916 @bendiken Updated README.
bendiken authored
297 * {RDF::Repository}
dd48434 @bendiken Started updating and improving the README (long overdue).
bendiken authored
298 * {RDF::Countable}
6ed7d18 @bendiken Added links to all current plugins.
bendiken authored
299 * {RDF::Enumerable}
3f299a9 @bendiken Added an RDF::Indexable mixin, intended for use by storage adapters u…
bendiken authored
300 * {RDF::Indexable}
301 * {RDF::Inferable}
6ed7d18 @bendiken Added links to all current plugins.
bendiken authored
302 * {RDF::Queryable}
dd48434 @bendiken Started updating and improving the README (long overdue).
bendiken authored
303 * {RDF::Mutable}
304 * {RDF::Durable}
97f43f3 @bendiken Added a BGP query code example to the README file.
bendiken authored
305 * {RDF::Transaction}
91b9a8f @gkellogg Minor doc updates.
gkellogg authored
306 * [RDF::AllegroGraph](http://rubydoc.info/github/ruby-rdf/rdf-agraph) (extension)
307 * [RDF::Mongo](http://rubydoc.info/github/ruby-rdf/rdf-mongo) (extension)
308 * [RDF::DataObjects](http://rubydoc.info/github/ruby-rdf/rdf-do) (extension)
309 * [RDF::Sesame](http://www.rubydoc.info/github/ruby-rdf/rdf-sesame) (extension)
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
310
09f7916 @bendiken Updated README.
bendiken authored
311 ### RDF Querying
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
312
09f7916 @bendiken Updated README.
bendiken authored
313 * {RDF::Query}
a2c2a2b @markborkum Added RDF::Query::HashPatternNormalizer to README.md
markborkum authored
314 * {RDF::Query::HashPatternNormalizer}
570e1d6 @bendiken Added links to RDF::JSON and RDF::Sesame.
bendiken authored
315 * {RDF::Query::Pattern}
316 * {RDF::Query::Solution}
962fe06 @bendiken Added a brief note about BGP queries to the README's feature list.
bendiken authored
317 * {RDF::Query::Solutions}
570e1d6 @bendiken Added links to RDF::JSON and RDF::Sesame.
bendiken authored
318 * {RDF::Query::Variable}
91b9a8f @gkellogg Minor doc updates.
gkellogg authored
319 * [SPARQL](http://rubydoc.info/github/ruby-rdf/sparql) (extension)
27a330e @gkellogg Yard documentation updates.
gkellogg authored
320
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
321
09f7916 @bendiken Updated README.
bendiken authored
322 ### RDF Vocabularies
323
67c8881 @petervandenabeele Update README list of vocabularies
petervandenabeele authored
324 * {RDF} - Resource Description Framework (RDF)
d04f513 @gkellogg Note that most vocabularies will be deprecated in RDF.rb 2.0.
gkellogg authored
325 * {RDF::OWL} - Web Ontology Language (OWL)
326 * {RDF::RDFS} - RDF Schema (RDFS)
327 * {RDF::RDFV} - RDF Vocabulary (RDFV)
328 * {RDF::XSD} - XML Schema (XSD)
329
330 #### Deprecated Vocabularies
331
332 The following vocabularies will be deprecated in RDF.rb 2.0 and moved to the rdf-vocab gem.
333
67c8881 @petervandenabeele Update README list of vocabularies
petervandenabeele authored
334 * {RDF::CC} - Creative Commons (CC)
335 * {RDF::CERT} - W3 Authentication Certificate (CERT)
336 * {RDF::DC} - Dublin Core (DC)
337 * {RDF::DC11} - Dublin Core 1.1 (DC11) _deprecated_
338 * {RDF::DOAP} - Description of a Project (DOAP)
339 * {RDF::EXIF} - Exchangeable Image File Format (EXIF)
340 * {RDF::FOAF} - Friend of a Friend (FOAF)
341 * {RDF::GEO} - WGS84 Geo Positioning (GEO)
342 * {RDF::GR} - GoodRelations (GR)
343 * {RDF::HT} - Hypertext Transfer Protocol (HT)
344 * {RDF::ICAL} - RDF Calendar Workspace (ICAL)
345 * {RDF::MA} - Media Resources (MA)
346 * {RDF::MO} - Music Ontology (MO)
347 * {RDF::OG} - Open Graph protocol (OG)
348 * {RDF::PROV} - Provenance on the web (PROV)
349 * {RDF::RSA} - W3 RSA Keys (RSA)
350 * {RDF::RSS} - RDF Site Summary (RSS)
351 * {RDF::SCHEMA} - Schema.org (SCHEMA)
352 * {RDF::SIOC} - Semantically-Interlinked Online Communities (SIOC)
353 * {RDF::SKOS} - Simple Knowledge Organization System (SKOS)
354 * {RDF::SKOSXL} - SKOS eXtension for Labels (SKOSXL)
355 * {RDF::V} - RDF data vocabulary (V)
356 * {RDF::VCARD} - Ontology for vCards (VCARD)
357 * {RDF::VMD} - Data-Vocabulary.org (VMD)
358 * {RDF::VOID} - Vocabulary of Interlinked Datasets (VOID)
359 * {RDF::VS} - SemWeb Vocab Status ontology (VS)
360 * {RDF::WDRS} - Protocol for Web Description Resources (WDRS)
361 * {RDF::WOT} - Web of Trust (WOT)
362 * {RDF::XHTML} - Extensible HyperText Markup Language (XHTML)
363 * {RDF::XHV} - XHTML Vocabulary (XHV)
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
364
7145c47 @gkellogg Added travis-ci badge.
gkellogg authored
365 ## Dependencies
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
366
bb63255 @gkellogg Minimum Ruby version is 1.9.2
gkellogg authored
367 * [Ruby](http://ruby-lang.org/) (>= 1.9.2)
c54a6f1 @gkellogg Util::File.open_file now uses RestClient only if it is previously def…
gkellogg authored
368 * [LinkHeader][] (>= 0.0.8)
369 * Soft dependency on [RestClient][] (>= 1.7)
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
370
7145c47 @gkellogg Added travis-ci badge.
gkellogg authored
371 ## Installation
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
372
dd48434 @bendiken Started updating and improving the README (long overdue).
bendiken authored
373 The recommended installation method is via [RubyGems](http://rubygems.org/).
374 To install the latest official release of RDF.rb, do:
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
375
bb63255 @gkellogg Minimum Ruby version is 1.9.2
gkellogg authored
376 % [sudo] gem install rdf # Ruby 1.9.2+
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
377
7145c47 @gkellogg Added travis-ci badge.
gkellogg authored
378 ## Download
09f7916 @bendiken Updated README.
bendiken authored
379
380 To get a local working copy of the development repository, do:
381
60009a2 @gkellogg Update ruby-rdf links.
gkellogg authored
382 % git clone git://github.com/ruby-rdf/rdf.git
09f7916 @bendiken Updated README.
bendiken authored
383
a60f64d @bendiken Added an RDF::Term mixin module to supplement RDF::Value.
bendiken authored
384 Alternatively, download the latest development version as a tarball as
385 follows:
09f7916 @bendiken Updated README.
bendiken authored
386
60009a2 @gkellogg Update ruby-rdf links.
gkellogg authored
387 % wget http://github.com/ruby-rdf/rdf/tarball/master
09f7916 @bendiken Updated README.
bendiken authored
388
7145c47 @gkellogg Added travis-ci badge.
gkellogg authored
389 ## Resources
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
390
60009a2 @gkellogg Update ruby-rdf links.
gkellogg authored
391 * <http://rubydoc.info/github/ruby-rdf/rdf/frames>
392 * <http://github.com/ruby-rdf/rdf>
53504e1 @bendiken Changed all Gemcutter.org references to point to RubyGems.org.
bendiken authored
393 * <http://rubygems.org/gems/rdf>
187ecba @bendiken Updated RubyForge links.
bendiken authored
394 * <http://rubyforge.org/projects/rdf/>
ba5be18 @bendiken Added links to related projects.
bendiken authored
395 * <http://raa.ruby-lang.org/project/rdf/>
1e28fb1 @bendiken Added links to the Ohloh project page and the DataMapper adapter.
bendiken authored
396 * <http://www.ohloh.net/p/rdf>
ba5be18 @bendiken Added links to related projects.
bendiken authored
397
7145c47 @gkellogg Added travis-ci badge.
gkellogg authored
398 ## Mailing List
9ceebc7 @bendiken Added a link to the public-rdf-ruby@w3.org mailing list.
bendiken authored
399
400 * <http://lists.w3.org/Archives/Public/public-rdf-ruby/>
401
7145c47 @gkellogg Added travis-ci badge.
gkellogg authored
402 ## Authors
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
403
f071118 @bendiken Promoted Gregg Kellogg from contributor to author in recognition of s…
bendiken authored
404 * [Arto Bendiken](http://github.com/bendiken) - <http://ar.to/>
405 * [Ben Lavender](http://github.com/bhuga) - <http://bhuga.net/>
a3b7f32 @gkellogg Remove "'" from N-Triples ECHAR.
gkellogg authored
406 * [Gregg Kellogg](http://github.com/gkellogg) - <http://greggkellogg.net/>
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
407
7145c47 @gkellogg Added travis-ci badge.
gkellogg authored
408 ## Contributors
259a3be @bendiken Added Pius Uzamere and John Fieber to the contributors list.
bendiken authored
409
0ebd3ca @bendiken Added Călin Ardelean to the contributors list.
bendiken authored
410 * [Călin Ardelean](http://github.com/clnx) - <http://github.com/clnx>
4fe9a74 @markborkum Implemented RDF::Query::HashPatternNormalizer class
markborkum authored
411 * [Mark Borkum](http://github.com/markborkum) - <http://github.com/markborkum>
e83da11 @bendiken Added Danny Gagne to the contributors list.
bendiken authored
412 * [Danny Gagne](http://github.com/danny) - <http://www.dannygagne.com/>
00cd047 @bendiken Added Joey Geiger to the contributors list.
bendiken authored
413 * [Joey Geiger](http://github.com/jgeiger) - <http://github.com/jgeiger>
be67be5 @bendiken Added Keita Urashima to the contributors list.
bendiken authored
414 * [Fumihiro Kato](http://github.com/fumi) - <http://fumi.me/>
43c3d92 @bendiken Added Naoki Kawamukai to the contributors list.
bendiken authored
415 * [Naoki Kawamukai](http://github.com/kna) - <http://github.com/kna>
d5aa7ff @tomjnixon Add Tom Nixon to credits.
tomjnixon authored
416 * [Tom Nixon](https://github.com/tomjnixon) - <https://github.com/tomjnixon>
be67be5 @bendiken Added Keita Urashima to the contributors list.
bendiken authored
417 * [Hellekin O. Wolf](http://github.com/hellekin) - <http://hellekin.cepheide.org/>
418 * [John Fieber](http://github.com/jfieber) - <http://github.com/jfieber>
419 * [Keita Urashima](http://github.com/ursm) - <http://ursm.jp/>
420 * [Pius Uzamere](http://github.com/pius) - <http://pius.me/>
88b8a04 @gkellogg Tweaks to run on JDL dev env
gkellogg authored
421 * [Judson Lester](https://github.com/nyarly) - <https://github.com/nyarly>
e84c7e7 @petervandenabeele Update README list of contributors
petervandenabeele authored
422 * [Peter Vandenabeele](https://github.com/petervandenabeele) - <https://github.com/petervandenabeele>
653c699 @gkellogg Version 1.1.13.
gkellogg authored
423 * [Tom Johnson](https://github.com/no-reply) - <https://github.com/no-reply>
259a3be @bendiken Added Pius Uzamere and John Fieber to the contributors list.
bendiken authored
424
7145c47 @gkellogg Added travis-ci badge.
gkellogg authored
425 ## Contributing
66979d1 @bendiken Added some notes for contributors.
bendiken authored
426
ad7274c @gkellogg Update README with GitFlow information for contributors.
gkellogg authored
427 This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange development and release activity. All submissions _must_ be on a feature branch based on the _develop_ branch to ease staging and integration.
428
66979d1 @bendiken Added some notes for contributors.
bendiken authored
429 * Do your best to adhere to the existing coding conventions and idioms.
430 * Don't use hard tabs, and don't leave trailing whitespace on any line.
867e02e @bendiken Added a note about `git diff --check` for whitespace linting.
bendiken authored
431 Before committing, run `git diff --check` to make sure of this.
66979d1 @bendiken Added some notes for contributors.
bendiken authored
432 * Do document every method you add using [YARD][] annotations. Read the
433 [tutorial][YARD-GS] or just look at the existing code for examples.
434 * Don't touch the `.gemspec` or `VERSION` files. If you need to change them,
435 do so on your private branch only.
f664ab7 @bendiken Renamed the CONTRIBUTORS file to CREDITS.
bendiken authored
436 * Do feel free to add yourself to the `CREDITS` file and the
66979d1 @bendiken Added some notes for contributors.
bendiken authored
437 corresponding list in the the `README`. Alphabetical order applies.
438 * Don't touch the `AUTHORS` file. If your contributions are significant
439 enough, be assured we will eventually add you in there.
440 * Do note that in order for us to merge any non-trivial changes (as a rule
441 of thumb, additions larger than about 15 lines of code), we need an
442 explicit [public domain dedication][PDD] on record from you.
443
7145c47 @gkellogg Added travis-ci badge.
gkellogg authored
444 ## License
0dd537f @bendiken Changed README format from RDoc to Markdown.
bendiken authored
445
a60f64d @bendiken Added an RDF::Term mixin module to supplement RDF::Value.
bendiken authored
446 This is free and unencumbered public domain software. For more information,
447 see <http://unlicense.org/> or the accompanying {file:UNLICENSE} file.
c553a11 @bendiken Added a link to the introductory blog post.
bendiken authored
448
0443149 @gkellogg Documentation improvement.
gkellogg authored
449 [RDF]: http://www.w3.org/RDF/
bdf3a46 @gkellogg Update DOAP and references for N-Triples/N-Quads.
gkellogg authored
450 [N-Triples]: http://www.w3.org/TR/n-triples/
451 [N-Quads]: http://www.w3.org/TR/n-quads/
0443149 @gkellogg Documentation improvement.
gkellogg authored
452 [YARD]: http://yardoc.org/
453 [YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md
454 [PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
455 [Backports]: http://rubygems.org/gems/backports
87f3f5c @gkellogg Update vocabularies.
gkellogg authored
456 [JSONLD doc]: http://rubydoc.info/github/ruby-rdf/json-ld/frames
0443149 @gkellogg Documentation improvement.
gkellogg authored
457 [LinkedData doc]: http://rubydoc.info/github/datagraph/linkeddata/master/frames
60009a2 @gkellogg Update ruby-rdf links.
gkellogg authored
458 [Microdata doc]: http://rubydoc.info/github/ruby-rdf/rdf-microdata/frames
459 [N3 doc]: http://rubydoc.info/github/ruby-rdf/rdf-n3/master/frames
460 [RDFa doc]: http://rubydoc.info/github/ruby-rdf/rdf-rdfa/master/frames
461 [RDFXML doc]: http://rubydoc.info/github/ruby-rdf/rdf-rdfxml/master/frames
462 [Turtle doc]: http://rubydoc.info/github/ruby-rdf/rdf-turtle/master/frames
463 [SPARQL doc]: http://rubydoc.info/github/ruby-rdf/sparql/frames
eb88603 @gkellogg Alpha0 release of RDF 1.1.
gkellogg authored
464 [RDF 1.0]: http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/
465 [RDF 1.1]: http://www.w3.org/TR/rdf11-concepts/
27a330e @gkellogg Yard documentation updates.
gkellogg authored
466 [SPARQL 1.0]: http://www.w3.org/TR/rdf-sparql-query/
3b88594 @bendiken Corrected the home page and the dependencies in the gemspec.
bendiken authored
467 [RDF.rb]: http://ruby-rdf.github.com/
cf9bf59 @gkellogg Update README
gkellogg authored
468 [RDF::DO]: http://ruby-rdf.github.com/rdf-do
469 [RDF::Mongo]: http://ruby-rdf.github.com/rdf-mongo
470 [RDF::Sesame]: http://ruby-rdf.github.com/rdf-sesame
471 [RDF::JSON]: http://ruby-rdf.github.com/rdf-json
472 [RDF::Microdata]: http://ruby-rdf.github.com/rdf-microdata
473 [RDF::N3]: http://ruby-rdf.github.com/rdf-n3
474 [RDF::RDFa]: http://ruby-rdf.github.com/rdf-rdfa
475 [RDF::RDFXML]: http://ruby-rdf.github.com/rdf-rdfxml
512c267 @gkellogg Yard documentation updates.
gkellogg authored
476 [RDF::TriG]: http://ruby-rdf.github.com/rdf-trig
cf9bf59 @gkellogg Update README
gkellogg authored
477 [RDF::TriX]: http://ruby-rdf.github.com/rdf-trix
478 [RDF::Turtle]: http://ruby-rdf.github.com/rdf-turtle
479 [RDF::Raptor]: http://ruby-rdf.github.com/rdf-raptor
480 [LinkedData]: http://ruby-rdf.github.com/linkeddata
481 [JSON::LD]: http://gkellogg.github.com/json-ld
7dd3a59 @gkellogg Use RestClient in Util::File.open_file, which can enable client-side …
gkellogg authored
482 [RestClient]: https://rubygems.org/gems/rest-client
483 [RestClient Components]: https://rubygems.org/gems/rest-client-components
484 [Rack::Cache]: http://rtomayko.github.io/rack-cache/
Something went wrong with that request. Please try again.