rdf 1.1.14 → 1.1.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e8fae3119c03f76ca92e7759d025bb1c17ed55db
4
- data.tar.gz: fe07f4c9ee59e359c2f4826555a39a52897e0733
3
+ metadata.gz: de76661c91cfe6934a56ffc4843225db1982f01e
4
+ data.tar.gz: 15dbc5ff81961081d5e9c91b95ac222e37bc4ada
5
5
  SHA512:
6
- metadata.gz: bbac6da5b9ab5e564e5ca23f47d1d50bd4933a9d8590bf4ff59a8b5d6652630fa02f7741c309624f4e03e531667bdaaf258420efc85c63ed3230ab4bdbe8f337
7
- data.tar.gz: 50b338b350ff2b1cc8039a86891b1ec3f3c4b62d17fb7ea7cbd17ef3e223f6e0de27a9f98509e7f6d1e5b52d61c1fb77db4a2000d1dbecea6243597e3a409d70
6
+ metadata.gz: bbc0759e1e4031c5bd43344a19eba2b65d13850ec5af6a0dba61f54578d2f50abe97bcc0bbccf98f0df9b07426b07abd4339457b1985bbbbce2a08da871258f2
7
+ data.tar.gz: 0fc669f56a1aa53d6fae0df894014b862525a4e5620dd61c06e59224959ddedcbb3c293f156f6ba4d014f7127646d64493e9b24203c010136b412f2be8a465f8
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.14
1
+ 1.1.15
@@ -27,7 +27,7 @@ module RDF
27
27
  # require 'rdf/trig' # for TriG support
28
28
  #
29
29
  # repository = graph = RDF::Repository.load("https://raw.githubusercontent.com/ruby-rdf/rdf-trig/develop/etc/doap.trig", format: :trig))
30
- # graph = RDF::Graph.new(data: repository, context: RDF::URI("http://greggkellogg.net/foaf#me"))
30
+ # graph = RDF::Graph.new(RDF::URI("http://greggkellogg.net/foaf#me"), data: repository)
31
31
  class Graph
32
32
  include RDF::Value
33
33
  include RDF::Countable
@@ -72,10 +72,10 @@ module RDF
72
72
  # An empty list with explicit subject and value initializers
73
73
  @subject = RDF.nil
74
74
  first, *values = Array(values)
75
- if first
75
+ if first || values.length > 0
76
76
  # Intantiate the list from values, and insert the first value using subject.
77
77
  values.reverse_each {|value| self.unshift(value)}
78
- graph.insert RDF::Statement(subject, RDF.first, first)
78
+ graph.insert RDF::Statement(subject, RDF.first, first || RDF.nil)
79
79
  graph.insert RDF::Statement(subject, RDF.rest, @subject)
80
80
  end
81
81
  @subject = subject
@@ -234,16 +234,89 @@ module RDF
234
234
  end
235
235
 
236
236
  ##
237
- # Returns the element at `index`.
238
- #
239
- # @example
240
- # RDF::List[1, 2, 3][0] #=> RDF::Literal(1)
241
- #
242
- # @param [Integer] index
243
- # @return [RDF::Term]
244
- # @see http://ruby-doc.org/core-1.9/classes/Array.html#M000417
245
- def [](index)
246
- at(index)
237
+ # Element Assignment — Sets the element at `index`, or replaces a subarray from the `start` index for `length` elements, or replaces a subarray specified by the `range` of indices.
238
+ #
239
+ # If indices are greater than the current capacity of the array, the array grows automatically. Elements are inserted into the array at `start` if length is zero.
240
+ #
241
+ # Negative indices will count backward from the end of the array. For `start` and `range` cases the starting index is just before an element.
242
+ #
243
+ # An `IndexError` is raised if a negative index points past the beginning of the array.
244
+ #
245
+ # (see #unshift).
246
+ #
247
+ # @example
248
+ # a = RDF::List.new
249
+ # a[4] = "4"; #=> [rdf:nil, rdf:nil, rdf:nil, rdf:nil, "4"]
250
+ # a[0, 3] = [ 'a', 'b', 'c' ] #=> ["a", "b", "c", rdf:nil, "4"]
251
+ # a[1..2] = [ 1, 2 ] #=> ["a", 1, 2, rdf:nil, "4"]
252
+ # a[0, 2] = "?" #=> ["?", 2, rdf:nil, "4"]
253
+ # a[0..2] = "A" #=> ["A", "4"]
254
+ # a[-1] = "Z" #=> ["A", "Z"]
255
+ # a[1..-1] = nil #=> ["A", rdf:nil]
256
+ # a[1..-1] = [] #=> ["A"]
257
+ # a[0, 0] = [ 1, 2 ] #=> [1, 2, "A"]
258
+ # a[3, 0] = "B" #=> [1, 2, "A", "B"]
259
+ #
260
+ # @overload []=(index, term)
261
+ # Replaces the element at `index` with `term`.
262
+ # @param [Integer] index
263
+ # @param [RDF::Term] term
264
+ # A non-RDF::Term is coerced to a Literal.
265
+ # @return [RDF::Term]
266
+ # @raise [IndexError]
267
+ #
268
+ # @overload []=(start, length, value)
269
+ # Replaces a subarray from the `start` index for `length` elements with `value`. Value is a {RDF::Term}, Array of {RDF::Term}, or {RDF::List}.
270
+ # @param [Integer] start
271
+ # @param [Integer] length
272
+ # @param [RDF::Term, Array<RDF::Term>, RDF::List] value
273
+ # A non-RDF::Term is coerced to a Literal.
274
+ # @return [RDF::Term, RDF::List]
275
+ # @raise [IndexError]
276
+ #
277
+ # @overload []=(range, value)
278
+ # Replaces a subarray from the `start` index for `length` elements with `value`. Value is a {RDF::Term}, Array of {RDF::Term}, or {RDF::List}.
279
+ # @param [Range] range
280
+ # @param [RDF::Term, Array<RDF::Term>, RDF::List] value
281
+ # A non-RDF::Term is coerced to a Literal.
282
+ # @return [RDF::Term, RDF::List]
283
+ # @raise [IndexError]
284
+ # @since 1.1.15
285
+ def []=(*args)
286
+ start, length = 0, 0
287
+
288
+ ary = self.to_a
289
+
290
+ value = case args.last
291
+ when Array then args.last
292
+ when RDF::List then args.last.to_a
293
+ else [args.last]
294
+ end
295
+
296
+ ret = case args.length
297
+ when 3
298
+ start, length = args[0], args[1]
299
+ ary[start, length] = value
300
+ when 2
301
+ case args.first
302
+ when Integer
303
+ raise ArgumentError, "Index form of []= takes a single term" if args.last.is_a?(Array)
304
+ ary[args.first] = args.last.is_a?(RDF::List) ? args.last.subject : args.last
305
+ when Range
306
+ ary[args.first] = value
307
+ else
308
+ raise ArgumentError, "Index form of must use an integer or range"
309
+ end
310
+ else
311
+ raise ArgumentError, "List []= takes one or two index values"
312
+ end
313
+
314
+ # Clear the list and create a new list using the existing subject
315
+ subject = @subject unless ary.empty? || @subject == RDF.nil
316
+ self.clear
317
+ new_list = RDF::List.new(subject, @graph, ary)
318
+ @subject = new_list.subject
319
+ ret # Returns inserted values
247
320
  end
