rdf 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CREDITS +1 -0
- data/README +1 -0
- data/VERSION +1 -1
- data/lib/rdf.rb +25 -24
- data/lib/rdf/mixin/countable.rb +9 -1
- data/lib/rdf/mixin/enumerable.rb +5 -1
- data/lib/rdf/mixin/queryable.rb +26 -4
- data/lib/rdf/model/literal.rb +15 -2
- data/lib/rdf/vocab.rb +20 -19
- data/lib/rdf/vocab/schema.rb +652 -0
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NWYzN2ZkYjgxMzA3Mjg3MmNmZDY1NTk5OGE0NDBhODI3OWYwZmEyNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzllMjNhYjczYzI4NWIyMzc0ZDc3YTBlNzNiNGM0NzQ5NWIxMzM1OA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjA3MjU5MmIzYzcxYWE5ODgzZDI1YWFjODdjYjE3MjVkMWZiMTYzNzJkOTJi
|
10
|
+
YjM5OThhNTUyYjQxNTk4NWIxODBjZWI1ZmNlMTU3NGI1OTBmNjZmNzA3YTY5
|
11
|
+
ZGNmYzBjNDY2ZjJiZGNiYmEyZGEzYWY0ZGFmZDE0NTQxNmE4ZWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MWViMzUxNDhlOTUzYTAxYTNjYmJmZDYwYzQ0M2YyYjZhNjc3MmI1Yjk4NzYy
|
14
|
+
NmJkM2VlYzc3NmZjMWRjOWUwZWM3NWJjYmQ3MTFmYzhjMzE5ZmViMDgzM2Nj
|
15
|
+
YzhiZDFjMTgwNmJhNzA1NDc4YzJiMDBlYzViNDA3M2Q5MGM5ZGQ=
|
data/CREDITS
CHANGED
data/README
CHANGED
@@ -330,6 +330,7 @@ follows:
|
|
330
330
|
* [Joey Geiger](http://github.com/jgeiger) - <http://github.com/jgeiger>
|
331
331
|
* [Fumihiro Kato](http://github.com/fumi) - <http://fumi.me/>
|
332
332
|
* [Naoki Kawamukai](http://github.com/kna) - <http://github.com/kna>
|
333
|
+
* [Tom Nixon](https://github.com/tomjnixon) - <https://github.com/tomjnixon>
|
333
334
|
* [Hellekin O. Wolf](http://github.com/hellekin) - <http://hellekin.cepheide.org/>
|
334
335
|
* [John Fieber](http://github.com/jfieber) - <http://github.com/jfieber>
|
335
336
|
* [Keita Urashima](http://github.com/ursm) - <http://ursm.jp/>
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.9
|
data/lib/rdf.rb
CHANGED
@@ -149,30 +149,6 @@ module RDF
|
|
149
149
|
Vocabulary.create(uri)
|
150
150
|
end
|
151
151
|
|
152
|
-
# RDF Vocabulary terms
|
153
|
-
%w(
|
154
|
-
Alt
|
155
|
-
Bag
|
156
|
-
first
|
157
|
-
HTML
|
158
|
-
langString
|
159
|
-
List
|
160
|
-
nil
|
161
|
-
object
|
162
|
-
predicate
|
163
|
-
Property
|
164
|
-
rest
|
165
|
-
Seq
|
166
|
-
Statement
|
167
|
-
subject
|
168
|
-
type
|
169
|
-
value
|
170
|
-
XMLLiteral
|
171
|
-
).each do |term|
|
172
|
-
define_method(term) {self[term.to_sym]}
|
173
|
-
module_function term.to_sym
|
174
|
-
end
|
175
|
-
|
176
152
|
##
|
177
153
|
# @return [#to_s] property
|
178
154
|
# @return [URI]
|
@@ -204,6 +180,31 @@ module RDF
|
|
204
180
|
RDF::URI.intern("http://www.w3.org/1999/02/22-rdf-syntax-ns#")
|
205
181
|
end
|
206
182
|
|
183
|
+
# RDF Vocabulary terms
|
184
|
+
%w(
|
185
|
+
Alt
|
186
|
+
Bag
|
187
|
+
first
|
188
|
+
HTML
|
189
|
+
langString
|
190
|
+
List
|
191
|
+
nil
|
192
|
+
object
|
193
|
+
predicate
|
194
|
+
Property
|
195
|
+
rest
|
196
|
+
Seq
|
197
|
+
Statement
|
198
|
+
subject
|
199
|
+
type
|
200
|
+
value
|
201
|
+
XMLLiteral
|
202
|
+
).each do |term|
|
203
|
+
term_uri = self[term.to_sym]
|
204
|
+
define_method(term) {term_uri}
|
205
|
+
module_function term.to_sym
|
206
|
+
end
|
207
|
+
|
207
208
|
class << self
|
208
209
|
# For compatibility with `RDF::Vocabulary.__name__`:
|
209
210
|
alias_method :__name__, :name
|
data/lib/rdf/mixin/countable.rb
CHANGED
@@ -31,8 +31,16 @@ module RDF
|
|
31
31
|
# @see Object#enum_for
|
32
32
|
def enum_for(method = :each, *args)
|
33
33
|
# Ensure that enumerators support the `#empty?` and `#count` methods:
|
34
|
-
|
34
|
+
this = self
|
35
|
+
Countable::Enumerator.new do |yielder|
|
36
|
+
this.send(method, *args) {|y| yielder << y}
|
37
|
+
end
|
35
38
|
end
|
36
39
|
alias_method :to_enum, :enum_for
|
40
|
+
|
41
|
+
# Extends Enumerator with {Countable}, which is used by {Countable#enum_for}
|
42
|
+
class Enumerator < ::Enumerator
|
43
|
+
include Countable
|
44
|
+
end
|
37
45
|
end # Countable
|
38
46
|
end # RDF
|
data/lib/rdf/mixin/enumerable.rb
CHANGED
@@ -162,7 +162,11 @@ module RDF
|
|
162
162
|
# @return [Enumerator]
|
163
163
|
# @see #each_statement
|
164
164
|
def enum_statement
|
165
|
-
|
165
|
+
# Ensure that statements are queryable, countable and enumerable
|
166
|
+
this = self
|
167
|
+
Queryable::Enumerator.new do |yielder|
|
168
|
+
this.send(:each_statement) {|y| yielder << y}
|
169
|
+
end
|
166
170
|
end
|
167
171
|
alias_method :enum_statements, :enum_statement
|
168
172
|
|
data/lib/rdf/mixin/queryable.rb
CHANGED
@@ -88,10 +88,6 @@ module RDF
|
|
88
88
|
enum_for(:query_pattern, pattern)
|
89
89
|
end
|
90
90
|
after_query(pattern) if block_given? && respond_to?(:after_query)
|
91
|
-
enum.extend(RDF::Queryable, RDF::Enumerable, RDF::Countable)
|
92
|
-
def enum.to_a
|
93
|
-
super.extend(RDF::Queryable, RDF::Enumerable, RDF::Countable)
|
94
|
-
end
|
95
91
|
enum
|
96
92
|
end
|
97
93
|
end
|
@@ -290,5 +286,31 @@ module RDF
|
|
290
286
|
def first_value(pattern = nil)
|
291
287
|
(literal = first_literal(pattern)) ? literal.value : nil
|
292
288
|
end
|
289
|
+
|
290
|
+
##
|
291
|
+
# @private
|
292
|
+
# @param [Symbol, #to_sym] method
|
293
|
+
# @return [Enumerator]
|
294
|
+
# @see Object#enum_for
|
295
|
+
def enum_for(method = :each, *args)
|
296
|
+
# Ensure that enumerators are, themselves, queryable
|
297
|
+
this = self
|
298
|
+
Queryable::Enumerator.new do |yielder|
|
299
|
+
this.send(method, *args) {|y| yielder << y}
|
300
|
+
end
|
301
|
+
end
|
302
|
+
alias_method :to_enum, :enum_for
|
303
|
+
|
304
|
+
|
305
|
+
# Extends Enumerator with {Queryable} and {Enumerable}, which is used by {Enumerable#each_statement} and {Queryable#enum_for}
|
306
|
+
class Enumerator < ::Enumerator
|
307
|
+
include Queryable
|
308
|
+
include Enumerable
|
309
|
+
|
310
|
+
# Make sure returned arrays are also queryable
|
311
|
+
def to_a
|
312
|
+
return super.to_a.extend(RDF::Queryable, RDF::Enumerable)
|
313
|
+
end
|
314
|
+
end
|
293
315
|
end # Queryable
|
294
316
|
end # RDF
|
data/lib/rdf/model/literal.rb
CHANGED
@@ -63,12 +63,14 @@ module RDF
|
|
63
63
|
|
64
64
|
private
|
65
65
|
@@subclasses = [] # @private
|
66
|
+
@@datatype_map = nil # @private
|
66
67
|
|
67
68
|
##
|
68
69
|
# @private
|
69
70
|
# @return [void]
|
70
71
|
def self.inherited(child)
|
71
72
|
@@subclasses << child
|
73
|
+
@@datatype_map = nil
|
72
74
|
super
|
73
75
|
end
|
74
76
|
|
@@ -87,11 +89,22 @@ module RDF
|
|
87
89
|
|
88
90
|
include RDF::Term
|
89
91
|
|
92
|
+
##
|
93
|
+
# @private
|
94
|
+
# Return Hash mapping from datatype URI to class
|
95
|
+
def self.datatype_map
|
96
|
+
@@datatype_map ||= Hash[
|
97
|
+
@@subclasses
|
98
|
+
.select {|klass| klass.const_defined?(:DATATYPE)}
|
99
|
+
.map {|klass| [klass.const_get(:DATATYPE).to_s, klass]}
|
100
|
+
]
|
101
|
+
end
|
102
|
+
|
90
103
|
##
|
91
104
|
# @private
|
92
105
|
# Return datatype class for uri, or nil if none is found
|
93
106
|
def self.datatyped_class(uri)
|
94
|
-
|
107
|
+
datatype_map[uri]
|
95
108
|
end
|
96
109
|
|
97
110
|
##
|
@@ -102,7 +115,7 @@ module RDF
|
|
102
115
|
klass = case
|
103
116
|
when !self.equal?(RDF::Literal)
|
104
117
|
self # subclasses can be directly constructed without type dispatch
|
105
|
-
when typed_literal = datatyped_class(
|
118
|
+
when typed_literal = datatyped_class(options[:datatype].to_s)
|
106
119
|
typed_literal
|
107
120
|
else case value
|
108
121
|
when ::TrueClass then RDF::Literal::Boolean
|
data/lib/rdf/vocab.rb
CHANGED
@@ -6,25 +6,26 @@ module RDF
|
|
6
6
|
#
|
7
7
|
# The following vocabularies are pre-defined for your convenience:
|
8
8
|
#
|
9
|
-
# * {RDF}
|
10
|
-
# * {RDF::CC}
|
11
|
-
# * {RDF::CERT}
|
12
|
-
# * {RDF::DC}
|
13
|
-
# * {RDF::DC11}
|
14
|
-
# * {RDF::DOAP}
|
15
|
-
# * {RDF::EXIF}
|
16
|
-
# * {RDF::FOAF}
|
17
|
-
# * {RDF::GEO}
|
18
|
-
# * {RDF::HTTP}
|
19
|
-
# * {RDF::OWL}
|
20
|
-
# * {RDF::RDFS}
|
21
|
-
# * {RDF::RSA}
|
22
|
-
# * {RDF::RSS}
|
23
|
-
# * {RDF::
|
24
|
-
# * {RDF::
|
25
|
-
# * {RDF::
|
26
|
-
# * {RDF::
|
27
|
-
# * {RDF::
|
9
|
+
# * {RDF} - Resource Description Framework (RDF)
|
10
|
+
# * {RDF::CC} - Creative Commons (CC)
|
11
|
+
# * {RDF::CERT} - W3 Authentication Certificate (CERT)
|
12
|
+
# * {RDF::DC} - Dublin Core (DC)
|
13
|
+
# * {RDF::DC11} - Dublin Core 1.1 (DC11) _deprecated_
|
14
|
+
# * {RDF::DOAP} - Description of a Project (DOAP)
|
15
|
+
# * {RDF::EXIF} - Exchangeable Image File Format (EXIF)
|
16
|
+
# * {RDF::FOAF} - Friend of a Friend (FOAF)
|
17
|
+
# * {RDF::GEO} - WGS84 Geo Positioning (GEO)
|
18
|
+
# * {RDF::HTTP} - Hypertext Transfer Protocol (HTTP)
|
19
|
+
# * {RDF::OWL} - Web Ontology Language (OWL)
|
20
|
+
# * {RDF::RDFS} - RDF Schema (RDFS)
|
21
|
+
# * {RDF::RSA} - W3 RSA Keys (RSA)
|
22
|
+
# * {RDF::RSS} - RDF Site Summary (RSS)
|
23
|
+
# * {RDF::SCHEMA} - Schema.org
|
24
|
+
# * {RDF::SIOC} - Semantically-Interlinked Online Communities (SIOC)
|
25
|
+
# * {RDF::SKOS} - Simple Knowledge Organization System (SKOS)
|
26
|
+
# * {RDF::WOT} - Web of Trust (WOT)
|
27
|
+
# * {RDF::XHTML} - Extensible HyperText Markup Language (XHTML)
|
28
|
+
# * {RDF::XSD} - XML Schema (XSD)
|
28
29
|
#
|
29
30
|
# @example Using pre-defined RDF vocabularies
|
30
31
|
# include RDF
|
@@ -0,0 +1,652 @@
|
|
1
|
+
module RDF
|
2
|
+
##
|
3
|
+
# Schema.org (FOAF) vocabulary.
|
4
|
+
#
|
5
|
+
# Creating this involves extrating class and property definitions
|
6
|
+
# from http://schema.org/docs/schema_org_rdfa.html, which is done
|
7
|
+
# though the private class-method {SCHEMA.generate}
|
8
|
+
#
|
9
|
+
# @see http://schema.org/
|
10
|
+
class SCHEMA < Vocabulary("http://schema.org/")
|
11
|
+
|
12
|
+
property :about
|
13
|
+
property :acceptedPaymentMethod
|
14
|
+
property :acceptsReservations
|
15
|
+
property :accountablePerson
|
16
|
+
property :acquiredFrom
|
17
|
+
property :action
|
18
|
+
property :activeIngredient
|
19
|
+
property :activityDuration
|
20
|
+
property :activityFrequency
|
21
|
+
property :actor
|
22
|
+
property :actors
|
23
|
+
property :additionalName
|
24
|
+
property :additionalType
|
25
|
+
property :additionalVariable
|
26
|
+
property :addOn
|
27
|
+
property :address
|
28
|
+
property :addressCountry
|
29
|
+
property :addressLocality
|
30
|
+
property :addressRegion
|
31
|
+
property :administrationRoute
|
32
|
+
property :advanceBookingRequirement
|
33
|
+
property :adverseOutcome
|
34
|
+
property :affectedBy
|
35
|
+
property :affiliation
|
36
|
+
property :agent
|
37
|
+
property :aggregateRating
|
38
|
+
property :album
|
39
|
+
property :albums
|
40
|
+
property :alcoholWarning
|
41
|
+
property :algorithm
|
42
|
+
property :alignmentType
|
43
|
+
property :alternateName
|
44
|
+
property :alternativeHeadline
|
45
|
+
property :alumni
|
46
|
+
property :alumniOf
|
47
|
+
property :amountOfThisGood
|
48
|
+
property :antagonist
|
49
|
+
property :applicableLocation
|
50
|
+
property :applicationCategory
|
51
|
+
property :applicationSubCategory
|
52
|
+
property :applicationSuite
|
53
|
+
property :appliesToDeliveryMethod
|
54
|
+
property :appliesToPaymentMethod
|
55
|
+
property :arterialBranch
|
56
|
+
property :articleBody
|
57
|
+
property :articleSection
|
58
|
+
property :aspect
|
59
|
+
property :assembly
|
60
|
+
property :assemblyVersion
|
61
|
+
property :associatedAnatomy
|
62
|
+
property :associatedArticle
|
63
|
+
property :associatedMedia
|
64
|
+
property :associatedPathophysiology
|
65
|
+
property :attendee
|
66
|
+
property :attendees
|
67
|
+
property :audience
|
68
|
+
property :audio
|
69
|
+
property :author
|
70
|
+
property :availability
|
71
|
+
property :availabilityEnds
|
72
|
+
property :availabilityStarts
|
73
|
+
property :availableAtOrFrom
|
74
|
+
property :availableDeliveryMethod
|
75
|
+
property :availableIn
|
76
|
+
property :availableService
|
77
|
+
property :availableStrength
|
78
|
+
property :availableTest
|
79
|
+
property :award
|
80
|
+
property :awards
|
81
|
+
property :background
|
82
|
+
property :baseSalary
|
83
|
+
property :benefits
|
84
|
+
property :bestRating
|
85
|
+
property :billingIncrement
|
86
|
+
property :biomechnicalClass
|
87
|
+
property :birthDate
|
88
|
+
property :bitrate
|
89
|
+
property :blogPost
|
90
|
+
property :blogPosts
|
91
|
+
property :bloodSupply
|
92
|
+
property :bodyLocation
|
93
|
+
property :bookEdition
|
94
|
+
property :bookFormat
|
95
|
+
property :borrower
|
96
|
+
property :box
|
97
|
+
property :branch
|
98
|
+
property :branchOf
|
99
|
+
property :brand
|
100
|
+
property :breadcrumb
|
101
|
+
property :breastfeedingWarning
|
102
|
+
property :browserRequirements
|
103
|
+
property :businessFunction
|
104
|
+
property :buyer
|
105
|
+
property :byArtist
|
106
|
+
property :calories
|
107
|
+
property :candidate
|
108
|
+
property :caption
|
109
|
+
property :carbohydrateContent
|
110
|
+
property :carrierRequirements
|
111
|
+
property :catalog
|
112
|
+
property :category
|
113
|
+
property :cause
|
114
|
+
property :causeOf
|
115
|
+
property :childMaxAge
|
116
|
+
property :childMinAge
|
117
|
+
property :children
|
118
|
+
property :cholesterolContent
|
119
|
+
property :circle
|
120
|
+
property :citation
|
121
|
+
property :clincalPharmacology
|
122
|
+
property :closes
|
123
|
+
property :code
|
124
|
+
property :codeRepository
|
125
|
+
property :codeValue
|
126
|
+
property :codingSystem
|
127
|
+
property :colleague
|
128
|
+
property :colleagues
|
129
|
+
property :collection
|
130
|
+
property :color
|
131
|
+
property :comment
|
132
|
+
property :commentText
|
133
|
+
property :commentTime
|
134
|
+
property :comprisedOf
|
135
|
+
property :connectedTo
|
136
|
+
property :contactPoint
|
137
|
+
property :contactPoints
|
138
|
+
property :contactType
|
139
|
+
property :containedIn
|
140
|
+
property :contentLocation
|
141
|
+
property :contentRating
|
142
|
+
property :contentSize
|
143
|
+
property :contentUrl
|
144
|
+
property :contraindication
|
145
|
+
property :contributor
|
146
|
+
property :cookingMethod
|
147
|
+
property :cookTime
|
148
|
+
property :copyrightHolder
|
149
|
+
property :copyrightYear
|
150
|
+
property :cost
|
151
|
+
property :costCategory
|
152
|
+
property :costCurrency
|
153
|
+
property :costOrigin
|
154
|
+
property :costPerUnit
|
155
|
+
property :countriesNotSupported
|
156
|
+
property :countriesSupported
|
157
|
+
property :course
|
158
|
+
property :creator
|
159
|
+
property :currenciesAccepted
|
160
|
+
property :dataset
|
161
|
+
property :dateCreated
|
162
|
+
property :dateline
|
163
|
+
property :dateModified
|
164
|
+
property :datePosted
|
165
|
+
property :datePublished
|
166
|
+
property :dayOfWeek
|
167
|
+
property :deathDate
|
168
|
+
property :deliveryLeadTime
|
169
|
+
property :deliveryMethod
|
170
|
+
property :dependencies
|
171
|
+
property :depth
|
172
|
+
property :description
|
173
|
+
property :device
|
174
|
+
property :diagnosis
|
175
|
+
property :diagram
|
176
|
+
property :diet
|
177
|
+
property :dietFeatures
|
178
|
+
property :differentialDiagnosis
|
179
|
+
property :director
|
180
|
+
property :discusses
|
181
|
+
property :discussionUrl
|
182
|
+
property :distance
|
183
|
+
property :distinguishingSign
|
184
|
+
property :distribution
|
185
|
+
property :domainIncludes
|
186
|
+
property :dosageForm
|
187
|
+
property :doseSchedule
|
188
|
+
property :doseUnit
|
189
|
+
property :doseValue
|
190
|
+
property :downloadUrl
|
191
|
+
property :drainsTo
|
192
|
+
property :drug
|
193
|
+
property :drugClass
|
194
|
+
property :drugUnit
|
195
|
+
property :duns
|
196
|
+
property :duplicateTherapy
|
197
|
+
property :duration
|
198
|
+
property :durationOfWarranty
|
199
|
+
property :editor
|
200
|
+
property :educationalAlignment
|
201
|
+
property :educationalFramework
|
202
|
+
property :educationalRole
|
203
|
+
property :educationalUse
|
204
|
+
property :educationRequirements
|
205
|
+
property :elevation
|
206
|
+
property :eligibleCustomerType
|
207
|
+
property :eligibleDuration
|
208
|
+
property :eligibleQuantity
|
209
|
+
property :eligibleRegion
|
210
|
+
property :eligibleTransactionVolume
|
211
|
+
property :email
|
212
|
+
property :embedUrl
|
213
|
+
property :employee
|
214
|
+
property :employees
|
215
|
+
property :employmentType
|
216
|
+
property :encodesCreativeWork
|
217
|
+
property :encoding
|
218
|
+
property :encodingFormat
|
219
|
+
property :encodings
|
220
|
+
property :endDate
|
221
|
+
property :endorsee
|
222
|
+
property :endorsers
|
223
|
+
property :endTime
|
224
|
+
property :entertainmentBusiness
|
225
|
+
property :epidemiology
|
226
|
+
property :episode
|
227
|
+
property :episodeNumber
|
228
|
+
property :episodes
|
229
|
+
property :equal
|
230
|
+
property :estimatesRiskOf
|
231
|
+
property :event
|
232
|
+
property :events
|
233
|
+
property :evidenceLevel
|
234
|
+
property :evidenceOrigin
|
235
|
+
property :exercisePlan
|
236
|
+
property :exerciseType
|
237
|
+
property :exifData
|
238
|
+
property :expectedPrognosis
|
239
|
+
property :experienceRequirements
|
240
|
+
property :expertConsiderations
|
241
|
+
property :expires
|
242
|
+
property :familyName
|
243
|
+
property :fatContent
|
244
|
+
property :faxNumber
|
245
|
+
property :featureList
|
246
|
+
property :fiberContent
|
247
|
+
property :fileFormat
|
248
|
+
property :fileSize
|
249
|
+
property :followee
|
250
|
+
property :follows
|
251
|
+
property :followup
|
252
|
+
property :foodEstablishment
|
253
|
+
property :foodEvent
|
254
|
+
property :foodWarning
|
255
|
+
property :founder
|
256
|
+
property :founders
|
257
|
+
property :foundingDate
|
258
|
+
property :frequency
|
259
|
+
property :fromLocation
|
260
|
+
property :function
|
261
|
+
property :functionalClass
|
262
|
+
property :gender
|
263
|
+
property :genre
|
264
|
+
property :geo
|
265
|
+
property :givenName
|
266
|
+
property :globalLocationNumber
|
267
|
+
property :greater
|
268
|
+
property :greaterOrEqual
|
269
|
+
property :gtin13
|
270
|
+
property :gtin14
|
271
|
+
property :gtin8
|
272
|
+
property :guideline
|
273
|
+
property :guidelineDate
|
274
|
+
property :guidelineSubject
|
275
|
+
property :hasPOS
|
276
|
+
property :headline
|
277
|
+
property :healthCondition
|
278
|
+
property :height
|
279
|
+
property :highPrice
|
280
|
+
property :hiringOrganization
|
281
|
+
property :homeLocation
|
282
|
+
property :honorificPrefix
|
283
|
+
property :honorificSuffix
|
284
|
+
property :hospitalAffiliation
|
285
|
+
property :howPerformed
|
286
|
+
property :identifyingExam
|
287
|
+
property :identifyingTest
|
288
|
+
property :illustrator
|
289
|
+
property :image
|
290
|
+
property :imagingTechnique
|
291
|
+
property :inAlbum
|
292
|
+
property :incentives
|
293
|
+
property :includedRiskFactor
|
294
|
+
property :includesObject
|
295
|
+
property :increasesRiskOf
|
296
|
+
property :indication
|
297
|
+
property :industry
|
298
|
+
property :infectiousAgent
|
299
|
+
property :infectiousAgentClass
|
300
|
+
property :ingredients
|
301
|
+
property :inLanguage
|
302
|
+
property :inPlaylist
|
303
|
+
property :insertion
|
304
|
+
property :installUrl
|
305
|
+
property :instrument
|
306
|
+
property :intensity
|
307
|
+
property :interactingDrug
|
308
|
+
property :interactionCount
|
309
|
+
property :interactivityType
|
310
|
+
property :inventoryLevel
|
311
|
+
property :isAccessoryOrSparePartFor
|
312
|
+
property :isAvailableGenerically
|
313
|
+
property :isBasedOnUrl
|
314
|
+
property :isbn
|
315
|
+
property :isConsumableFor
|
316
|
+
property :isFamilyFriendly
|
317
|
+
property :isicV4
|
318
|
+
property :isPartOf
|
319
|
+
property :isProprietary
|
320
|
+
property :isRelatedTo
|
321
|
+
property :isSimilarTo
|
322
|
+
property :isVariantOf
|
323
|
+
property :itemCondition
|
324
|
+
property :itemListElement
|
325
|
+
property :itemListOrder
|
326
|
+
property :itemOffered
|
327
|
+
property :itemReviewed
|
328
|
+
property :jobLocation
|
329
|
+
property :jobTitle
|
330
|
+
property :keywords
|
331
|
+
property :knows
|
332
|
+
property :labelDetails
|
333
|
+
property :landlord
|
334
|
+
property :language
|
335
|
+
property :lastReviewed
|
336
|
+
property :latitude
|
337
|
+
property :learningResourceType
|
338
|
+
property :legalName
|
339
|
+
property :legalStatus
|
340
|
+
property :lender
|
341
|
+
property :lesser
|
342
|
+
property :lesserOrEqual
|
343
|
+
property :line
|
344
|
+
property :location
|
345
|
+
property :logo
|
346
|
+
property :longitude
|
347
|
+
property :loser
|
348
|
+
property :lowPrice
|
349
|
+
property :mainContentOfPage
|
350
|
+
property :makesOffer
|
351
|
+
property :manufacturer
|
352
|
+
property :map
|
353
|
+
property :maps
|
354
|
+
property :maximumIntake
|
355
|
+
property :maxPrice
|
356
|
+
property :maxValue
|
357
|
+
property :mechanismOfAction
|
358
|
+
property :medicalSpecialty
|
359
|
+
property :medicineSystem
|
360
|
+
property :member
|
361
|
+
property :memberOf
|
362
|
+
property :members
|
363
|
+
property :memoryRequirements
|
364
|
+
property :mentions
|
365
|
+
property :menu
|
366
|
+
property :minPrice
|
367
|
+
property :minValue
|
368
|
+
property :model
|
369
|
+
property :mpn
|
370
|
+
property :musicBy
|
371
|
+
property :musicGroupMember
|
372
|
+
property :naics
|
373
|
+
property :name
|
374
|
+
property :nationality
|
375
|
+
property :naturalProgression
|
376
|
+
property :nerve
|
377
|
+
property :nerveMotor
|
378
|
+
property :nonEqual
|
379
|
+
property :nonProprietaryName
|
380
|
+
property :normalRange
|
381
|
+
property :numberOfEpisodes
|
382
|
+
property :numberOfPages
|
383
|
+
property :numTracks
|
384
|
+
property :nutrition
|
385
|
+
property :object
|
386
|
+
property :occupationalCategory
|
387
|
+
property :offerCount
|
388
|
+
property :offers
|
389
|
+
property :openingHours
|
390
|
+
property :openingHoursSpecification
|
391
|
+
property :opens
|
392
|
+
property :operatingSystem
|
393
|
+
property :oponent
|
394
|
+
property :option
|
395
|
+
property :origin
|
396
|
+
property :originatesFrom
|
397
|
+
property :outcome
|
398
|
+
property :overdosage
|
399
|
+
property :overview
|
400
|
+
property :ownedFrom
|
401
|
+
property :ownedThrough
|
402
|
+
property :owns
|
403
|
+
property :parent
|
404
|
+
property :parents
|
405
|
+
property :participant
|
406
|
+
property :partOfSeason
|
407
|
+
property :partOfSystem
|
408
|
+
property :partOfTVSeries
|
409
|
+
property :pathophysiology
|
410
|
+
property :paymentAccepted
|
411
|
+
property :performer
|
412
|
+
property :performerIn
|
413
|
+
property :performers
|
414
|
+
property :permissions
|
415
|
+
property :phase
|
416
|
+
property :photo
|
417
|
+
property :photos
|
418
|
+
property :physiologicalBenefits
|
419
|
+
property :playerType
|
420
|
+
property :polygon
|
421
|
+
property :population
|
422
|
+
property :possibleComplication
|
423
|
+
property :possibleTreatment
|
424
|
+
property :postalCode
|
425
|
+
property :postOfficeBoxNumber
|
426
|
+
property :postOp
|
427
|
+
property :predecessorOf
|
428
|
+
property :pregnancyCategory
|
429
|
+
property :pregnancyWarning
|
430
|
+
property :preOp
|
431
|
+
property :preparation
|
432
|
+
property :prepTime
|
433
|
+
property :prescribingInfo
|
434
|
+
property :prescriptionStatus
|
435
|
+
property :price
|
436
|
+
property :priceCurrency
|
437
|
+
property :priceRange
|
438
|
+
property :priceSpecification
|
439
|
+
property :priceType
|
440
|
+
property :priceValidUntil
|
441
|
+
property :primaryImageOfPage
|
442
|
+
property :primaryPrevention
|
443
|
+
property :printColumn
|
444
|
+
property :printEdition
|
445
|
+
property :printPage
|
446
|
+
property :printSection
|
447
|
+
property :procedure
|
448
|
+
property :procedureType
|
449
|
+
property :processorRequirements
|
450
|
+
property :producer
|
451
|
+
property :productID
|
452
|
+
property :productionCompany
|
453
|
+
property :proficiencyLevel
|
454
|
+
property :programmingLanguage
|
455
|
+
property :programmingModel
|
456
|
+
property :proprietaryName
|
457
|
+
property :proteinContent
|
458
|
+
property :provider
|
459
|
+
property :publicationType
|
460
|
+
property :publisher
|
461
|
+
property :publishingPrinciples
|
462
|
+
property :purpose
|
463
|
+
property :qualifications
|
464
|
+
property :query
|
465
|
+
property :question
|
466
|
+
property :rangeIncludes
|
467
|
+
property :ratingCount
|
468
|
+
property :ratingValue
|
469
|
+
property :realEstateAgent
|
470
|
+
property :recipe
|
471
|
+
property :recipeCategory
|
472
|
+
property :recipeCuisine
|
473
|
+
property :recipeInstructions
|
474
|
+
property :recipeYield
|
475
|
+
property :recipient
|
476
|
+
property :recognizingAuthority
|
477
|
+
property :recommendationStrength
|
478
|
+
property :recommendedIntake
|
479
|
+
property :regionDrained
|
480
|
+
property :regionsAllowed
|
481
|
+
property :relatedAnatomy
|
482
|
+
property :relatedCondition
|
483
|
+
property :relatedDrug
|
484
|
+
property :relatedLink
|
485
|
+
property :relatedStructure
|
486
|
+
property :relatedTherapy
|
487
|
+
property :relatedTo
|
488
|
+
property :releaseDate
|
489
|
+
property :releaseNotes
|
490
|
+
property :relevantSpecialty
|
491
|
+
property :repetitions
|
492
|
+
property :replacee
|
493
|
+
property :replacer
|
494
|
+
property :replyToUrl
|
495
|
+
property :representativeOfPage
|
496
|
+
property :requirements
|
497
|
+
property :requiresSubscription
|
498
|
+
property :responsibilities
|
499
|
+
property :restPeriods
|
500
|
+
property :result
|
501
|
+
property :resultReview
|
502
|
+
property :review
|
503
|
+
property :reviewBody
|
504
|
+
property :reviewCount
|
505
|
+
property :reviewedBy
|
506
|
+
property :reviewRating
|
507
|
+
property :reviews
|
508
|
+
property :riskFactor
|
509
|
+
property :risks
|
510
|
+
property :runsTo
|
511
|
+
property :runtime
|
512
|
+
property :safetyConsideration
|
513
|
+
property :salaryCurrency
|
514
|
+
property :sameAs
|
515
|
+
property :sampleType
|
516
|
+
property :saturatedFatContent
|
517
|
+
property :scheduledTime
|
518
|
+
property :screenshot
|
519
|
+
property :season
|
520
|
+
property :seasonNumber
|
521
|
+
property :seasons
|
522
|
+
property :secondaryPrevention
|
523
|
+
property :seeks
|
524
|
+
property :seller
|
525
|
+
property :sender
|
526
|
+
property :sensoryUnit
|
527
|
+
property :serialNumber
|
528
|
+
property :seriousAdverseOutcome
|
529
|
+
property :servesCuisine
|
530
|
+
property :servingSize
|
531
|
+
property :sibling
|
532
|
+
property :siblings
|
533
|
+
property :signDetected
|
534
|
+
property :significance
|
535
|
+
property :significantLink
|
536
|
+
property :significantLinks
|
537
|
+
property :signOrSymptom
|
538
|
+
property :skills
|
539
|
+
property :sku
|
540
|
+
property :sodiumContent
|
541
|
+
property :softwareVersion
|
542
|
+
property :source
|
543
|
+
property :sourcedFrom
|
544
|
+
property :sourceOrganization
|
545
|
+
property :spatial
|
546
|
+
property :specialCommitments
|
547
|
+
property :specialty
|
548
|
+
property :sponsor
|
549
|
+
property :sportsActivityLocation
|
550
|
+
property :sportsEvent
|
551
|
+
property :sportsTeam
|
552
|
+
property :spouse
|
553
|
+
property :stage
|
554
|
+
property :stageAsNumber
|
555
|
+
property :startDate
|
556
|
+
property :startTime
|
557
|
+
property :status
|
558
|
+
property :storageRequirements
|
559
|
+
property :streetAddress
|
560
|
+
property :strengthUnit
|
561
|
+
property :strengthValue
|
562
|
+
property :structuralClass
|
563
|
+
property :study
|
564
|
+
property :studyDesign
|
565
|
+
property :studyLocation
|
566
|
+
property :studySubject
|
567
|
+
property :subEvent
|
568
|
+
property :subEvents
|
569
|
+
property :subStageSuffix
|
570
|
+
property :subStructure
|
571
|
+
property :subTest
|
572
|
+
property :subtype
|
573
|
+
property :successorOf
|
574
|
+
property :sugarContent
|
575
|
+
property :suggestedGender
|
576
|
+
property :suggestedMaxAge
|
577
|
+
property :suggestedMinAge
|
578
|
+
property :superEvent
|
579
|
+
property :supplyTo
|
580
|
+
property :targetDescription
|
581
|
+
property :targetName
|
582
|
+
property :targetPlatform
|
583
|
+
property :targetPopulation
|
584
|
+
property :targetProduct
|
585
|
+
property :targetUrl
|
586
|
+
property :taxID
|
587
|
+
property :telephone
|
588
|
+
property :temporal
|
589
|
+
property :text
|
590
|
+
property :thumbnail
|
591
|
+
property :thumbnailUrl
|
592
|
+
property :tickerSymbol
|
593
|
+
property :timeRequired
|
594
|
+
property :tissueSample
|
595
|
+
property :title
|
596
|
+
property :toLocation
|
597
|
+
property :totalTime
|
598
|
+
property :track
|
599
|
+
property :tracks
|
600
|
+
property :trailer
|
601
|
+
property :transcript
|
602
|
+
property :transFatContent
|
603
|
+
property :transmissionMethod
|
604
|
+
property :trialDesign
|
605
|
+
property :tributary
|
606
|
+
property :typeOfGood
|
607
|
+
property :typicalAgeRange
|
608
|
+
property :typicalTest
|
609
|
+
property :unitCode
|
610
|
+
property :unsaturatedFatContent
|
611
|
+
property :uploadDate
|
612
|
+
property :url
|
613
|
+
property :usedToDiagnose
|
614
|
+
property :usesDevice
|
615
|
+
property :validFrom
|
616
|
+
property :validThrough
|
617
|
+
property :value
|
618
|
+
property :valueAddedTaxIncluded
|
619
|
+
property :valueReference
|
620
|
+
property :vatID
|
621
|
+
property :vendor
|
622
|
+
property :version
|
623
|
+
property :video
|
624
|
+
property :videoFrameSize
|
625
|
+
property :videoQuality
|
626
|
+
property :warning
|
627
|
+
property :warranty
|
628
|
+
property :warrantyPromise
|
629
|
+
property :warrantyScope
|
630
|
+
property :weight
|
631
|
+
property :width
|
632
|
+
property :winner
|
633
|
+
property :wordCount
|
634
|
+
property :workHours
|
635
|
+
property :workload
|
636
|
+
property :workLocation
|
637
|
+
property :worksFor
|
638
|
+
property :worstRating
|
639
|
+
|
640
|
+
private
|
641
|
+
def self.generate
|
642
|
+
require 'addressable/uri'
|
643
|
+
require 'rdf/rdfa'
|
644
|
+
v = Graph.load("http://schema.org/docs/schema_org_rdfa.html", :format => :rdfa)
|
645
|
+
|
646
|
+
# properties
|
647
|
+
v.query(:property => RDF.type, :object => RDF.Property) do |c|
|
648
|
+
puts " property #{c.subject.to_s.split('/').last.to_sym.inspect}"
|
649
|
+
end
|
650
|
+
end
|
651
|
+
end
|
652
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arto Bendiken
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-10-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|
@@ -18,28 +18,28 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '2.
|
21
|
+
version: '2.3'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - ! '>='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: '2.
|
28
|
+
version: '2.3'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: rdf-spec
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - ~>
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 1.0.
|
35
|
+
version: 1.0.9
|
36
36
|
type: :development
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - ~>
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 1.0.
|
42
|
+
version: 1.0.9
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: rdf-rdfxml
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,6 +164,7 @@ files:
|
|
164
164
|
- lib/rdf/vocab/rdfs.rb
|
165
165
|
- lib/rdf/vocab/rsa.rb
|
166
166
|
- lib/rdf/vocab/rss.rb
|
167
|
+
- lib/rdf/vocab/schema.rb
|
167
168
|
- lib/rdf/vocab/sioc.rb
|
168
169
|
- lib/rdf/vocab/skos.rb
|
169
170
|
- lib/rdf/vocab/wot.rb
|
@@ -184,7 +185,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
184
185
|
requirements:
|
185
186
|
- - ! '>='
|
186
187
|
- !ruby/object:Gem::Version
|
187
|
-
version: 1.8.
|
188
|
+
version: 1.8.7
|
188
189
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
189
190
|
requirements:
|
190
191
|
- - ! '>='
|