Skip to content
Newer
Older
100644 264 lines (202 sloc) 8.48 KB
79e555b @bendiken Improved API documentation title.
authored Mar 15, 2010
1 RDF.rb: Linked Data for Ruby
2 ============================
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
3
c553a11 @bendiken Added a link to the introductory blog post.
authored Mar 10, 2010
4 This is a pure-Ruby library for working with [Resource Description Framework
5 (RDF)][RDF] data.
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
6
3547cb7 @bendiken Added a more prominent GitHub link.
authored Jan 28, 2010
7 * <http://github.com/bendiken/rdf>
a812506 @bendiken Added a link to the What's New in RDF.rb 0.3.0 blog post.
authored Dec 30, 2010
8 * <http://blog.datagraph.org/2010/12/rdf-for-ruby>
c553a11 @bendiken Added a link to the introductory blog post.
authored Mar 10, 2010
9 * <http://blog.datagraph.org/2010/03/rdf-for-ruby>
a4a59f4 @bendiken Added a link to the parsing/serialization tutorial.
authored Apr 21, 2010
10 * <http://blog.datagraph.org/2010/04/parsing-rdf-with-ruby>
80a5480 @bendiken Added a link to Ben's RDF::Repository tutorial.
authored Apr 6, 2010
11 * <http://blog.datagraph.org/2010/04/rdf-repository-howto>
d933a97 @bendiken Added a link to the Getting data from the Semantic Web tutorial.
authored Dec 30, 2010
12 * <http://semanticweb.org/wiki/Getting_data_from_the_Semantic_Web_(Ruby)>
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
13
7ec6798 @bendiken Added a brief feature list to the README.
authored Apr 3, 2010
14 Features
15 --------
16
81c2abf @bendiken Added a note about the library's use of autoloading.
authored Apr 3, 2010
17 * 100% pure Ruby with minimal dependencies and no bloat.
7ec6798 @bendiken Added a brief feature list to the README.
authored Apr 3, 2010
18 * 100% free and unencumbered [public domain](http://unlicense.org/) software.
19 * Provides a clean, well-designed RDF object model and related APIs.
20 * Supports parsing and serializing N-Triples out of the box, with more
21 serialization format support available through add-on plugins.
962fe06 @bendiken Added a brief note about BGP queries to the README's feature list.
authored Nov 12, 2010
22 * Includes in-memory graph and repository implementations, with more storage
23 adapter support available through add-on plugins.
24 * Implements basic graph pattern (BGP) query evaluation.
7ec6798 @bendiken Added a brief feature list to the README.
authored Apr 3, 2010
25 * Plays nice with others: entirely contained in the `RDF` module, and does
26 not modify any of Ruby's core classes or standard library.
81c2abf @bendiken Added a note about the library's use of autoloading.
authored Apr 3, 2010
27 * Based entirely on Ruby's autoloading, meaning that you can generally make
28 use of any one part of the library without needing to load up the rest.
cfeff6b @bendiken Bumped the minimum Ruby dependency to 1.8.7 (or 1.8.1 with Backports).
authored Jun 16, 2010
29 * Compatible with Ruby 1.8.7+, Ruby 1.9.x, and JRuby 1.4/1.5.
30 * Compatible with older Ruby versions with the help of the [Backports][] gem.
7ec6798 @bendiken Added a brief feature list to the README.
authored Apr 3, 2010
31
3589db2 @bendiken Added a simple usage example.
authored Dec 20, 2009
32 Examples
33 --------
34
35 require 'rdf'
97f43f3 @bendiken Added a BGP query code example to the README file.
authored Dec 27, 2010
36
37 include RDF
3589db2 @bendiken Added a simple usage example.
authored Dec 20, 2009
38
dd48434 @bendiken Started updating and improving the README (long overdue).
authored Jun 16, 2010
39 ### Writing RDF data using the N-Triples format
3589db2 @bendiken Added a simple usage example.
authored Dec 20, 2009
40
dd48434 @bendiken Started updating and improving the README (long overdue).
authored Jun 16, 2010
41 require 'rdf/ntriples'
bd7bd66 @bendiken Updated usage examples.
authored Dec 21, 2009
42
dd48434 @bendiken Started updating and improving the README (long overdue).
authored Jun 16, 2010
43 RDF::Writer.open("hello.nt") do |writer|
44 writer << RDF::Graph.new do |graph|
45 graph << [:hello, RDF::DC.title, "Hello, world!"]
46 end
47 end
48
49 ### Reading RDF data in the N-Triples format
50
51 require 'rdf/ntriples'
52
53 RDF::Reader.open("http://rdf.rubyforge.org/doap.nt") do |reader|
54 reader.each_statement do |statement|
55 puts statement.inspect
56 end
57 end
3589db2 @bendiken Added a simple usage example.
authored Dec 20, 2009
58
97f43f3 @bendiken Added a BGP query code example to the README file.
authored Dec 27, 2010
59 ### Querying RDF data using basic graph patterns (BGPs)
bd7bd66 @bendiken Updated usage examples.
authored Dec 21, 2009
60
97f43f3 @bendiken Added a BGP query code example to the README file.
authored Dec 27, 2010
61 require 'rdf/ntriples'
bd7bd66 @bendiken Updated usage examples.
authored Dec 21, 2009
62
97f43f3 @bendiken Added a BGP query code example to the README file.
authored Dec 27, 2010
63 graph = RDF::Graph.load("http://rdf.rubyforge.org/doap.nt")
64 query = RDF::Query.new({
65 :person => {
66 RDF.type => FOAF.Person,
67 FOAF.name => :name,
68 FOAF.mbox => :email,
69 }
70 })
71
72 query.execute(graph).each do |solution|
73 puts "name=#{solution.name} email=#{solution.email}"
74 end
75
76 ### Using pre-defined RDF vocabularies
77
ecba294 @bendiken Improved RDF::Vocabulary specs.
authored Dec 21, 2009
78 DC.title #=> RDF::URI("http://purl.org/dc/terms/title")
a34c30d @bendiken Added usage examples.
authored Dec 21, 2009
79 FOAF.knows #=> RDF::URI("http://xmlns.com/foaf/0.1/knows")
6c2a21d @bendiken Added an RDF.type code example.
authored Apr 2, 2010
80 RDF.type #=> RDF::URI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")
a34c30d @bendiken Added usage examples.
authored Dec 21, 2009
81 RDFS.seeAlso #=> RDF::URI("http://www.w3.org/2000/01/rdf-schema#seeAlso")
82 RSS.title #=> RDF::URI("http://purl.org/rss/1.0/title")
83 OWL.sameAs #=> RDF::URI("http://www.w3.org/2002/07/owl#sameAs")
84 XSD.dateTime #=> RDF::URI("http://www.w3.org/2001/XMLSchema#dateTime")
85
86 ### Using ad-hoc RDF vocabularies
87
88 foaf = RDF::Vocabulary.new("http://xmlns.com/foaf/0.1/")
89 foaf.knows #=> RDF::URI("http://xmlns.com/foaf/0.1/knows")
483f9a4 @bendiken Added usage examples.
authored Dec 21, 2009
90 foaf[:name] #=> RDF::URI("http://xmlns.com/foaf/0.1/name")
91 foaf['mbox'] #=> RDF::URI("http://xmlns.com/foaf/0.1/mbox")
bd7bd66 @bendiken Updated usage examples.
authored Dec 21, 2009
92
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
93 Documentation
94 -------------
95
6ed7d18 @bendiken Added links to all current plugins.
authored Apr 1, 2010
96 <http://rdf.rubyforge.org/>
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
97
1eb1c3e @bendiken Updated README.
authored Feb 2, 2010
98 ### RDF Object Model
62c7dda @bendiken Fleshed out the object model.
authored Dec 23, 2009
99
dd48434 @bendiken Started updating and improving the README (long overdue).
authored Jun 16, 2010
100 <http://blog.datagraph.org/2010/03/rdf-for-ruby>
101
09f7916 @bendiken Updated README.
authored Dec 28, 2009
102 * {RDF::Value}
a60f64d @bendiken Added an RDF::Term mixin module to supplement RDF::Value.
authored Nov 20, 2010
103 * {RDF::Term}
104 * {RDF::Literal}
105 * {RDF::Resource}
106 * {RDF::Node}
107 * {RDF::URI}
108 * {RDF::Graph}
6ed7d18 @bendiken Added links to all current plugins.
authored Mar 31, 2010
109 * {RDF::Statement}
62c7dda @bendiken Fleshed out the object model.
authored Dec 23, 2009
110
111 ### RDF Serialization
112
dd48434 @bendiken Started updating and improving the README (long overdue).
authored Jun 16, 2010
113 <http://blog.datagraph.org/2010/04/parsing-rdf-with-ruby>
114
09f7916 @bendiken Updated README.
authored Dec 28, 2009
115 * {RDF::Format}
116 * {RDF::Reader}
117 * {RDF::Writer}
62c7dda @bendiken Fleshed out the object model.
authored Dec 23, 2009
118
09f7916 @bendiken Updated README.
authored Dec 28, 2009
119 ### RDF Serialization Formats
c76e09e @bendiken Added links to vocabulary documentation.
authored Dec 23, 2009
120
09f7916 @bendiken Updated README.
authored Dec 28, 2009
121 * {RDF::NTriples}
58b28d6 @bendiken Added links to the currently-available parser/serializer plugins.
authored Dec 27, 2010
122 * [RDF::JSON](http://rdf.rubyforge.org/json/) (plugin)
123 * [RDF::N3](http://rdf.rubyforge.org/n3/) (plugin)
124 * [RDF::Raptor::RDFXML](http://rdf.rubyforge.org/raptor/) (plugin)
125 * [RDF::Raptor::Turtle](http://rdf.rubyforge.org/raptor/) (plugin)
126 * [RDF::RDFa](http://rdf.rubyforge.org/rdfa/) (plugin)
127 * [RDF::RDFXML](http://rdf.rubyforge.org/rdfxml/) (plugin)
128 * [RDF::Trix](http://rdf.rubyforge.org/trix/) (plugin)
c76e09e @bendiken Added links to vocabulary documentation.
authored Dec 23, 2009
129
09f7916 @bendiken Updated README.
authored Dec 28, 2009
130 ### RDF Storage
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
131
dd48434 @bendiken Started updating and improving the README (long overdue).
authored Jun 16, 2010
132 <http://blog.datagraph.org/2010/04/rdf-repository-howto>
133
09f7916 @bendiken Updated README.
authored Dec 28, 2009
134 * {RDF::Repository}
dd48434 @bendiken Started updating and improving the README (long overdue).
authored Jun 16, 2010
135 * {RDF::Countable}
6ed7d18 @bendiken Added links to all current plugins.
authored Mar 31, 2010
136 * {RDF::Enumerable}
3f299a9 @bendiken Added an RDF::Indexable mixin, intended for use by storage adapters u…
authored Oct 28, 2010
137 * {RDF::Indexable}
138 * {RDF::Inferable}
6ed7d18 @bendiken Added links to all current plugins.
authored Mar 31, 2010
139 * {RDF::Queryable}
dd48434 @bendiken Started updating and improving the README (long overdue).
authored Jun 16, 2010
140 * {RDF::Mutable}
141 * {RDF::Durable}
97f43f3 @bendiken Added a BGP query code example to the README file.
authored Dec 27, 2010
142 * {RDF::Transaction}
58b28d6 @bendiken Added links to the currently-available parser/serializer plugins.
authored Dec 27, 2010
143 * [RDF::DataObjects](http://rdf.rubyforge.org/do/) (plugin)
144 * [RDF::Sesame](http://rdf.rubyforge.org/sesame/) (plugin)
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
145
09f7916 @bendiken Updated README.
authored Dec 28, 2009
146 ### RDF Querying
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
147
09f7916 @bendiken Updated README.
authored Dec 28, 2009
148 * {RDF::Query}
570e1d6 @bendiken Added links to RDF::JSON and RDF::Sesame.
authored Feb 2, 2010
149 * {RDF::Query::Pattern}
150 * {RDF::Query::Solution}
962fe06 @bendiken Added a brief note about BGP queries to the README's feature list.
authored Nov 12, 2010
151 * {RDF::Query::Solutions}
570e1d6 @bendiken Added links to RDF::JSON and RDF::Sesame.
authored Feb 2, 2010
152 * {RDF::Query::Variable}
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
153
09f7916 @bendiken Updated README.
authored Dec 28, 2009
154 ### RDF Vocabularies
155
f02666b @bendiken Removed the superfluous, unused RDF::RDF vocabulary class and clarifi…
authored Jul 6, 2010
156 * {RDF} - Resource Description Framework (RDF)
09f7916 @bendiken Updated README.
authored Dec 28, 2009
157 * {RDF::CC} - Creative Commons (CC)
dd48434 @bendiken Started updating and improving the README (long overdue).
authored Jun 16, 2010
158 * {RDF::CERT} - W3 Authentication Certificate (CERT)
09f7916 @bendiken Updated README.
authored Dec 28, 2009
159 * {RDF::DC} - Dublin Core (DC)
dd48434 @bendiken Started updating and improving the README (long overdue).
authored Jun 16, 2010
160 * {RDF::DC11} - Dublin Core 1.1 (DC11) _deprecated_
09f7916 @bendiken Updated README.
authored Dec 28, 2009
161 * {RDF::DOAP} - Description of a Project (DOAP)
162 * {RDF::EXIF} - Exchangeable Image File Format (EXIF)
163 * {RDF::FOAF} - Friend of a Friend (FOAF)
dd48434 @bendiken Started updating and improving the README (long overdue).
authored Jun 16, 2010
164 * {RDF::GEO} - WGS84 Geo Positioning (GEO)
09f7916 @bendiken Updated README.
authored Dec 28, 2009
165 * {RDF::HTTP} - Hypertext Transfer Protocol (HTTP)
166 * {RDF::OWL} - Web Ontology Language (OWL)
167 * {RDF::RDFS} - RDF Schema (RDFS)
dd48434 @bendiken Started updating and improving the README (long overdue).
authored Jun 16, 2010
168 * {RDF::RSA} - W3 RSA Keys (RSA)
09f7916 @bendiken Updated README.
authored Dec 28, 2009
169 * {RDF::RSS} - RDF Site Summary (RSS)
170 * {RDF::SIOC} - Semantically-Interlinked Online Communities (SIOC)
171 * {RDF::SKOS} - Simple Knowledge Organization System (SKOS)
172 * {RDF::WOT} - Web of Trust (WOT)
173 * {RDF::XHTML} - Extensible HyperText Markup Language (XHTML)
174 * {RDF::XSD} - XML Schema (XSD)
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
175
4660e83 @bendiken Changed dependencies wording.
authored Dec 24, 2009
176 Dependencies
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
177 ------------
178
cfeff6b @bendiken Bumped the minimum Ruby dependency to 1.8.7 (or 1.8.1 with Backports).
authored Jun 16, 2010
179 * [Ruby](http://ruby-lang.org/) (>= 1.8.7) or (>= 1.8.1 with [Backports][])
921718b @bendiken Bumped the Addressable dependency.
authored Aug 26, 2010
180 * [Addressable](http://rubygems.org/gems/addressable) (>= 2.2.0)
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
181
182 Installation
183 ------------
184
dd48434 @bendiken Started updating and improving the README (long overdue).
authored Jun 16, 2010
185 The recommended installation method is via [RubyGems](http://rubygems.org/).
186 To install the latest official release of RDF.rb, do:
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
187
cfeff6b @bendiken Bumped the minimum Ruby dependency to 1.8.7 (or 1.8.1 with Backports).
authored Jun 16, 2010
188 % [sudo] gem install rdf # Ruby 1.8.7+ or 1.9.x
189 % [sudo] gem install backports rdf # Ruby 1.8.1+
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
190
09f7916 @bendiken Updated README.
authored Dec 28, 2009
191 Download
192 --------
193
194 To get a local working copy of the development repository, do:
195
196 % git clone git://github.com/bendiken/rdf.git
197
a60f64d @bendiken Added an RDF::Term mixin module to supplement RDF::Value.
authored Nov 20, 2010
198 Alternatively, download the latest development version as a tarball as
199 follows:
09f7916 @bendiken Updated README.
authored Dec 28, 2009
200
201 % wget http://github.com/bendiken/rdf/tarball/master
202
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
203 Resources
204 ---------
205
187ecba @bendiken Updated RubyForge links.
authored Dec 22, 2009
206 * <http://rdf.rubyforge.org/>
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
207 * <http://github.com/bendiken/rdf>
53504e1 @bendiken Changed all Gemcutter.org references to point to RubyGems.org.
authored Mar 9, 2010
208 * <http://rubygems.org/gems/rdf>
187ecba @bendiken Updated RubyForge links.
authored Dec 22, 2009
209 * <http://rubyforge.org/projects/rdf/>
ba5be18 @bendiken Added links to related projects.
authored Dec 24, 2009
210 * <http://raa.ruby-lang.org/project/rdf/>
1e28fb1 @bendiken Added links to the Ohloh project page and the DataMapper adapter.
authored Jan 10, 2010
211 * <http://www.ohloh.net/p/rdf>
ba5be18 @bendiken Added links to related projects.
authored Dec 24, 2009
212
9ceebc7 @bendiken Added a link to the public-rdf-ruby@w3.org mailing list.
authored Jul 6, 2010
213 Mailing List
214 ------------
215
216 * <http://lists.w3.org/Archives/Public/public-rdf-ruby/>
217
fa5fdbc @bendiken Corrected header wording.
authored Mar 27, 2010
218 Authors
219 -------
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
220
f071118 @bendiken Promoted Gregg Kellogg from contributor to author in recognition of s…
authored Oct 2, 2010
221 * [Arto Bendiken](http://github.com/bendiken) - <http://ar.to/>
222 * [Ben Lavender](http://github.com/bhuga) - <http://bhuga.net/>
223 * [Gregg Kellogg](http://github.com/gkellogg) - <http://kellogg-assoc.com/>
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
224
259a3be @bendiken Added Pius Uzamere and John Fieber to the contributors list.
authored May 20, 2010
225 Contributors
226 ------------
227
0ebd3ca @bendiken Added Călin Ardelean to the contributors list.
authored Oct 23, 2010
228 * [Călin Ardelean](http://github.com/clnx) - <http://github.com/clnx>
00cd047 @bendiken Added Joey Geiger to the contributors list.
authored Sep 23, 2010
229 * [Joey Geiger](http://github.com/jgeiger) - <http://github.com/jgeiger>
be67be5 @bendiken Added Keita Urashima to the contributors list.
authored Oct 1, 2010
230 * [Fumihiro Kato](http://github.com/fumi) - <http://fumi.me/>
231 * [Hellekin O. Wolf](http://github.com/hellekin) - <http://hellekin.cepheide.org/>
232 * [John Fieber](http://github.com/jfieber) - <http://github.com/jfieber>
233 * [Keita Urashima](http://github.com/ursm) - <http://ursm.jp/>
234 * [Pius Uzamere](http://github.com/pius) - <http://pius.me/>
259a3be @bendiken Added Pius Uzamere and John Fieber to the contributors list.
authored May 20, 2010
235
66979d1 @bendiken Added some notes for contributors.
authored May 28, 2010
236 Contributing
237 ------------
238
239 * Do your best to adhere to the existing coding conventions and idioms.
240 * Don't use hard tabs, and don't leave trailing whitespace on any line.
241 * Do document every method you add using [YARD][] annotations. Read the
242 [tutorial][YARD-GS] or just look at the existing code for examples.
243 * Don't touch the `.gemspec` or `VERSION` files. If you need to change them,
244 do so on your private branch only.
f664ab7 @bendiken Renamed the CONTRIBUTORS file to CREDITS.
authored Oct 2, 2010
245 * Do feel free to add yourself to the `CREDITS` file and the
66979d1 @bendiken Added some notes for contributors.
authored May 28, 2010
246 corresponding list in the the `README`. Alphabetical order applies.
247 * Don't touch the `AUTHORS` file. If your contributions are significant
248 enough, be assured we will eventually add you in there.
249 * Do note that in order for us to merge any non-trivial changes (as a rule
250 of thumb, additions larger than about 15 lines of code), we need an
251 explicit [public domain dedication][PDD] on record from you.
252
0dd537f @bendiken Changed README format from RDoc to Markdown.
authored Dec 20, 2009
253 License
254 -------
255
a60f64d @bendiken Added an RDF::Term mixin module to supplement RDF::Value.
authored Nov 20, 2010
256 This is free and unencumbered public domain software. For more information,
257 see <http://unlicense.org/> or the accompanying {file:UNLICENSE} file.
c553a11 @bendiken Added a link to the introductory blog post.
authored Mar 10, 2010
258
cfeff6b @bendiken Bumped the minimum Ruby dependency to 1.8.7 (or 1.8.1 with Backports).
authored Jun 16, 2010
259 [RDF]: http://www.w3.org/RDF/
260 [YARD]: http://yardoc.org/
eaf38c4 @bendiken Fixed the 'Getting Started with YARD' link in the README file.
authored Dec 27, 2010
261 [YARD-GS]: http://rubydoc.info/docs/yard/file/docs/GettingStarted.md
cfeff6b @bendiken Bumped the minimum Ruby dependency to 1.8.7 (or 1.8.1 with Backports).
authored Jun 16, 2010
262 [PDD]: http://lists.w3.org/Archives/Public/public-rdf-ruby/2010May/0013.html
263 [Backports]: http://rubygems.org/gems/backports
Something went wrong with that request. Please try again.