248
321
 
249
322
  ##
@@ -252,7 +325,7 @@ module RDF
252
325
  # @example
253
326
  # RDF::List[].unshift(1).unshift(2).unshift(3) #=> RDF::List[3, 2, 1]
254
327
  #
255
- # @param [RDF::Term, Array<RDF::Term>] value
328
+ # @param [RDF::Term, Array<RDF::Term>, RDF::List] value
256
329
  # A non-RDF::Term is coerced to a Literal
257
330
  # @return [RDF::List]
258
331
  # @see http://www.ruby-doc.org/core-1.9.3/Array.html#method-i-unshift
@@ -342,6 +415,20 @@ module RDF
342
415
  self
343
416
  end
344
417
 
418
+ ##
419
+ # Compares this list to `other` using eql? on each component.
420
+ #
421
+ # @example
422
+ # RDF::List[1, 2, 3].eql? RDF::List[1, 2, 3] #=> true
423
+ # RDF::List[1, 2, 3].eql? [1, 2, 3] #=> true
424
+ #
425
+ # @param [RDF::List] other
426
+ # @return [Integer]
427
+ # @see http://ruby-doc.org/core-2.2.2/Array.html#method-i-3C-3D-3E
428
+ def eql?(other)
429
+ to_a.eql? other.to_a # TODO: optimize this
430
+ end
431
+
345
432
  ##
346
433
  # Compares this list to `other` for sorting purposes.
347
434
  #
@@ -421,6 +508,7 @@ module RDF
421
508
  else raise ArgumentError, "wrong number of arguments (#{argc} for 2)"
422
509
  end
423
510
  end
511
+ alias :[] :slice
424
512
 
425
513
  ##
426
514
  # @private
@@ -103,7 +103,6 @@ module RDF
103
103
  @subject = case @subject
104
104
  when nil then nil
105
105
  when Symbol then Node.intern(@subject)
106
- when Term then @subject
107
106
  when Value then @subject.to_term
108
107
  else raise ArgumentError, "expected subject to be nil or a term, was #{@subject.inspect}"
109
108
  end
@@ -111,7 +110,6 @@ module RDF
111
110
  @object = case @object
112
111
  when nil then nil
113
112
  when Symbol then Node.intern(@object)
114
- when Term then @object
115
113
  when Value then @object.to_term
116
114
  else Literal.new(@object)
117
115
  end
@@ -68,7 +68,8 @@ module RDF; module Util
68
68
  # @option options [Boolean] :verify_none (false)
69
69
  # Don't verify SSL certificates
70
70
  # @return [RemoteDocument, Object] A {RemoteDocument}. If a block is given, the result of evaluating the block is returned.
71
- def self.open_url base_uri, options
71
+ # @raise [IOError] if not found
72
+ def self.open_url(base_uri, options)
72
73
  raise NoMethodError.new("#{self.inspect} does not implement required method `open_url` for ", "open_url")
73
74
  end
74
75
  end
@@ -84,7 +85,8 @@ module RDF; module Util
84
85
  # @param [String] base_uri to open
85
86
  # @param [Hash{Symbol => Object}] options
86
87
  # @return [RemoteDocument, Object] A {RemoteDocument}. If a block is given, the result of evaluating the block is returned.
87
- def self.open_url base_uri, options
88
+ # @raise [IOError] if not found
89
+ def self.open_url(base_uri, options)
88
90
  ssl_verify = options[:verify_none] ? OpenSSL::SSL::VERIFY_NONE : OpenSSL::SSL::VERIFY_PEER
89
91
 
90
92
  # If RestClient is loaded, prefer it
@@ -106,7 +108,8 @@ module RDF; module Util
106
108
  remote_document = RemoteDocument.new(response.body, document_options)
107
109
  when 300..399
108
110
  # Document base is redirected location
109
- base_uri = response.headers[:location].to_s
111
+ # Location may be relative
112
+ base_uri = ::URI.join(base_uri, response.headers[:location].to_s).to_s
110
113
  response.follow_redirection(request, res, &blk)
111
114
  else
112
115
  raise IOError, "<#{base_uri}>: #{response.code}"
@@ -123,7 +126,8 @@ module RDF; module Util
123
126
  # @param [String] base_uri to open
124
127
  # @param [Hash{Symbol => Object}] options
125
128
  # @return [RemoteDocument, Object] A {RemoteDocument}. If a block is given, the result of evaluating the block is returned.
126
- def self.open_url base_uri, options
129
+ # @raise [IOError] if not found
130
+ def self.open_url(base_uri, options)
127
131
  ssl_verify = options[:verify_none] ? OpenSSL::SSL::VERIFY_NONE : OpenSSL::SSL::VERIFY_PEER
128
132
 
129
133
  redirect_count = 0
@@ -167,7 +171,8 @@ module RDF; module Util
167
171
  # Follow redirection
168
172
  raise IOError, "Too many redirects" if (redirect_count += 1) > max_redirects
169
173
 
170
- parsed_url = ::URI.parse(response["Location"])
174
+ # Location may be relative
175
+ parsed_url = ::URI.join(base_uri, response["Location"])
171
176
 
172
177
  base_uri = parsed_url.to_s
173
178
  else
@@ -206,7 +211,7 @@ module RDF; module Util
206
211
  # @param [String] base_uri to open
207
212
  # @param [Hash{Symbol => Object}] options
208
213
  # @return [RemoteDocument, Object] A {RemoteDocument}.
209
- def self.open_url base_uri, options
214
+ def self.open_url(base_uri, options)
210
215
  response = conn.get do |req|
211
216
  req.url base_uri
212
217
  headers(options).each do |k,v|
@@ -233,7 +238,7 @@ module RDF; module Util
233
238
  end
234
239
  end
235
240
 
236
- class <<self
241
+ class << self
237
242
  ##
238
243
  # Set the HTTP adapter
239
244
  # @see .http_adapter
@@ -252,7 +257,7 @@ module RDF; module Util
252
257
  # adapters have been configured
253
258
  # @return [HttpAdapter]
254
259
  # @since 1.2
255
- def http_adapter use_net_http = false
260
+ def http_adapter(use_net_http = false)
256
261
  if use_net_http
257
262
  NetHttpAdapter
258
263
  else
@@ -305,6 +310,7 @@ module RDF; module Util
305
310
  # @return [RemoteDocument, Object] A {RemoteDocument}. If a block is given, the result of evaluating the block is returned.
306
311
  # @yield [ RemoteDocument] A {RemoteDocument} for local files
307
312
  # @yieldreturn [Object] returned from open_file
313
+ # @raise [IOError] if not found
308
314
  def self.open_file(filename_or_url, options = {}, &block)
309
315
  filename_or_url = $1 if filename_or_url.to_s.match(/^file:(.*)$/)
310
316
  remote_document = nil
@@ -318,17 +324,21 @@ module RDF; module Util
318
324
  format = RDF::Format.for(filename_or_url.to_s)
319
325
  content_type = format ? format.content_type.first : 'text/plain'
320
326
  # Open as a file, passing any options
321
- Kernel.open(filename_or_url, "r:utf-8", options) do |file|
322
- document_options = {
323
- base_uri: filename_or_url.to_s,
324
- charset: file.external_encoding,
325
- code: 200,
326
- content_type: content_type,
327
- last_modified:file.mtime,
328
- headers: {'Content-Type' => content_type, 'Last-Modified' => file.mtime.xmlschema}
329
- }
327
+ begin
328
+ Kernel.open(filename_or_url, "r:utf-8", options) do |file|
329
+ document_options = {
330
+ base_uri: filename_or_url.to_s,
331
+ charset: file.external_encoding,
332
+ code: 200,
333
+ content_type: content_type,
334
+ last_modified:file.mtime,
335
+ headers: {'Content-Type' => content_type, 'Last-Modified' => file.mtime.xmlschema}
336
+ }
330
337
 
331
- remote_document = RemoteDocument.new(file.read, document_options)
338
+ remote_document = RemoteDocument.new(file.read, document_options)
339
+ end
340
+ rescue Errno::ENOENT => e
341
+ raise IOError, e.message
332
342
  end
333
343
  end
334
344
 
@@ -306,7 +306,7 @@ module RDF
306
306
  term :BlogPosting,
307
307
  comment: %(A blog post.).freeze,
308
308
  label: "BlogPosting".freeze,
309
- subClassOf: "schema:Article".freeze,
309
+ subClassOf: "schema:SocialMediaPosting".freeze,
310
310
  type: "rdfs:Class".freeze
311
311
  term :BloodTest,
312
312
  comment: %(A medical test performed on a sample of a patient's blood.).freeze,
@@ -400,6 +400,11 @@ module RDF
400
400
  label: "Brewery".freeze,
401
401
  subClassOf: "schema:FoodEstablishment".freeze,
402
402
  type: "rdfs:Class".freeze
403
+ term :Bridge,
404
+ comment: %(A bridge.).freeze,
405
+ label: "Bridge".freeze,
406
+ subClassOf: "schema:CivicStructure".freeze,
407
+ type: "rdfs:Class".freeze
403
408
  term :BroadcastChannel,
404
409
  comment: %(A unique instance of a BroadcastService on a CableOrSatelliteService lineup.).freeze,
405
410
  label: "BroadcastChannel".freeze,
@@ -413,7 +418,7 @@ module RDF
413
418
  term :BroadcastService,
414
419
  comment: %(A delivery service through which content is provided via broadcast over the air or online.).freeze,
415
420
  label: "BroadcastService".freeze,
416
- subClassOf: "schema:Thing".freeze,
421
+ subClassOf: "schema:Service".freeze,
417
422
  type: "rdfs:Class".freeze
418
423
  term :BuddhistTemple,
419
424
  comment: %(A Buddhist temple.).freeze,
@@ -830,7 +835,7 @@ module RDF
830
835
  term :DateTime,
831
836
  comment: %(A combination of date and time of day in the form [-]CCYY-MM-DDThh:mm:ss[Z|\(+|-\)hh:mm] \(see Chapter 5.4 of ISO 8601\).).freeze,
832
837
  label: "DateTime".freeze,
833
- type: "rdfs:Class".freeze
838
+ type: ["rdfs:Class".freeze, "schema:DataType".freeze]
834
839
  term :DatedMoneySpecification,
835
840
  comment: %(A DatedMoneySpecification represents monetary values with optional start and end dates. For example, this could represent an employee's salary over a specific period of time.).freeze,
836
841
  label: "DatedMoneySpecification".freeze,
@@ -957,6 +962,11 @@ module RDF
957
962
  label: "DiscoverAction".freeze,
958
963
  subClassOf: "schema:FindAction".freeze,
959
964
  type: "rdfs:Class".freeze
965
+ term :DiscussionForumPosting,
966
+ comment: %(A posting to a discussion forum.).freeze,
967
+ label: "DiscussionForumPosting".freeze,
968
+ subClassOf: "schema:SocialMediaPosting".freeze,
969
+ type: "rdfs:Class".freeze
960
970
  term :DislikeAction,
961
971
  comment: %(The act of expressing a negative sentiment about the object. An agent dislikes an object \(a proposition, topic or theme\) with participants.).freeze,
962
972
  label: "DislikeAction".freeze,
@@ -1507,6 +1517,11 @@ module RDF
1507
1517
  label: "InteractAction".freeze,
1508
1518
  subClassOf: "schema:Action".freeze,
1509
1519
  type: "rdfs:Class".freeze
1520
+ term :InteractionCounter,
1521
+ comment: %(A summary of how users have interacted with this CreativeWork. In most cases, authors will use a subtype to specify the specific type of interaction.).freeze,
1522
+ label: "InteractionCounter".freeze,
1523
+ subClassOf: "schema:StructuredValue".freeze,
1524
+ type: "rdfs:Class".freeze
1510
1525
  term :InternetCafe,
1511
1526
  comment: %(An internet cafe.).freeze,
1512
1527
  label: "InternetCafe".freeze,
@@ -1640,6 +1655,11 @@ module RDF
1640
1655
  label: "LiteraryEvent".freeze,
1641
1656
  subClassOf: "schema:Event".freeze,
1642
1657
  type: "rdfs:Class".freeze
1658
+ term :LiveBlogPosting,
1659
+ comment: %(A blog post intended to provide a rolling textual coverage of an ongoing event through continuous updates.).freeze,
1660
+ label: "LiveBlog".freeze,
1661
+ subClassOf: "schema:BlogPosting".freeze,
1662
+ type: "rdfs:Class".freeze
1643
1663
  term :LocalBusiness,
1644
1664
  comment: %(A particular physical business or branch of an organization. Examples of LocalBusiness include a restaurant, a particular branch of a restaurant chain, a branch of a bank, a medical practice, a club, a bowling alley, etc.).freeze,
1645
1665
  label: "LocalBusiness".freeze,
@@ -2329,6 +2349,11 @@ module RDF
2329
2349
  label: "PaymentMethod".freeze,
2330
2350
  subClassOf: "schema:Enumeration".freeze,
2331
2351
  type: "rdfs:Class".freeze
2352
+ term :PaymentStatusType,
2353
+ comment: %(A specific payment status. For example, PaymentDue, PaymentComplete, etc.).freeze,
2354
+ label: "PaymentStatusType".freeze,
2355
+ subClassOf: "schema:Enumeration".freeze,
2356
+ type: "rdfs:Class".freeze
2332
2357
  term :PeopleAudience,
2333
2358
  comment: %(A set of characteristics belonging to people, e.g. who compose an item's target audience.).freeze,
2334
2359
  label: "PeopleAudience".freeze,
@@ -2728,6 +2753,11 @@ module RDF
2728
2753
  label: "ReplyAction".freeze,
2729
2754
  subClassOf: "schema:CommunicateAction".freeze,
2730
2755
  type: "rdfs:Class".freeze
2756
+ term :Report,
2757
+ comment: %(A Report generated by governmental or non-governmental organization.).freeze,
2758
+ label: "Report".freeze,
2759
+ subClassOf: "schema:Article".freeze,
2760
+ type: "rdfs:Class".freeze
2731
2761
  term :ReportedDoseSchedule,
2732
2762
  comment: %(A patient-reported or observed dosing schedule for a drug or supplement.).freeze,
2733
2763
  label: "ReportedDoseSchedule".freeze,
@@ -2938,6 +2968,11 @@ module RDF
2938
2968
  label: "SocialEvent".freeze,
2939
2969
  subClassOf: "schema:Event".freeze,
2940
2970
  type: "rdfs:Class".freeze
2971
+ term :SocialMediaPosting,
2972
+ comment: %(A post to a social media platform, including blog posts, tweets, Facebook posts, etc.).freeze,
2973
+ label: "SocialMediaPosting".freeze,
2974
+ subClassOf: "schema:Article".freeze,
2975
+ type: "rdfs:Class".freeze
2941
2976
  term :SoftwareApplication,
2942
2977
  comment: %(A software application.).freeze,
2943
2978
  label: "SoftwareApplication".freeze,
@@ -3263,6 +3298,7 @@ module RDF
3263
3298
  <a href="/Action">Action</a>-based vocabulary, alongside types such as <a href="/Comment">Comment</a>.
3264
3299
  ).freeze,
3265
3300
  label: "UserBlocks".freeze,
3301
+ "schema:supersededBy" => %(schema:InteractionCounter).freeze,
3266
3302
  subClassOf: "schema:UserInteraction".freeze,
3267
3303
  type: "rdfs:Class".freeze
3268
3304
  term :UserCheckins,
@@ -3270,6 +3306,7 @@ module RDF
3270
3306
  <a href="/Action">Action</a>-based vocabulary, alongside types such as <a href="/Comment">Comment</a>.
3271
3307
  ).freeze,
3272
3308
  label: "UserCheckins".freeze,
3309
+ "schema:supersededBy" => %(schema:InteractionCounter).freeze,
3273
3310
  subClassOf: "schema:UserInteraction".freeze,
3274
3311
  type: "rdfs:Class".freeze
3275
3312
  term :UserComments,
@@ -3278,6 +3315,7 @@ module RDF
3278
3315
  ).freeze,
