rdf-iiif 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2384efb074e8dbe0571732b45565a08bd42e8e15
4
+ data.tar.gz: 96ec05c0b0c421e69ff1d40a16613b7dd099d3dc
5
+ SHA512:
6
+ metadata.gz: e3c541cced66d033454adba7306781a4a681db11b2ccd320de099e359f133e7b2bf1281b887c0d79bb9daf0e06cf7df15745c65430875e08aa8ddfc3a503307b
7
+ data.tar.gz: 697e4d57dc8ba7a66cd3a2e734b169f1d86fdeb4679710d62c2bb77ddb91afe726e5f7ddaee5512f299d6f52d42f78d51a3f8a30012ae21316e8e782671eba54
data/.gitignore ADDED
@@ -0,0 +1,15 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /.ruby-version
4
+ /Gemfile.lock
5
+ /_yardoc/
6
+ /coverage/
7
+ /doc/
8
+ /pkg/
9
+ /spec/reports/
10
+ /tmp/
11
+ *.bundle
12
+ *.so
13
+ *.o
14
+ *.a
15
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in open_annotation.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,13 @@
1
+ Copyright 2014 The Board of Trustees of the Leland Stanford Junior University.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
data/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # rdf-iiif
2
+
3
+ [![Dependency Status](https://gemnasium.com/sul-dlss/rdf-iiif.svg)](https://gemnasium.com/sul-dlss/rdf-iiif) [![Gem Version](https://badge.fury.io/rb/rdf-iiif.svg)](http://badge.fury.io/rb/rdf-iiif)
4
+
5
+ Contains vocabularies to be used by RDF ruby gem https://github.com/ruby-rdf/rdf/ to simplify coding when using IIIF (http://iiif.io/) data.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'rdf-iiif'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install rdf-iiif
22
+
23
+ ## Usage
24
+
25
+ require 'rdf/iiif'
26
+
27
+ RDF::IIIF.painting #=> RDF::URI("http://iiif.io/api/presentation/2#painting")
28
+ RDF::SIOC::Services.has_service #=> RDF::URI("http://rdfs.org/sioc/services#has_service")
29
+
30
+ ## Contributing
31
+
32
+ 1. Fork it ( https://github.com/[my-github-username]/rdf-iiif/fork )
33
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
34
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
35
+ 4. Push to the branch (`git push origin my-new-feature`)
36
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,5 @@
1
+ module RDF
2
+ module IIIF
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,174 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # This file generated automatically using vocab-fetch from ../iiif-ontology-from-rob.owl and a little hand editing (added painting)
3
+ require 'rdf'
4
+ module RDF
5
+ class IIIFPresentation < RDF::StrictVocabulary("http://iiif.io/api/presentation/2#")
6
+
7
+ # Class definitions
8
+ term :AnnotationList,
9
+ label: "AnnotationList".freeze,
10
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
11
+ type: "rdfs:Class".freeze
12
+ term :Canvas,
13
+ comment: %(The canvas represents an individual page or view and acts as a central point for laying out the different content resources that make up the display.).freeze,
14
+ label: "Canvas".freeze,
15
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
16
+ type: "rdfs:Class".freeze
17
+ term :CanvasOrder,
18
+ comment: %(Abstract superclass for Sequence and Range as orderers of canvases).freeze,
19
+ label: "CanvasOrder".freeze,
20
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
21
+ type: "rdfs:Class".freeze
22
+ term :Collection,
23
+ comment: %(Collections are used to list the manifests available for viewing, and to describe the structures, hierarchies or collections that the physical objects are part of.).freeze,
24
+ label: "Collection".freeze,
25
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
26
+ type: "rdfs:Class".freeze
27
+ term :Layer,
28
+ label: "Layer".freeze,
29
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
30
+ type: "rdfs:Class".freeze
31
+ term :Manifest,
32
+ comment: %(The manifest resource represents a single object and any intellectual work or works embodied within that object).freeze,
33
+ label: "Manifest".freeze,
34
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
35
+ type: "rdfs:Class".freeze
36
+ term :Range,
37
+ comment: %(Ranges describe additional structure within an object, such as newspaper articles that span pages, the range of non-content-bearing pages at the beginning of a work, or chapters within a book).freeze,
38
+ label: "Range".freeze,
39
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
40
+ subClassOf: "http://iiif.io/api/presentation/2#CanvasOrder".freeze,
41
+ type: "rdfs:Class".freeze
42
+ term :Sequence,
43
+ comment: %(The sequence conveys the ordering of the views of the object.).freeze,
44
+ label: "Sequence".freeze,
45
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
46
+ subClassOf: "http://iiif.io/api/presentation/2#CanvasOrder".freeze,
47
+ type: "rdfs:Class".freeze
48
+ term :ViewingDirection,
49
+ label: "ViewingDirection".freeze,
50
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
51
+ type: "rdfs:Class".freeze
52
+ term :ViewingHint,
53
+ label: "ViewingHint".freeze,
54
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
55
+ type: "rdfs:Class".freeze
56
+ term :Zone,
57
+ comment: %(Used to group annotations together in an area of a Canvas, for example to model columns, foldouts or palimpsests).freeze,
58
+ label: "Zone".freeze,
59
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
60
+ subClassOf: "http://iiif.io/api/presentation/2#Canvas".freeze,
61
+ type: "rdfs:Class".freeze
62
+
63
+ # Property definitions
64
+ property :attributionLabel,
65
+ label: "attributionLabel".freeze,
66
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
67
+ type: "rdf:Property".freeze
68
+ property :hasAnnotations,
69
+ label: "hasAnnotations".freeze,
70
+ range: "rdf:List".freeze,
71
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
72
+ type: "rdf:Property".freeze
73
+ property :hasCanvases,
74
+ label: "hasCanvases".freeze,
75
+ range: "rdf:List".freeze,
76
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
77
+ type: "rdf:Property".freeze
78
+ property :hasCollections,
79
+ domain: "http://iiif.io/api/presentation/2#Collection".freeze,
80
+ label: "hasCollections".freeze,
81
+ range: "rdf:List".freeze,
82
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
83
+ type: "rdf:Property".freeze
84
+ property :hasImageAnnotations,
85
+ label: "hasImageAnnotations".freeze,
86
+ range: "rdf:List".freeze,
87
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
88
+ type: "rdf:Property".freeze
89
+ property :hasLists,
90
+ label: "hasLists".freeze,
91
+ range: "rdf:List".freeze,
92
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
93
+ type: "rdf:Property".freeze
94
+ property :hasManifests,
95
+ domain: "http://iiif.io/api/presentation/2#Collection".freeze,
96
+ label: "hasManifests".freeze,
97
+ range: "rdf:List".freeze,
98
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
99
+ type: "rdf:Property".freeze
100
+ property :hasRanges,
101
+ label: "hasRanges".freeze,
102
+ range: "rdf:List".freeze,
103
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
104
+ type: "rdf:Property".freeze
105
+ property :hasSequences,
106
+ domain: "http://iiif.io/api/presentation/2#Manifest".freeze,
107
+ label: "hasSequences".freeze,
108
+ range: "rdf:List".freeze,
109
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
110
+ type: "rdf:Property".freeze
111
+ property :hasStartCanvas,
112
+ label: "hasStartCanvas".freeze,
113
+ range: "rdf:List".freeze,
114
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
115
+ type: "rdf:Property".freeze
116
+ property :metadataLabels,
117
+ label: "metadataLabels".freeze,
118
+ range: "rdf:List".freeze,
119
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
120
+ type: "rdf:Property".freeze
121
+ property :viewingDirection,
122
+ label: "viewingDirection".freeze,
123
+ range: "http://iiif.io/api/presentation/2#ViewingDirection".freeze,
124
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
125
+ type: "rdf:Property".freeze
126
+ property :viewingHint,
127
+ label: "viewingHint".freeze,
128
+ range: "http://iiif.io/api/presentation/2#ViewingHint".freeze,
129
+ "rdfs:isDefinedBy" => %(http://iiif.io/api/presentation/2#).freeze,
130
+ type: "rdf:Property".freeze
131
+
132
+ # Extra definitions
133
+ term :"",
134
+ label: "".freeze,
135
+ "owl:versionInfo" => %(2010-12-20 23:00:00Z).freeze,
136
+ type: "owl:Ontology".freeze
137
+ term :painting,
138
+ comment: %( All resources which are to be displayed as part of the representation are given the motivation of “sc:painting”, regardless of whether they are images or not. For example, a transcription of the text in a page is considered “painting” as it is a representation of the object, whereas a comment about the page is not.).freeze,
139
+ label: "painting".freeze,
140
+ "skos:inScheme" => %(http://www.w3.org/ns/oa#motivationScheme).freeze,
141
+ "skos:prefLabel" => %(painting).freeze,
142
+ type: ["owl:NamedIndividual".freeze, "http://www.w3.org/ns/oa#Motivation".freeze]
143
+ term :bottomToTopDirection,
144
+ label: "bottomToTopDirection".freeze,
145
+ type: "http://iiif.io/api/presentation/2#ViewingDirection".freeze
146
+ term :continuousHint,
147
+ label: "continuousHint".freeze,
148
+ type: "http://iiif.io/api/presentation/2#ViewingHint".freeze
149
+ term :individualsHint,
150
+ label: "individualsHint".freeze,
151
+ type: "http://iiif.io/api/presentation/2#ViewingHint".freeze
152
+ term :leftToRightDirection,
153
+ label: "leftToRightDirection".freeze,
154
+ type: "http://iiif.io/api/presentation/2#ViewingDirection".freeze
155
+ term :nonPagedHint,
156
+ label: "nonPagedHint".freeze,
157
+ type: "http://iiif.io/api/presentation/2#ViewingHint".freeze
158
+ term :pagedHint,
159
+ label: "pagedHint".freeze,
160
+ type: "http://iiif.io/api/presentation/2#ViewingHint".freeze
161
+ term :painting,
162
+ label: "painting".freeze,
163
+ type: "http://www.w3.org/ns/oa#Motivation".freeze
164
+ term :rightToLeftDirection,
165
+ label: "rightToLeftDirection".freeze,
166
+ type: "http://iiif.io/api/presentation/2#ViewingDirection".freeze
167
+ term :topHint,
168
+ label: "topHint".freeze,
169
+ type: "http://iiif.io/api/presentation/2#ViewingHint".freeze
170
+ term :topToBottomDirection,
171
+ label: "topToBottomDirection".freeze,
172
+ type: "http://iiif.io/api/presentation/2#ViewingDirection".freeze
173
+ end
174
+ end
data/lib/rdf/iiif.rb ADDED
@@ -0,0 +1,3 @@
1
+ require 'rdf/content_vocab'
2
+ require 'rdf/dcmitype_vocab'
3
+ require 'rdf/open_annotation/vocab'
@@ -0,0 +1,70 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # This file generated automatically using vocab-fetch from http://rdfs.org/sioc/services#
3
+ require 'rdf'
4
+ module RDF
5
+ class SIOC::Services < RDF::StrictVocabulary("http://rdfs.org/sioc/services#")
6
+
7
+ # Class definitions
8
+ term :Service,
9
+ comment: %(A Service is web service associated with a Site or part of it.).freeze,
10
+ label: "Service".freeze,
11
+ "rdfs:isDefinedBy" => %(http://rdfs.org/sioc/services#).freeze,
12
+ type: ["rdfs:Class".freeze, "owl:Class".freeze]
13
+
14
+ # Property definitions
15
+ property :has_service,
16
+ comment: %(A Service associated with this SIOC object.).freeze,
17
+ label: "has service".freeze,
18
+ "owl:inverseOf" => %(http://rdfs.org/sioc/services#service_of).freeze,
19
+ range: "http://rdfs.org/sioc/services#Service".freeze,
20
+ "rdfs:isDefinedBy" => %(http://rdfs.org/sioc/services#).freeze,
21
+ type: ["rdf:Property".freeze, "owl:ObjectProperty".freeze]
22
+ property :max_results,
23
+ comment: %(Maximum number of results results returned by a web service.).freeze,
24
+ domain: "http://rdfs.org/sioc/services#Service".freeze,
25
+ label: "max results".freeze,
26
+ range: "xsd:integer".freeze,
27
+ "rdfs:isDefinedBy" => %(http://rdfs.org/sioc/services#).freeze,
28
+ type: ["rdf:Property".freeze, "owl:DatatypeProperty".freeze]
29
+ property :results_format,
30
+ comment: %(Format of results returned by a web service.).freeze,
31
+ domain: "http://rdfs.org/sioc/services#Service".freeze,
32
+ label: "results format".freeze,
33
+ "rdfs:isDefinedBy" => %(http://rdfs.org/sioc/services#).freeze,
34
+ type: ["rdf:Property".freeze, "owl:ObjectProperty".freeze]
35
+ property :service_definition,
36
+ comment: %(Links to a web service definition of this sioc:Service.).freeze,
37
+ domain: "http://rdfs.org/sioc/services#Service".freeze,
38
+ label: "service definition".freeze,
39
+ "rdfs:isDefinedBy" => %(http://rdfs.org/sioc/services#).freeze,
40
+ type: ["rdf:Property".freeze, "owl:ObjectProperty".freeze]
41
+ property :service_endpoint,
42
+ comment: %(URL of a web service endpoint.).freeze,
43
+ domain: "http://rdfs.org/sioc/services#Service".freeze,
44
+ label: "service endpoint".freeze,
45
+ "rdfs:isDefinedBy" => %(http://rdfs.org/sioc/services#).freeze,
46
+ type: ["rdf:Property".freeze, "owl:ObjectProperty".freeze]
47
+ property :service_of,
48
+ comment: %(A SIOC object this Service is associated with.).freeze,
49
+ domain: "http://rdfs.org/sioc/services#Service".freeze,
50
+ label: "service of".freeze,
51
+ "owl:inverseOf" => %(http://rdfs.org/sioc/services#has_service).freeze,
52
+ "rdfs:isDefinedBy" => %(http://rdfs.org/sioc/services#).freeze,
53
+ type: ["rdf:Property".freeze, "owl:ObjectProperty".freeze]
54
+ property :service_protocol,
55
+ comment: %(A protocol used by a web service. Possible protocol values include SOAP, REST, SPARQL-QUERY, GData and OpenSearch. These will be added to this module later.).freeze,
56
+ domain: "http://rdfs.org/sioc/services#Service".freeze,
57
+ label: "service protocol".freeze,
58
+ "rdfs:isDefinedBy" => %(http://rdfs.org/sioc/services#).freeze,
59
+ type: ["rdf:Property".freeze, "owl:ObjectProperty".freeze]
60
+
61
+ # Extra definitions
62
+ term :"",
63
+ "dc:description" => %(Extends the SIOC Core Ontology \(Semantically-Interlinked Online Communities\) by defining basic information on community-related web services.).freeze,
64
+ "dc:title" => %(SIOC Services Ontology Module Namespace).freeze,
65
+ label: "".freeze,
66
+ "owl:imports" => %(sioc:).freeze,
67
+ "rdfs:seeAlso" => %(http://rdfs.org/sioc/spec/#sec-modules).freeze,
68
+ type: ["owl:Ontology".freeze, "owl:Thing".freeze]
69
+ end
70
+ end
Binary file
Binary file
Binary file
data/rdf-iiif.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'rdf/iiif/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "rdf-iiif"
8
+ spec.version = RDF::IIIF::VERSION
9
+ spec.authors = ["Naomi Dushay"]
10
+ spec.email = ["ndushay@stanford.edu"]
11
+ spec.summary = %q{IIIF (Presentation) vocabularies for RDF.rb}
12
+ spec.homepage = ""
13
+ spec.license = "Apache 2"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0")
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_dependency 'rdf'
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.6"
23
+ spec.add_development_dependency "rake", "~> 10.0"
24
+ end
metadata ADDED
@@ -0,0 +1,100 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rdf-iiif
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Naomi Dushay
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-11-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rdf
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.6'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ description:
56
+ email:
57
+ - ndushay@stanford.edu
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - LICENSE
65
+ - README.md
66
+ - Rakefile
67
+ - lib/rdf/iiif.rb
68
+ - lib/rdf/iiif/version.rb
69
+ - lib/rdf/iiif/vocab.rb
70
+ - lib/rdf/sioc_services_vocab.rb
71
+ - pkg/rdf-open_annotation-0.0.2.gem
72
+ - pkg/rdf-open_annotation-0.0.3.gem
73
+ - pkg/rdf-open_annotation-0.0.4.gem
74
+ - rdf-iiif.gemspec
75
+ homepage: ''
76
+ licenses:
77
+ - Apache 2
78
+ metadata: {}
79
+ post_install_message:
80
+ rdoc_options: []
81
+ require_paths:
82
+ - lib
83
+ required_ruby_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ required_rubygems_version: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ requirements: []
94
+ rubyforge_project:
95
+ rubygems_version: 2.4.3
96
+ signing_key:
97
+ specification_version: 4
98
+ summary: IIIF (Presentation) vocabularies for RDF.rb
99
+ test_files: []
100
+ has_rdoc: