rdf 1.0.10.2 → 1.1.0.p0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +8 -8
  2. data/CREDITS +0 -2
  3. data/README +67 -20
  4. data/VERSION +1 -1
  5. data/etc/doap.nt +75 -75
  6. data/lib/rdf.rb +15 -64
  7. data/lib/rdf/format.rb +11 -20
  8. data/lib/rdf/mixin/countable.rb +4 -11
  9. data/lib/rdf/mixin/enumerable.rb +4 -8
  10. data/lib/rdf/mixin/mutable.rb +1 -4
  11. data/lib/rdf/mixin/queryable.rb +13 -60
  12. data/lib/rdf/model/graph.rb +46 -22
  13. data/lib/rdf/model/list.rb +27 -102
  14. data/lib/rdf/model/literal.rb +48 -100
  15. data/lib/rdf/model/literal/date.rb +1 -1
  16. data/lib/rdf/model/literal/datetime.rb +1 -35
  17. data/lib/rdf/model/literal/decimal.rb +0 -30
  18. data/lib/rdf/model/literal/double.rb +6 -14
  19. data/lib/rdf/model/literal/integer.rb +3 -11
  20. data/lib/rdf/model/literal/numeric.rb +0 -40
  21. data/lib/rdf/model/literal/time.rb +4 -3
  22. data/lib/rdf/model/node.rb +1 -3
  23. data/lib/rdf/model/statement.rb +7 -47
  24. data/lib/rdf/model/term.rb +9 -0
  25. data/lib/rdf/model/uri.rb +28 -68
  26. data/lib/rdf/model/value.rb +1 -31
  27. data/lib/rdf/nquads.rb +4 -7
  28. data/lib/rdf/ntriples.rb +2 -2
  29. data/lib/rdf/ntriples/format.rb +1 -2
  30. data/lib/rdf/ntriples/reader.rb +15 -68
  31. data/lib/rdf/ntriples/writer.rb +13 -53
  32. data/lib/rdf/query.rb +1 -8
  33. data/lib/rdf/query/pattern.rb +25 -7
  34. data/lib/rdf/query/solution.rb +3 -19
  35. data/lib/rdf/query/solutions.rb +4 -22
  36. data/lib/rdf/query/variable.rb +1 -3
  37. data/lib/rdf/reader.rb +8 -22
  38. data/lib/rdf/repository.rb +23 -5
  39. data/lib/rdf/transaction.rb +19 -8
  40. data/lib/rdf/util/aliasing.rb +3 -13
  41. data/lib/rdf/util/cache.rb +2 -3
  42. data/lib/rdf/util/file.rb +5 -15
  43. data/lib/rdf/vocab.rb +19 -20
  44. data/lib/rdf/writer.rb +5 -44
  45. metadata +12 -27
  46. data/lib/rdf/vocab/schema.rb +0 -652
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.10.2
4
+ version: 1.1.0.p0
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-11-08 00:00:00.000000000 Z
13
+ date: 2013-03-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable
@@ -18,56 +18,42 @@ dependencies:
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: '2.3'
21
+ version: '2.2'
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.3'
28
+ version: '2.2'
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.9
35
+ version: 1.1.0.p
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.9
43
- - !ruby/object:Gem::Dependency
44
- name: rdf-rdfxml
45
- requirement: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - ! '>='
48
- - !ruby/object:Gem::Version
49
- version: '0'
50
- type: :development
51
- prerelease: false
52
- version_requirements: !ruby/object:Gem::Requirement
53
- requirements:
54
- - - ! '>='
55
- - !ruby/object:Gem::Version
56
- version: '0'
42
+ version: 1.1.0.p
57
43
  - !ruby/object:Gem::Dependency
58
44
  name: rspec
59
45
  requirement: !ruby/object:Gem::Requirement
60
46
  requirements:
61
47
  - - ! '>='
62
48
  - !ruby/object:Gem::Version
63
- version: '2.14'
49
+ version: '2.12'
64
50
  type: :development
65
51
  prerelease: false
66
52
  version_requirements: !ruby/object:Gem::Requirement
67
53
  requirements:
68
54
  - - ! '>='
69
55
  - !ruby/object:Gem::Version
70
- version: '2.14'
56
+ version: '2.12'
71
57
  - !ruby/object:Gem::Dependency
72
58
  name: yard
73
59
  requirement: !ruby/object:Gem::Requirement
@@ -164,7 +150,6 @@ files:
164
150
  - lib/rdf/vocab/rdfs.rb
165
151
  - lib/rdf/vocab/rsa.rb
166
152
  - lib/rdf/vocab/rss.rb
167
- - lib/rdf/vocab/schema.rb
168
153
  - lib/rdf/vocab/sioc.rb
169
154
  - lib/rdf/vocab/skos.rb
170
155
  - lib/rdf/vocab/wot.rb
@@ -185,15 +170,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
170
  requirements:
186
171
  - - ! '>='
187
172
  - !ruby/object:Gem::Version
188
- version: 1.8.7
173
+ version: 1.9.3
189
174
  required_rubygems_version: !ruby/object:Gem::Requirement
190
175
  requirements:
191
- - - ! '>='
176
+ - - ! '>'
192
177
  - !ruby/object:Gem::Version
193
- version: '0'
178
+ version: 1.3.1
194
179
  requirements: []
195
180
  rubyforge_project: rdf
196
- rubygems_version: 2.0.5
181
+ rubygems_version: 2.0.3
197
182
  signing_key:
198
183
  specification_version: 4
199
184
  summary: A Ruby library for working with Resource Description Framework (RDF) data.
@@ -1,652 +0,0 @@
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