3279
3316
  "dc:source" => %(http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_rNews).freeze,
3280
3317
  label: "UserComments".freeze,
3318
+ "schema:supersededBy" => %(schema:InteractionCounter).freeze,
3281
3319
  subClassOf: "schema:UserInteraction".freeze,
3282
3320
  type: "rdfs:Class".freeze
3283
3321
  term :UserDownloads,
@@ -3285,6 +3323,7 @@ module RDF
3285
3323
  <a href="/Action">Action</a>-based vocabulary, alongside types such as <a href="/Comment">Comment</a>.
3286
3324
  ).freeze,
3287
3325
  label: "UserDownloads".freeze,
3326
+ "schema:supersededBy" => %(schema:InteractionCounter).freeze,
3288
3327
  subClassOf: "schema:UserInteraction".freeze,
3289
3328
  type: "rdfs:Class".freeze
3290
3329
  term :UserInteraction,
@@ -3292,6 +3331,7 @@ module RDF
3292
3331
  <a href="/Action">Action</a>-based vocabulary, alongside types such as <a href="/Comment">Comment</a>.
3293
3332
  ).freeze,
3294
3333
  label: "UserInteraction".freeze,
3334
+ "schema:supersededBy" => %(schema:InteractionCounter).freeze,
3295
3335
  subClassOf: "schema:Event".freeze,
3296
3336
  type: "rdfs:Class".freeze
3297
3337
  term :UserLikes,
@@ -3299,6 +3339,7 @@ module RDF
3299
3339
  <a href="/Action">Action</a>-based vocabulary, alongside types such as <a href="/Comment">Comment</a>.
3300
3340
  ).freeze,
3301
3341
  label: "UserLikes".freeze,
3342
+ "schema:supersededBy" => %(schema:InteractionCounter).freeze,
3302
3343
  subClassOf: "schema:UserInteraction".freeze,
3303
3344
  type: "rdfs:Class".freeze
3304
3345
  term :UserPageVisits,
@@ -3306,6 +3347,7 @@ module RDF
3306
3347
  <a href="/Action">Action</a>-based vocabulary, alongside types such as <a href="/Comment">Comment</a>.
3307
3348
  ).freeze,
3308
3349
  label: "UserPageVisits".freeze,
3350
+ "schema:supersededBy" => %(schema:InteractionCounter).freeze,
3309
3351
  subClassOf: "schema:UserInteraction".freeze,
3310
3352
  type: "rdfs:Class".freeze
3311
3353
  term :UserPlays,
@@ -3313,6 +3355,7 @@ module RDF
3313
3355
  <a href="/Action">Action</a>-based vocabulary, alongside types such as <a href="/Comment">Comment</a>.
3314
3356
  ).freeze,
3315
3357
  label: "UserPlays".freeze,
3358
+ "schema:supersededBy" => %(schema:InteractionCounter).freeze,
3316
3359
  subClassOf: "schema:UserInteraction".freeze,
