rdf-rdfa 0.3.5.1 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -16,24 +16,91 @@ RDF::RDFa parses [RDFa][RDFa 1.1 Core] into statements or triples.
16
16
 
17
17
  Install with 'gem install rdf-rdfa'
18
18
 
19
+ ### Important changes from previous versions
20
+ RDFa is an evolving standard, undergoing some substantial recent changes partly due to perceived competition
21
+ with Microdata. As a result, the RDF Webapps working group is currently looking at changes in the processing model for RDFa. These changes are now being tracked in {RDF::RDFa::Reader}:
22
+
23
+ #### Remove RDFa Profiles
24
+ RDFa Profiles were a mechanism added to allow groups of terms and prefixes to be defined in an external resource and loaded to affect the processing of an RDFa document. This introduced a problem for some implementations needing to perform a cross-origin GET in order to retrieve the profiles. The working group elected to drop support for user-defined RDFa Profiles (the default profiles defined by RDFa Core and host languages still apply) and replace it with an inference regime using vocabularies. Parsing of @profile has been removed from this version.
25
+
26
+ #### Vocabulary Expansion
27
+ One of the issues with vocabularies was that they discourage re-use of existing vocabularies when terms from several vocabularies are used at the same time. As it is common (encouraged) for RDF vocabularies to form sub-class and/or sub-property relationships with well defined vocabularies, the RDFa vocabulary expansion mechanism takes advantage of this.
28
+
29
+ As an optional part of RDFa processing, an RDFa processor will perform limited [RDFS entailment](http://www.w3.org/TR/rdf-mt/#rules), specifically rules rdfs5, 7, 9 and 11. This causes sub-classes and sub-properties of type and property IRIs to be added to the output graph.
30
+
31
+ {RDF::RDFa::Reader} implements this using the `#expand` method, which looks for `rdfa:hasVocabulary` properties within the output graph and performs such expansion. See an example in the usage section.
32
+
33
+ #### RDF Collections (lists)
34
+ One significant RDF feature missing from RDFa was support for ordered collections, or lists. RDF supports this with special properties `rdf:first`, `rdf:rest`, and `rdf:nil`, but other RDF languages have first-class support for this concept. For example, in [Turtle][Turtle], a list can be defined as follows:
35
+
36
+ [ a schema:MusicPlayList;
37
+ schema:name "Classic Rock Playlist";
38
+ schema:numTracks 5;
39
+ schema:tracks (
40
+ [ a schema:MusicRecording; schema:name "Sweet Home Alabama"; schema:byArtist "Lynard Skynard"]
41
+ [ a schema:MusicRecording; schema:name "Shook you all Night Long"; schema:byArtist "AC/DC"]
42
+ [ a schema:MusicRecording; schema:name "Sharp Dressed Man"; schema:byArtist "ZZ Top"]
43
+ [ a schema:MusicRecording; schema:name "Old Time Rock and Roll"; schema:byArtist "Bob Seger"]
44
+ [ a schema:MusicRecording; schema:name "Hurt So Good"; schema:byArtist "John Cougar"]
45
+ )
46
+ ]
47
+
48
+ defines a playlist with an ordered set of tracks. RDFa adds the @member attribute, which is used to identify values (object or literal) that are to be placed in a list. The same playlist might be defined in RDFa as follows:
49
+
50
+ <div vocab="http://schema.org/" typeof="MusicPlaylist">
51
+ <span property="name">Classic Rock Playlist</span>
52
+ <meta property="numTracks" content="5"/>
53
+
54
+ <div rel="tracks" member="">
55
+ <div typeof="MusicRecording">
56
+ 1.<span property="name">Sweet Home Alabama</span> -
57
+ <span property="byArtist">Lynard Skynard</span>
58
+ </div>
59
+
60
+ <div typeof="MusicRecording">
61
+ 2.<span property="name">Shook you all Night Long</span> -
62
+ <span property="byArtist">AC/DC</span>
63
+ </div>
64
+
65
+ <div typeof="MusicRecording">
66
+ 3.<span property="name">Sharp Dressed Man</span> -
67
+ <span property="byArtist">ZZ Top</span>
68
+ </div>
69
+
70
+ <div typeof="MusicRecording">
71
+ 4.<span property="name">Old Time Rock and Roll</span>
72
+ <span property="byArtist">Bob Seger</span>
73
+ </div>
74
+
75
+ <div typeof="MusicRecording">
76
+ 5.<span property="name">Hurt So Good</span>
77
+ <span property="byArtist">John Cougar</span>
78
+ </div>
79
+ </div>
80
+ </div>
81
+
82
+ This basically does the same thing, but places each track in an rdf:List in the defined order.
83
+
19
84
  ## Usage
20
85
 
21
86
  ### Reading RDF data in the RDFa format
22
87
 
23
- RDF::RDFa::Reader.open("etc/foaf.html") do |reader|
24
- reader.each_statement do |statement|
25
- puts statement.inspect
26
- end
27
- end
88
+ graph = RDF::Graph.load("etc/doap.html", :format => :rdfa)
89
+
90
+ ### Reading RDF data with vocabulary expansion
91
+
92
+ graph = RDF::Graph.load("etc/doap.html", :format => :rdfa, :expand => true)
93
+
94
+ or
95
+
96
+ graph = RDF::RDFa::Reader.open("etc/doap.html").expand
28
97
 
29
98
  ### Writing RDF data using the XHTML+RDFa format
30
99
 
31
100
  require 'rdf/rdfa'
32
101
 
33
- RDF::RDFa::Writer.open("hello.html") do |writer|
34
- writer << RDF::Graph.new do |graph|
35
- graph << [:hello, RDF::DC.title, "Hello, world!"]
36
- end
102
+ RDF::RDFa::Writer.open("etc/doap.html") do |writer|
103
+ writer << graph
37
104
  end
38
105
 
39
106
  Note that prefixes may be chained between Reader and Writer, so that the Writer will
@@ -42,7 +109,7 @@ use the same prefix definitions found during parsing:
42
109
  prefixes = {}
43
110
  graph = RDF::Graph.load("etc/foaf.html", :prefixes => prefixes)
44
111
  puts graph.dump(:rdfa, :prefixes => prefixes)
45
-
112
+
46
113
  ### Template-based Writer
47
114
  The RDFa writer uses [Haml][Haml] templates for code generation. This allows fully
48
115
  customizable RDFa output in a variety of host languages.
@@ -63,7 +130,7 @@ The template hash defines four Haml templates:
63
130
 
64
131
  !!! XML
65
132
  !!! 5
66
- %html{:xmlns => "http://www.w3.org/1999/xhtml", :lang => lang, :profile => profile, :prefix => prefix}
133
+ %html{:xmlns => "http://www.w3.org/1999/xhtml", :lang => lang, :prefix => prefix}
67
134
  - if base || title
68
135
  %head
69
136
  - if base
@@ -74,7 +141,7 @@ The template hash defines four Haml templates:
74
141
  - subjects.each do |subject|
75
142
  != yield(subject)
76
143
 
77
- This template takes locals _lang_, _profile_, _prefix_, _base_, _title_ in addition to _subjects_
144
+ This template takes locals _lang_, _prefix_, _base_, _title_ in addition to _subjects_
78
145
  to create output similar to the following:
79
146
 
80
147
  <!DOCTYPE html>
@@ -88,8 +155,8 @@ The template hash defines four Haml templates:
88
155
  </body>
89
156
  </html>
90
157
 
91
- Options passed to the Writer are used to supply _lang_, _profile_ and _base_ locals.
92
- _prefix_ is generated based upon prefixes found from default or supplied profiles, as well
158
+ Options passed to the Writer are used to supply _lang_ and _base_ locals.
159
+ _prefix_ is generated based upon prefixes found from the default profiles, as well
93
160
  as those provided by a previous Reader. _title_ is taken from the first top-level subject
94
161
  having an appropriate title property (as defined by the _heading_predicates_ option).
95
162
 
@@ -235,7 +302,7 @@ The template hash defines four Haml templates:
235
302
  * [Haml](https://rubygems.org/gems/haml) (>= 3.0.0)
236
303
 
237
304
  ## Documentation
238
- Full documentation available on [RubyForge](http://rdf.rubyforge.org/rdfa)
305
+ Full documentation available on [Rubydoc.info][RDFa doc]
239
306
 
240
307
  ### Principle Classes
241
308
  * {RDF::RDFa::Format}
@@ -308,4 +375,6 @@ see <http://unlicense.org/> or the accompanying {file:UNLICENSE} file.
308
375
  [RDFa 1.1 Core]: http://www.w3.org/TR/2011/WD-rdfa-core-20110331/ "RDFa 1.1 Core"
309
376
  [XHTML+RDFa 1.1]: http://www.w3.org/TR/2011/WD-xhtml-rdfa-20110331/ "XHTML+RDFa 1.1"
310
377
  [RDFa-test-suite]: http://rdfa.digitalbazaar.com/test-suite/ "RDFa test suite"
378
+ [RDFa doc]: http://rubydoc.info/github/gkellogg/rdf-rdfa/master/file/README.markdown
311
379
  [Haml]: http://haml-lang.com/
380
+ [Turtle]: http://www.w3.org/TR/2011/WD-turtle-20110809/
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.5.1
1
+ 0.3.6
@@ -28,10 +28,11 @@ module RDF
28
28
  require 'rdf/rdfa/patches/literal_hacks'
29
29
  require 'rdf/rdfa/patches/nokogiri_hacks'
30
30
  require 'rdf/rdfa/patches/string_hacks'
31
- autoload :Profile, 'rdf/rdfa/profile'
32
- autoload :Reader, 'rdf/rdfa/reader'
33
- autoload :Writer, 'rdf/rdfa/writer'
34
- autoload :VERSION, 'rdf/rdfa/version'
31
+ autoload :Expansion, 'rdf/rdfa/expansion'
32
+ autoload :Profile, 'rdf/rdfa/profile'
33
+ autoload :Reader, 'rdf/rdfa/reader'
34
+ autoload :Writer, 'rdf/rdfa/writer'
35
+ autoload :VERSION, 'rdf/rdfa/version'
35
36
 
36
37
  XML_RDFA_PROFILE = "http://www.w3.org/profile/rdfa-1.1"
37
38
  XHTML_RDFA_PROFILE = "http://www.w3.org/profile/html-rdfa-1.1"
@@ -0,0 +1,206 @@
1
+ module RDF::RDFa
2
+ ##
3
+ # The Expansion module performs a subset of RDFS entailment rules on the base class,
4
+ # which implementes RDF::Readable.
5
+ module Expansion
6
+ ##
7
+ # Pre-processed vocabularies used to simplify loading of common vocabularies
8
+ COOKED_VOCAB_STATEMENTS = []
9
+
10
+ ##
11
+ # Perform vocabulary expansion on the resulting default graph.
12
+ #
13
+ # Vocabulary expansion relies on a sub-set of RDFS [RDF-SCHEMA] entailment to add triples to the default graph
14
+ # based on rules and property/class relationships described in referenced vocabularies.
15
+ #
16
+ # For all objects that are the target of an rdfa:hasVocabulary property, load the IRI into
17
+ # a repository.
18
+ #
19
+ # Subsequently, perform RDFS expansion using rules rdfs5, rdfs7, rdfs9, and rdfs11 placing
20
+ # resulting triples into the default graph. Iterate on this step until no more triples are added.
21
+ #
22
+ # rdfs5
23
+ # {uuu rdfs:subPropertyOf vvv . vvv rdfs:subPropertyOf xxx} => { uuu rdfs:subPropertyOf xxx}
24
+ #
25
+ # rdfs7
26
+ # {aaa rdfs:subPropertyOf bbb . uuu aaa yyy} => { uuu bbb yyy}
27
+ #
28
+ # rdfs9
29
+ # {uuu rdfs:subClassOf xxx . vvv rdf:type uuu} => { vvv rdf:type xxx}
30
+ #
31
+ # rdfs11
32
+ # {uuu rdfs:subClassOf vvv . vvv rdfs:subClassOf xxx} => { uuu rdfs:subClassOf xxx}
33
+ #
34
+ # @return [RDF::Graph]
35
+ def expand
36
+ repo = RDF::Repository.new
37
+ repo << self # Add default graph
38
+
39
+ count = repo.count
40
+ add_debug("expand") {"Loaded #{repo.size} triples into default graph"}
41
+
42
+ # Vocabularies managed in vocab_repo, and copied to repo for processing.
43
+ # This allows for persistent storage of vocabularies
44
+ @@vocab_repo ||= @options[:vocab_repository] || begin
45
+ RDF::Repository.new.insert(*COOKED_VOCAB_STATEMENTS)
46
+ end
47
+
48
+ vocabs = repo.query(:predicate => RDF::RDFA.hasVocabulary).to_a.map(&:object)
49
+ vocabs.each do |vocab|
50
+ begin
51
+ unless @@vocab_repo.has_context?(vocab)
52
+ add_debug("expand", "Load #{vocab}")
53
+ @@vocab_repo.load(vocab, :context => vocab)
54
+ end
55
+ rescue RDF::FormatError => e
56
+ # XXX: update spec to indicate the error if the vocabulary fails to laod
57
+ add_warning("expand", "Error loading vocabulary #{vocab}: #{e.message}", RDF::RDFA.UnresovedVocabulary)
58
+ end
59
+ end
60
+
61
+ @@vocab_repo.each do |statement|
62
+ if vocabs.include?(statement.context)
63
+ repo << statement
64
+ end
65
+ end
66
+
67
+ if repo.count == count
68
+ add_debug("expand", "No vocabularies loaded")
69
+ else
70
+ repo = rdfs_entailment(repo)
71
+ end
72
+
73
+ # Return graph with default context
74
+ graph = RDF::Graph.new
75
+ repo.statements.each {|st| graph << st if st.context.nil?}
76
+ graph
77
+ end
78
+
79
+ def rule(name, &block)
80
+ Rule.new(name, block)
81
+ end
82
+
83
+ ##
84
+ # An entailment rule
85
+ #
86
+ # Takes a list of antecedent patterns used to find solutions against a queryable
87
+ # object. Yields each consequent with bindings from the solution
88
+ class Rule
89
+ # @attr [Array<RDF::Query::Pattern>]
90
+ attr_reader :antecedents
91
+
92
+ # @attr [Array<RDF::Query::Pattern>]
93
+ attr_reader :consequents
94
+
95
+ # @attr [String] name
96
+ attr_reader :name
97
+
98
+ ##
99
+ # @example
100
+ # r = Rule.new("rdfs5") do
101
+ # antecedent :uuu, RDF::RDFS.subPropertyOf, :vvv
102
+ # antecedent :vvv, RDF::RDFS.subPropertyOf, :xxx
103
+ # consequent :uuu, RDF::RDFS.subPropertyOf, :xxx, "t-box"
104
+ # end
105
+ #
106
+ # r.execute(queryable) {|statement| puts statement.inspect}
107
+ #
108
+ # @param [String] name
109
+ def initialize(name, &block)
110
+ @antecedents = []
111
+ @consequents = []
112
+ @name = name
113
+
114
+ if block_given?
115
+ case block.arity
116
+ when 1 then block.call(self)
117
+ else instance_eval(&block)
118
+ end
119
+ end
120
+ end
121
+
122
+ def antecedent(subject, prediate, object, context = nil)
123
+ antecedents << RDF::Query::Pattern.new(subject, prediate, object, :context => context)
124
+ end
125
+
126
+ def consequent(subject, prediate, object, context = nil)
127
+ consequents << RDF::Query::Pattern.new(subject, prediate, object, :context => context)
128
+ end
129
+
130
+ ##
131
+ # Execute the rule against queryable, yielding each consequent with bindings
132
+ #
133
+ # @param [RDF::Queryable] queryable
134
+ # @yield [statement]
135
+ # @yieldparam [RDF::Statement] statement
136
+ def execute(queryable)
137
+ RDF::Query.new(antecedents).execute(queryable).each do |solution|
138
+ nodes = {}
139
+ consequents.each do |consequent|
140
+ terms = {}
141
+ [:subject, :predicate, :object, :context].each do |r|
142
+ terms[r] = case o = consequent.send(r)
143
+ when RDF::Node then nodes[o] ||= RDF::Node.new
144
+ when RDF::Query::Variable then solution[o]
145
+ else o
146
+ end
147
+ end
148
+
149
+ yield RDF::Statement.from(terms)
150
+ end
151
+ end
152
+ end
153
+ end
154
+
155
+ private
156
+
157
+ RULES = [
158
+ Rule.new("rdfs5") do
159
+ antecedent :uuu, RDF::RDFS.subPropertyOf, :vvv
160
+ antecedent :vvv, RDF::RDFS.subPropertyOf, :xxx
161
+ consequent :uuu, RDF::RDFS.subPropertyOf, :xxx, "t-box"
162
+ end,
163
+ Rule.new("rdfs7") do
164
+ antecedent :aaa, RDF::RDFS.subPropertyOf, :bbb
165
+ antecedent :uuu, :aaa, :yyy
166
+ consequent :uuu, :bbb, :yyy
167
+ end,
168
+ Rule.new("rdfs9") do
169
+ antecedent :uuu, RDF::RDFS.subClassOf, :xxx
170
+ antecedent :vvv, RDF.type, :uuu
171
+ consequent :vvv, RDF.type, :xxx
172
+ end,
173
+ Rule.new("rdfs11") do
174
+ antecedent :uuu, RDF::RDFS.subClassOf, :vvv
175
+ antecedent :vvv, RDF::RDFS.subClassOf, :xxx
176
+ consequent :uuu, RDF::RDFS.subClassOf, :xxx, "t-box"
177
+ end
178
+ ]
179
+
180
+ ##
181
+ # Perform RDFS entailment rules on repository
182
+ # @param [RDF::Repository] repo
183
+ # @return [RDF::Repository]
184
+ def rdfs_entailment(repo)
185
+ old_count = 0
186
+
187
+ while old_count < (count = repo.count)
188
+ add_debug("entailment", "old: #{old_count} count: #{count}")
189
+ old_count = count
190
+
191
+ RULES.each do |rule|
192
+ rule.execute(repo) do |statement|
193
+ add_debug("entailment(#{rule.name})") {statement.inspect}
194
+ repo << statement
195
+ end
196
+ end
197
+ end
198
+
199
+ add_debug("entailment", "final count: #{count}")
200
+ repo
201
+ end
202
+ end
203
+ end
204
+
205
+ # Load cooked profiles
206
+ Dir.glob(File.join(File.expand_path(File.dirname(__FILE__)), 'expansion', '*')).each {|f| load f}
@@ -0,0 +1,12 @@
1
+ # This file is automatically generated by ./script/intern_vocabulary
2
+ # RDFa vocabulary for http://creativecommons.org/ns# loaded from http://creativecommons.org/ns#
3
+ require 'rdf/rdfa/expansion'
4
+
5
+ module RDF::RDFa::Expansion
6
+ [
7
+ RDF::Statement.new(RDF::URI('http://creativecommons.org/ns#License'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subClassOf'), RDF::URI('http://purl.org/dc/terms/LicenseDocument'), :context => RDF::URI('http://creativecommons.org/ns#')),
8
+ RDF::Statement.new(RDF::URI('http://creativecommons.org/ns#license'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/license'), :context => RDF::URI('http://creativecommons.org/ns#')),
9
+ RDF::Statement.new(RDF::URI('http://creativecommons.org/ns#morePermissions'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://creativecommons.org/ns#')),
10
+ RDF::Statement.new(RDF::URI('http://creativecommons.org/ns#useGuidelines'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://creativecommons.org/ns#')),
11
+ ].each {|st| COOKED_VOCAB_STATEMENTS << st }
12
+ end
@@ -0,0 +1,98 @@
1
+ # This file is automatically generated by ./script/intern_vocabulary
2
+ # RDFa vocabulary for http://purl.org/dc/terms/ loaded from http://purl.org/dc/terms/
3
+ require 'rdf/rdfa/expansion'
4
+
5
+ module RDF::RDFa::Expansion
6
+ [
7
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/title'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/title'), :context => RDF::URI('http://purl.org/dc/terms/')),
8
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/creator'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/creator'), :context => RDF::URI('http://purl.org/dc/terms/')),
9
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/creator'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/contributor'), :context => RDF::URI('http://purl.org/dc/terms/')),
10
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/subject'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/subject'), :context => RDF::URI('http://purl.org/dc/terms/')),
11
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/description'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/description'), :context => RDF::URI('http://purl.org/dc/terms/')),
12
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/publisher'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/publisher'), :context => RDF::URI('http://purl.org/dc/terms/')),
13
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/contributor'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/contributor'), :context => RDF::URI('http://purl.org/dc/terms/')),
14
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/date'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
15
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/type'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/type'), :context => RDF::URI('http://purl.org/dc/terms/')),
16
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/format'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/format'), :context => RDF::URI('http://purl.org/dc/terms/')),
17
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/identifier'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/identifier'), :context => RDF::URI('http://purl.org/dc/terms/')),
18
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/source'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/source'), :context => RDF::URI('http://purl.org/dc/terms/')),
19
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/source'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
20
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/language'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/language'), :context => RDF::URI('http://purl.org/dc/terms/')),
21
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/relation'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
22
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/coverage'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/coverage'), :context => RDF::URI('http://purl.org/dc/terms/')),
23
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/rights'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/rights'), :context => RDF::URI('http://purl.org/dc/terms/')),
24
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/alternative'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/title'), :context => RDF::URI('http://purl.org/dc/terms/')),
25
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/alternative'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/title'), :context => RDF::URI('http://purl.org/dc/terms/')),
26
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/tableOfContents'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/description'), :context => RDF::URI('http://purl.org/dc/terms/')),
27
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/tableOfContents'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/description'), :context => RDF::URI('http://purl.org/dc/terms/')),
28
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/abstract'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/description'), :context => RDF::URI('http://purl.org/dc/terms/')),
29
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/abstract'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/description'), :context => RDF::URI('http://purl.org/dc/terms/')),
30
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/created'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
31
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/created'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
32
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/valid'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
33
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/valid'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
34
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/available'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
35
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/available'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
36
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/issued'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
37
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/issued'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
38
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/modified'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
39
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/modified'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
40
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/extent'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/format'), :context => RDF::URI('http://purl.org/dc/terms/')),
41
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/extent'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/format'), :context => RDF::URI('http://purl.org/dc/terms/')),
42
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/medium'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/format'), :context => RDF::URI('http://purl.org/dc/terms/')),
43
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/medium'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/format'), :context => RDF::URI('http://purl.org/dc/terms/')),
44
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/isVersionOf'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
45
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/isVersionOf'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
46
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/hasVersion'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
47
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/hasVersion'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
48
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/isReplacedBy'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
49
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/isReplacedBy'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
50
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/replaces'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
51
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/replaces'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
52
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/isRequiredBy'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
53
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/isRequiredBy'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
54
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/requires'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
55
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/requires'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
56
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/isPartOf'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
57
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/isPartOf'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
58
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/hasPart'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
59
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/hasPart'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
60
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/isReferencedBy'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
61
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/isReferencedBy'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
62
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/references'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
63
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/references'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
64
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/isFormatOf'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
65
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/isFormatOf'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
66
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/hasFormat'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
67
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/hasFormat'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
68
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/conformsTo'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
69
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/conformsTo'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/relation'), :context => RDF::URI('http://purl.org/dc/terms/')),
70
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/spatial'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/coverage'), :context => RDF::URI('http://purl.org/dc/terms/')),
71
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/spatial'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/coverage'), :context => RDF::URI('http://purl.org/dc/terms/')),
72
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/temporal'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/coverage'), :context => RDF::URI('http://purl.org/dc/terms/')),
73
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/temporal'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/coverage'), :context => RDF::URI('http://purl.org/dc/terms/')),
74
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/mediator'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/audience'), :context => RDF::URI('http://purl.org/dc/terms/')),
75
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/dateAccepted'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
76
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/dateAccepted'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
77
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/dateCopyrighted'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
78
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/dateCopyrighted'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
79
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/dateSubmitted'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
80
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/dateSubmitted'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/date'), :context => RDF::URI('http://purl.org/dc/terms/')),
81
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/educationLevel'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/audience'), :context => RDF::URI('http://purl.org/dc/terms/')),
82
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/accessRights'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/rights'), :context => RDF::URI('http://purl.org/dc/terms/')),
83
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/accessRights'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/rights'), :context => RDF::URI('http://purl.org/dc/terms/')),
84
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/bibliographicCitation'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/identifier'), :context => RDF::URI('http://purl.org/dc/terms/')),
85
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/bibliographicCitation'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/identifier'), :context => RDF::URI('http://purl.org/dc/terms/')),
86
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/license'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/elements/1.1/rights'), :context => RDF::URI('http://purl.org/dc/terms/')),
87
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/license'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subPropertyOf'), RDF::URI('http://purl.org/dc/terms/rights'), :context => RDF::URI('http://purl.org/dc/terms/')),
88
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/AgentClass'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subClassOf'), RDF::URI('http://purl.org/dc/terms/AgentClass'), :context => RDF::URI('http://purl.org/dc/terms/')),
89
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/FileFormat'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subClassOf'), RDF::URI('http://purl.org/dc/terms/MediaType'), :context => RDF::URI('http://purl.org/dc/terms/')),
90
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/Jurisdiction'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subClassOf'), RDF::URI('http://purl.org/dc/terms/LocationPeriodOrJurisdiction'), :context => RDF::URI('http://purl.org/dc/terms/')),
91
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/LicenseDocument'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subClassOf'), RDF::URI('http://purl.org/dc/terms/RightsStatement'), :context => RDF::URI('http://purl.org/dc/terms/')),
92
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/Location'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subClassOf'), RDF::URI('http://purl.org/dc/terms/LocationPeriodOrJurisdiction'), :context => RDF::URI('http://purl.org/dc/terms/')),
93
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/MediaType'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subClassOf'), RDF::URI('http://purl.org/dc/terms/MediaTypeOrExtent'), :context => RDF::URI('http://purl.org/dc/terms/')),
94
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/PeriodOfTime'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subClassOf'), RDF::URI('http://purl.org/dc/terms/LocationPeriodOrJurisdiction'), :context => RDF::URI('http://purl.org/dc/terms/')),
95
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/PhysicalMedium'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subClassOf'), RDF::URI('http://purl.org/dc/terms/MediaType'), :context => RDF::URI('http://purl.org/dc/terms/')),
96
+ RDF::Statement.new(RDF::URI('http://purl.org/dc/terms/SizeOrDuration'), RDF::URI('http://www.w3.org/2000/01/rdf-schema#subClassOf'), RDF::URI('http://purl.org/dc/terms/MediaTypeOrExtent'), :context => RDF::URI('http://purl.org/dc/terms/')),
97
+ ].each {|st| COOKED_VOCAB_STATEMENTS << st }
98
+ end