3317
3360
  type: "rdfs:Class".freeze
3318
3361
  term :UserPlusOnes,
@@ -3320,6 +3363,7 @@ module RDF
3320
3363
  <a href="/Action">Action</a>-based vocabulary, alongside types such as <a href="/Comment">Comment</a>.
3321
3364
  ).freeze,
3322
3365
  label: "UserPlusOnes".freeze,
3366
+ "schema:supersededBy" => %(schema:InteractionCounter).freeze,
3323
3367
  subClassOf: "schema:UserInteraction".freeze,
3324
3368
  type: "rdfs:Class".freeze
3325
3369
  term :UserTweets,
@@ -3327,6 +3371,7 @@ module RDF
3327
3371
  <a href="/Action">Action</a>-based vocabulary, alongside types such as <a href="/Comment">Comment</a>.
3328
3372
  ).freeze,
3329
3373
  label: "UserTweets".freeze,
3374
+ "schema:supersededBy" => %(schema:InteractionCounter).freeze,
3330
3375
  subClassOf: "schema:UserInteraction".freeze,
3331
3376
  type: "rdfs:Class".freeze
3332
3377
  term :Vehicle,
@@ -3539,7 +3584,7 @@ module RDF
3539
3584
  rangeIncludes: "schema:PaymentMethod".freeze,
3540
3585
  type: "rdf:Property".freeze
3541
3586
  property :acceptsReservations,
3542
- comment: %(Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or \(for backwards compatibility\) the strings <code>Yes</code> or <code>No</code>.).freeze,
3587
+ comment: %(Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, a URL at which reservations can be made or \(for backwards compatibility\) the strings <code>Yes</code> or <code>No</code>.).freeze,
3543
3588
  domainIncludes: "schema:FoodEstablishment".freeze,
3544
3589
  label: "acceptsReservations".freeze,
3545
3590
  rangeIncludes: ["schema:Text".freeze, "schema:URL".freeze, "schema:Boolean".freeze],
@@ -3742,6 +3787,7 @@ Note: Publishers should be aware that applications designed to use specific sche
3742
3787
  domainIncludes: "schema:Person".freeze,
3743
3788
  label: "affiliation".freeze,
3744
3789
  rangeIncludes: "schema:Organization".freeze,
3790
+ subPropertyOf: "schema:memberOf".freeze,
3745
3791
  type: "rdf:Property".freeze
3746
3792
  property :agent,
3747
3793
  comment: %(The direct performer or driver of the action \(animate or inanimate\). e.g. *John* wrote a book.).freeze,
@@ -4642,7 +4688,7 @@ Note: You can use <a href="minValue">minValue</a> and <a href="maxValue">maxValu
4642
4688
  rangeIncludes: "schema:URL".freeze,
4643
4689
  type: "rdf:Property".freeze
4644
4690
  property :codeSampleType,
4645
- comment: %(Full \(compile ready\) solution, code snippet, inline code, scripts, template.).freeze,
4691
+ comment: %(What type of code sample: full \(compile ready\) solution, code snippet, inline code, scripts, template.).freeze,
4646
4692
  domainIncludes: "schema:SoftwareSourceCode".freeze,
4647
4693
  label: "codeSampleType".freeze,
4648
4694
  rangeIncludes: "schema:Text".freeze,
@@ -4895,6 +4941,18 @@ Note: You can use <a href="minValue">minValue</a> and <a href="maxValue">maxValu
4895
4941
  "schema:supersededBy" => %(schema:exerciseCourse).freeze,
4896
4942
  subPropertyOf: "schema:location".freeze,
4897
4943
  type: "rdf:Property".freeze
4944
+ property :coverageEndTime,
4945
+ comment: %(The time when the live blog will stop covering the Event. Note that coverage may continue after the Event concludes.).freeze,
4946
+ domainIncludes: "schema:LiveBlogPosting".freeze,
4947
+ label: "coverageEndTime".freeze,
4948
+ rangeIncludes: "schema:DateTime".freeze,
4949
+ type: "rdf:Property".freeze
4950
+ property :coverageStartTime,
4951
+ comment: %(The time when the live blog will begin covering the Event. Note that coverage may begin before the Event's start time. The LiveBlogPosting may also be created before coverage begins.).freeze,
4952
+ domainIncludes: "schema:LiveBlogPosting".freeze,
4953
+ label: "coverageStartTime".freeze,
4954
+ rangeIncludes: "schema:DateTime".freeze,
4955
+ type: "rdf:Property".freeze
4898
4956
  property :creator,
4899
4957
  comment: %(The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork.).freeze,
4900
4958
  domainIncludes: ["schema:CreativeWork".freeze, "schema:UserComments".freeze],
@@ -5697,7 +5755,7 @@ Note that Event uses startDate/endDate instead of startTime/endTime, even when d
5697
5755
  comment: %(Size of the application / package \(e.g. 18MB\). In the absence of a unit \(MB, KB etc.\), KB will be assumed.).freeze,
5698
5756
  domainIncludes: "schema:SoftwareApplication".freeze,
5699
5757
  label: "fileSize".freeze,
5700
- rangeIncludes: "schema:Integer".freeze,
5758
+ rangeIncludes: "schema:Text".freeze,
5701
5759
  type: "rdf:Property".freeze
5702
5760
  property :firstPerformance,
5703
5761
  comment: %(The date and place the work was first performed.).freeze,
@@ -5891,7 +5949,7 @@ Note 3: Often, the absolute value is useful only when related to driving speed \
5891
5949
  comment: %(Genre of the creative work or group.).freeze,
5892
5950
  domainIncludes: ["schema:CreativeWork".freeze, "schema:MusicGroup".freeze],
5893
5951
  label: "genre".freeze,
5894
- rangeIncludes: "schema:Text".freeze,
5952
+ rangeIncludes: ["schema:Text".freeze, "schema:URL".freeze],
5895
5953
  type: "rdf:Property".freeze
5896
5954
  property :geo,
5897
5955
  comment: %(The geo coordinates of the place.).freeze,
@@ -6262,6 +6320,25 @@ Note 3: Often, the absolute value is useful only when related to driving speed \
6262
6320
  property :interactionCount,
6263
6321
  comment: %(This property is deprecated, alongside the UserInteraction types on which it depended.).freeze,
6264
6322
  label: "interactionCount".freeze,
6323
+ "schema:supersededBy" => %(schema:interactionStatistic).freeze,
6324
+ type: "rdf:Property".freeze
6325
+ property :interactionService,
6326
+ comment: %(The WebSite or SoftwareApplication where the interactions took place.).freeze,
6327
+ domainIncludes: "schema:InteractionCounter".freeze,
6328
+ label: "interactionService".freeze,
6329
+ rangeIncludes: ["schema:SoftwareApplication".freeze, "schema:WebSite".freeze],
6330
+ type: "rdf:Property".freeze
6331
+ property :interactionStatistic,
6332
+ comment: %(The number of interactions for the CreativeWork using the WebSite or SoftwareApplication. The most specific child type of InteractionCounter should be used.).freeze,
6333
+ domainIncludes: "schema:CreativeWork".freeze,
6334
+ label: "interactionStatistic".freeze,
6335
+ rangeIncludes: "schema:InteractionCounter".freeze,
6336
+ type: "rdf:Property".freeze
6337
+ property :interactionType,
6338
+ comment: %(The Action representing the type of interaction. For up votes, +1s, etc. use <a href="/LikeAction";>LikeAction</a>. For down votes use <a href="/DislikeAction">DislikeAction</a>. Otherwise, use the most specific Action.).freeze,
6339
+ domainIncludes: "schema:InteractionCounter".freeze,
6340
+ label: "interactionType".freeze,
6341
+ rangeIncludes: "schema:Action".freeze,
6265
6342
  type: "rdf:Property".freeze
6266
6343
  property :interactivityType,
6267
6344
  comment: %(The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'.).freeze,
@@ -6281,7 +6358,7 @@ Note 3: Often, the absolute value is useful only when related to driving speed \
6281
6358
  label: "inverseOf".freeze,
6282
6359
  rangeIncludes: "schema:Property".freeze,
6283
6360
  type: "rdf:Property".freeze
6284
- property :isAcccessibleForFree,
6361
+ property :isAccessibleForFree,
6285
6362
  comment: %(A flag to signal that the publication is accessible for free.).freeze,
6286
6363
  domainIncludes: "schema:PublicationEvent".freeze,
6287
6364
  label: "isAccessibleForFree".freeze,
@@ -6581,6 +6658,12 @@ Note 3: Often, the absolute value is useful only when related to driving speed \
6581
6658
  label: "line".freeze,
6582
6659
  rangeIncludes: "schema:Text".freeze,
6583
6660
  type: "rdf:Property".freeze
6661
+ property :liveBlogUpdate,
6662
+ comment: %(An update to the LiveBlog.).freeze,
6663
+ domainIncludes: "schema:LiveBlogPosting".freeze,
6664
+ label: "liveBlogUpdate".freeze,
6665
+ rangeIncludes: "schema:BlogPosting".freeze,
6666
+ type: "rdf:Property".freeze
6584
6667
  property :location,
6585
6668
  comment: %(The location of the event, organization or action.).freeze,
6586
6669
  domainIncludes: ["schema:Organization".freeze, "schema:Event".freeze, "schema:Action".freeze],
@@ -6632,6 +6715,13 @@ Note 3: Often, the absolute value is useful only when related to driving speed \
6632
6715
  label: "lyricist".freeze,
6633
6716
  rangeIncludes: "schema:Person".freeze,
6634
6717
  type: "rdf:Property".freeze
6718
+ property :lyrics,
6719
+ comment: %(The words in the song.).freeze,
6720
+ "dc:source" => %(http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ).freeze,
6721
+ domainIncludes: "schema:MusicComposition".freeze,
6722
+ label: "lyrics".freeze,
6723
+ rangeIncludes: "schema:CreativeWork".freeze,
6724
+ type: "rdf:Property".freeze
6635
6725
  property :mainContentOfPage,
6636
6726
  comment: %(Indicates if this web page element is the main subject of the page.).freeze,
6637
6727
  domainIncludes: "schema:WebPage".freeze,
@@ -6648,31 +6738,7 @@ Note 3: Often, the absolute value is useful only when related to driving speed \
6648
6738
  property :mainEntityOfPage,
6649
6739
  comment: %(Indicates a page \(or other CreativeWork\) for which this thing is the main entity being described.
6650
6740
  <br /><br />
6651
- Many \(but not all\) pages have a fairly clear primary topic, some entity or thing that the page describes. For
6652
- example a restaurant's home page might be primarily about that Restaurant, or an event listing page might
6653
- represent a single event. The mainEntity and mainEntityOfPage properties allow you to explicitly express the relationship
6654
- between the page and the primary entity.
6655
- <br /><br />
6656
-
6657
- Related properties include sameAs, about, and url.
6658
- <br /><br />
6659
-
6660
- The sameAs and url properties are both similar to mainEntityOfPage. The url property should be reserved to refer to more
6661
- official or authoritative web pages, such as the item’s official website. The sameAs property also relates a thing
6662
- to a page that indirectly identifies it. Whereas sameAs emphasises well known pages, the mainEntityOfPage property
6663
- serves more to clarify which of several entities is the main one for that page.
6664
- <br /><br />
6665
-
6666
- mainEntityOfPage can be used for any page, including those not recognized as authoritative for that entity. For example,
6667
- for a product, sameAs might refer to a page on the manufacturer’s official site with specs for the product, while
6668
- mainEntityOfPage might be used on pages within various retailers’ sites giving details for the same product.
6669
- <br /><br />
6670
-
6671
- about is similar to mainEntity, with two key differences. First, about can refer to multiple entities/topics,
6672
- while mainEntity should be used for only the primary one. Second, some pages have a primary entity that itself
6673
- describes some other entity. For example, one web page may display a news article about a particular person.
6674
- Another page may display a product review for a particular product. In these cases, mainEntity for the pages
6675
- should refer to the news article or review, respectively, while about would more properly refer to the person or product.
6741
+ See <a href="/docs/datamodel.html#mainEntityBackground">background notes</a> for details.
6676
6742
  ).freeze,
6677
6743
  domainIncludes: "schema:Thing".freeze,
6678
6744
  inverseOf: "schema:mainEntity".freeze,
@@ -6953,7 +7019,7 @@ Typical unit code\(s\): KMT for kilometers, SMI for statute miles).freeze,
6953
7019
  rangeIncludes: "schema:Muscle".freeze,
6954
7020
  type: "rdf:Property".freeze
6955
7021
  property :netWorth,
6956
- comment: %(The total financial value of the organization or person as calculated by subtracting assets from liabilities.).freeze,
7022
+ comment: %(The total financial value of the person as calculated by subtracting assets from liabilities.).freeze,
6957
7023
  domainIncludes: "schema:Person".freeze,
6958
7024
  label: "netWorth".freeze,
6959
7025
  rangeIncludes: "schema:PriceSpecification".freeze,
@@ -7295,8 +7361,9 @@ Typical unit code\(s\): C62).freeze,
7295
7361
  rangeIncludes: "schema:Question".freeze,
7296
7362
  type: "rdf:Property".freeze
7297
7363
  property :parentOrganization,
7298
- comment: %(The larger organization that this local business is a branch of, if any.).freeze,
7299
- domainIncludes: "schema:LocalBusiness".freeze,
7364
+ comment: %(The larger organization that this organization is a branch of, if any.).freeze,
7365
+ domainIncludes: "schema:Organization".freeze,
7366
+ inverseOf: "schema:subOrganization".freeze,
7300
7367
  label: "parentOrganization".freeze,
7301
7368
  rangeIncludes: "schema:Organization".freeze,
7302
7369
  type: "rdf:Property".freeze
@@ -7403,6 +7470,13 @@ Typical unit code\(s\): C62).freeze,
7403
7470
  domainIncludes: ["schema:Order".freeze, "schema:Invoice".freeze],
7404
7471
  label: "paymentDue".freeze,
7405
7472
  rangeIncludes: "schema:DateTime".freeze,
7473
+ "schema:supersededBy" => %(schema:paymentDueDate).freeze,
7474
+ type: "rdf:Property".freeze
7475
+ property :paymentDueDate,
7476
+ comment: %(The date that payment is due.).freeze,
7477
+ domainIncludes: ["schema:Order".freeze, "schema:Invoice".freeze],
7478
+ label: "paymentDueDate".freeze,
7479
+ rangeIncludes: "schema:DateTime".freeze,
7406
7480
  type: "rdf:Property".freeze
7407
7481
  property :paymentMethod,
7408
7482
  comment: %(The name of the credit card or other method of payment for the order.).freeze,
@@ -7420,7 +7494,7 @@ Typical unit code\(s\): C62).freeze,
7420
7494
  comment: %(The status of payment; whether the invoice has been paid or not.).freeze,
7421
7495
  domainIncludes: "schema:Invoice".freeze,
7422
7496
  label: "paymentStatus".freeze,
7423
- rangeIncludes: "schema:Text".freeze,
7497
+ rangeIncludes: ["schema:Text".freeze, "schema:PaymentStatusType".freeze],
7424
7498
  type: "rdf:Property".freeze
7425
7499
  property :paymentUrl,
7426
7500
  comment: %(The URL for sending a payment.).freeze,
@@ -7874,7 +7948,7 @@ Standards bodies should promote a standard prefix for the identifiers of propert
7874
7948
  comment: %(The publisher of the creative work.).freeze,
7875
7949
  domainIncludes: "schema:CreativeWork".freeze,
7876
7950
  label: "publisher".freeze,
7877
- rangeIncludes: "schema:Organization".freeze,
7951
+ rangeIncludes: ["schema:Organization".freeze, "schema:Person".freeze],
7878
7952
  type: "rdf:Property".freeze
7879
7953
  property :publishingPrinciples,
7880
7954
  comment: %(Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork.).freeze,
@@ -8170,6 +8244,12 @@ Standards bodies should promote a standard prefix for the identifiers of propert
8170
8244
  label: "replyToUrl".freeze,
8171
8245
  rangeIncludes: "schema:URL".freeze,
8172
8246
  type: "rdf:Property".freeze
8247
+ property :reportNumber,
8248
+ comment: %(The number or other unique designator assigned to a Report by the publishing organization.).freeze,
8249
+ domainIncludes: "schema:Report".freeze,
8250
+ label: "reportNumber".freeze,
8251
+ rangeIncludes: "schema:Text".freeze,
8252
+ type: "rdf:Property".freeze
8173
8253
  property :representativeOfPage,
8174
8254
  comment: %(Indicates whether this image is representative of the content of the page.).freeze,
8175
8255
  domainIncludes: "schema:ImageObject".freeze,
@@ -8362,7 +8442,7 @@ Standards bodies should promote a standard prefix for the identifiers of propert
8362
8442
  rangeIncludes: "schema:URL".freeze,
8363
8443
  type: "rdf:Property".freeze
8364
8444
  property :sampleType,
8365
- comment: %(Full \(compile ready\) solution, code snippet, inline code, scripts, template.).freeze,
8445
+ comment: %(What type of sample: full \(compile ready\) solution, code snippet, inline code, scripts, template.).freeze,
8366
8446
  domainIncludes: "schema:SoftwareSourceCode".freeze,
8367
8447
  label: "sampleType".freeze,
8368
8448
  rangeIncludes: "schema:Text".freeze,
@@ -8387,7 +8467,7 @@ Standards bodies should promote a standard prefix for the identifiers of propert
8387
8467
  rangeIncludes: "schema:DateTime".freeze,
8388
8468
  type: "rdf:Property".freeze
8389
8469
  property :schemaVersion,
8390
- comment: %(Indicates \(by URL or string\) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. ).freeze,
8470
+ comment: %(Indicates \(by URL or string\) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using a URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. ).freeze,
8391
8471
  domainIncludes: "schema:CreativeWork".freeze,
8392
8472
  label: "schemaVersion".freeze,
8393
8473
  rangeIncludes: ["schema:URL".freeze, "schema:Text".freeze],
@@ -8579,6 +8659,12 @@ Standards bodies should promote a standard prefix for the identifiers of propert
8579
8659
  label: "servingSize".freeze,
8580
8660
  rangeIncludes: "schema:Text".freeze,
8581
8661
  type: "rdf:Property".freeze
8662
+ property :sharedContent,
8663
+ comment: %(A CreativeWork such as an image, video, or audio clip shared as part of this psting.).freeze,
8664
+ domainIncludes: "schema:SocialMediaPosting".freeze,
8665
+ label: "sharedContent".freeze,
8666
+ rangeIncludes: "schema:CreativeWork".freeze,
8667
+ type: "rdf:Property".freeze
8582
8668
  property :sibling,
8583
8669
  comment: %(A sibling of the person.).freeze,
8584
8670
  domainIncludes: "schema:Person".freeze,
@@ -8855,6 +8941,7 @@ Note that Event uses startDate/endDate instead of startTime/endTime, even when d
8855
8941
  property :subOrganization,
8856
8942
  comment: %(A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property.).freeze,
8857
8943
  domainIncludes: "schema:Organization".freeze,
8944
+ inverseOf: "schema:parentOrganization".freeze,
8858
8945
  label: "subOrganization".freeze,
8859
8946
  rangeIncludes: "schema:Organization".freeze,
8860
8947
  type: "rdf:Property".freeze
@@ -9250,7 +9337,7 @@ Note that Event uses startDate/endDate instead of startTime/endTime, even when d
9250
9337
  rangeIncludes: "schema:URL".freeze,
9251
9338
  type: "rdf:Property".freeze
9252
9339
  property :urlTemplate,
9253
- comment: %(An url template \(RFC6570\) that will be used to construct the target of the execution of the action.).freeze,
9340
+ comment: %(A url template \(RFC6570\) that will be used to construct the target of the execution of the action.).freeze,
9254
9341
  domainIncludes: "schema:EntryPoint".freeze,
9255
9342
  label: "urlTemplate".freeze,
9256
9343
  rangeIncludes: "schema:Text".freeze,
@@ -9261,6 +9348,12 @@ Note that Event uses startDate/endDate instead of startTime/endTime, even when d
9261
9348
  label: "usedToDiagnose".freeze,
9262
9349
  rangeIncludes: "schema:MedicalCondition".freeze,
9263
9350
  type: "rdf:Property".freeze
9351
+ property :userInteractionCount,
9352
+ comment: %(The number of interactions for the CreativeWork using the WebSite or SoftwareApplication.).freeze,
9353
+ domainIncludes: "schema:InteractionCounter".freeze,
9354
+ label: "userInteractionCount".freeze,
9355
+ rangeIncludes: "schema:Integer".freeze,
9356
+ type: "rdf:Property".freeze
9264
9357
  property :usesDevice,
9265
9358
  comment: %(Device used to perform the test.).freeze,
9266
9359
  domainIncludes: "schema:MedicalTest".freeze,
@@ -9435,7 +9528,7 @@ Typical unit code\(s\): C62 for persons ).freeze,
9435
9528
  type: "rdf:Property".freeze
9436
9529
  property :videoFormat,
9437
9530
  comment: %(The type of screening or video broadcast used \(e.g. IMAX, 3D, SD, HD, etc.\).).freeze,
9438
- domainIncludes: ["schema:ScreeningEvent".freeze, "schema:TelevisionStation".freeze],
9531
+ domainIncludes: ["schema:ScreeningEvent".freeze, "schema:BroadcastEvent".freeze, "schema:BroadcastService".freeze],
9439
9532
  label: "videoFormat".freeze,
9440
9533
  rangeIncludes: "schema:Text".freeze,
9441
9534
  type: "rdf:Property".freeze
@@ -10147,6 +10240,26 @@ Typical unit code\(s\): C62 for persons ).freeze,
10147
10240
  comment: %(Patients.).freeze,
10148
10241
  label: "Patient".freeze,
10149
10242
  type: "schema:MedicalAudience".freeze
10243
+ term :PaymentAutomaticallyApplied,
10244
+ comment: %(An automatic payment system is in place and will be used.).freeze,
10245
+ label: "PaymentAutomaticallyApplied".freeze,
10246
+ type: "schema:PaymentStatusType".freeze
10247
+ term :PaymentComplete,
10248
+ comment: %(The payment has been received and processed.).freeze,
10249
+ label: "PaymentComplete".freeze,
10250
+ type: "schema:PaymentStatusType".freeze
10251
+ term :PaymentDeclined,
10252
+ comment: %(The payee received the payment, but it was declined for some reason.).freeze,
10253
+ label: "PaymentDeclined".freeze,
10254
+ type: "schema:PaymentStatusType".freeze
10255
+ term :PaymentDue,
10256
+ comment: %(The payment is due, but still within an acceptable time to be received.).freeze,
10257
+ label: "PaymentDue".freeze,
10258
+ type: "schema:PaymentStatusType".freeze
10259
+ term :PaymentPastDue,
10260
+ comment: %(The payment is due and considered late.).freeze,
10261
+ label: "PaymentPastDue".freeze,
10262
+ type: "schema:PaymentStatusType".freeze
10150
10263
  term :Pediatric,
10151
10264
  comment: %(A specific branch of medical science that specializes in the care of infants, children and adolescents.).freeze,
10152
10265
  label: "Pediatric".freeze,
@@ -59,6 +59,16 @@ module RDF
59
59
  # foaf.knows #=> RDF::URI("http://xmlns.com/foaf/0.1/knows")
60
60
  # foaf[:name] #=> RDF::URI("http://xmlns.com/foaf/0.1/name")
61
61
  # foaf['mbox'] #=> RDF::URI("http://xmlns.com/foaf/0.1/mbox")
62
+ #
63
+ # @example Method calls are converted to the typical RDF camelcase convention
64
+ # foaf = RDF::Vocabulary.new("http://xmlns.com/foaf/0.1/")
65
+ # foaf.family_name #=> RDF::URI("http://xmlns.com/foaf/0.1/familyName")
66
+ # owl.same_as #=> RDF::URI("http://www.w3.org/2002/07/owl#sameAs")
67
+ # # []-style access is left as is
68
+ # foaf['family_name'] #=> RDF::URI("http://xmlns.com/foaf/0.1/family_name")
69
+ # foaf[:family_name] #=> RDF::URI("http://xmlns.com/foaf/0.1/family_name")
70
+ #
71
+ #
62
72
  #
63
73
  # @example Generating RDF from a vocabulary definition
64
74
  # graph = RDF::Graph.new << RDF::RDFS.to_enum
@@ -399,6 +409,7 @@ module RDF
399
409
  end
400
410
 
401
411
  def method_missing(property, *args, &block)
412
+ property = RDF::Vocabulary.camelize(property.to_s)
402
413
  if %w(to_ary).include?(property.to_s)
403
414
  super
404
415
  elsif args.empty? && !to_s.empty?
@@ -409,6 +420,7 @@ module RDF
409
420
  end
410
421
 
411
422
  private
423
+
412
424
  def props; @properties ||= {}; end
413
425
  end
414
426
 
@@ -472,6 +484,7 @@ module RDF
472
484
  end
473
485
 
474
486
  def method_missing(property, *args, &block)
487
+ property = self.class.camelize(property.to_s)
475
488
  if %w(to_ary).include?(property.to_s)
476
489
  super
477
490
  elsif args.empty?
@@ -481,6 +494,12 @@ module RDF
481
494
  end
482
495
  end
483
496
 
497
+ def self.camelize(str)
498
+ str.split('_').inject([]) do |buffer, e|
499
+ buffer.push(buffer.empty? ? e : e.capitalize)
500
+ end.join
501
+ end
502
+
484
503
  private
485
504
 
486
505
  @@subclasses = [::RDF] # @private
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.1.14
4
+ version: 1.1.15
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: 2015-06-08 00:00:00.000000000 Z
13
+ date: 2015-08-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: link_header
@@ -128,14 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '3.0'
131
+ version: 3.2.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '3.0'
138
+ version: 3.2.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rspec-its
141
141
  requirement: !ruby/object:Gem::Requirement