rdf-fcrepo4 0.0.1 → 0.0.2

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: c09c21abc475cfa3502da9ae36980e4e5f70bac2
4
- data.tar.gz: f09427c5859ab9ed6ce4f9a258033d821bacfebf
3
+ metadata.gz: 3b52e4d638c707fc4f8f2352eaf173284a632724
4
+ data.tar.gz: 083ae2296b06ffac8c0a3d86173ab7ee8507fa0b
5
5
  SHA512:
6
- metadata.gz: 547a3e9807df4f84568c961070bebc63304e9b9b4aff0d9e47340dd70e2f4fe443c53f535cd950fcfd9da4527f5db0afa1a8adbaf8a84a853a25da9635b59415
7
- data.tar.gz: a7e5310aebc0479fe8e22dee556773cbb10d052c2e8155bd7976de3845938dbf54c7fe9b32e172c8fe481f009f287f2fad5cf0d27d9e40b089ff60213b398266
6
+ metadata.gz: 363f07ff17b6bf0b2fea5fba81224932c3757c032d706c69b2258c10a1213889208a8a5bfabea7dc7bad72df1a58b248bb9ad291c9d84574b58e8ade1d11f52d
7
+ data.tar.gz: 6c485e7b5b677422c105cb8d87e7853f3eaa155af1daffdf808cdad661e9915c6ff2baebe1ea82451a3ffafe777aa1ebbd0e039afd972c1a4be5d16cc8fac57b
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,13 @@
1
+ language: ruby
2
+ script: rake spec
3
+ rvm:
4
+ - 2.1.1
5
+ # - ruby-head
6
+ #env:
7
+ # global:
8
+ # - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
9
+ notifications:
10
+ email:
11
+ - ndushay@stanford.edu
12
+ - cabeer@stanford.edu
13
+ - wmene@stanford.edu
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
- # rdf-ldp
1
+ # rdf-fcrepo4
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/rdf-fcrepo4.svg)](http://badge.fury.io/rb/rdf-fcrepo4)
3
+ [![Build Status](https://travis-ci.org/sul-dlss/rdf-fcrepo4.svg)](https://travis-ci.org/sul-dlss/rdf-fcrepo4)
4
+ [![Dependency Status](https://gemnasium.com/sul-dlss/rdf-fcrepo4.svg)](https://gemnasium.com/sul-dlss/rdf-fcrepo4) [![Gem Version](https://badge.fury.io/rb/rdf-fcrepo4.svg)](http://badge.fury.io/rb/rdf-fcrepo4)
4
5
 
5
6
  Contains vocabularies to be used by RDF ruby gem https://github.com/ruby-rdf/rdf/ to simplify coding when using Fedora RDF objects.
6
7
 
@@ -25,7 +26,7 @@ Or install it yourself as:
25
26
  ## Usage
26
27
 
27
28
  include rdf
28
- include rdf-fcrepo4
29
+ include rdf/fcrepo4
29
30
 
30
31
  RDF::FCRepo4.Object #=> RDF::URI("http://fedora.info/definitions/v4/rest-api#object")
31
32
 
data/Rakefile CHANGED
@@ -1,2 +1,15 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
1
7
  require "bundler/gem_tasks"
8
+ require 'rspec/core/rake_task'
9
+
10
+ RSpec::Core::RakeTask.new(:spec)
11
+
12
+ task :rspec => :spec
13
+ task :default => :spec
2
14
 
15
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,31 @@
1
+ require 'rdf'
2
+
3
+ # mixin methods
4
+ module RDF
5
+ class FCRepo4 < RDF::StrictVocabulary("http://fedora.info/definitions/v4/repository")
6
+
7
+ # returns graph without any fedora-specific triples
8
+ def self.remove_fedora_triples graph
9
+ if graph && graph.is_a?(RDF::Graph) && graph.count > 0
10
+ no_fedora_graph = RDF::Graph.new
11
+ fedora_props = RDF::FCRepo4.properties.map {|p| p.to_s}
12
+ # the fedora vocab is not complete and also doesn't cover modeshape triples
13
+ fedora_ns = "http://fedora.info/definitions"
14
+ modeshape_ns = "http://www.jcp.org/jcr"
15
+ graph.each { |stmt|
16
+ no_fedora_graph << stmt unless fedora_props.include?(stmt.predicate.to_s) ||
17
+ fedora_props.include?(stmt.object.to_s) ||
18
+ fedora_props.include?(stmt.subject.to_s) ||
19
+ stmt.predicate.to_s.match(fedora_ns) ||
20
+ stmt.predicate.to_s.match(modeshape_ns) ||
21
+ stmt.subject.to_s.match(fedora_ns) ||
22
+ stmt.object.to_s.match(fedora_ns) ||
23
+ stmt.object.to_s.match(modeshape_ns)
24
+ }
25
+ no_fedora_graph
26
+ else
27
+ graph
28
+ end
29
+ end
30
+ end
31
+ end
@@ -1,5 +1 @@
1
- module RDF
2
- module FCRepo4
3
- VERSION = "0.0.1"
4
- end
5
- end
1
+ VERSION = "0.0.2"
@@ -0,0 +1,290 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # This file generated automatically using vocab-fetch from http://fedora.info/definitions/v4/repository
3
+ require 'rdf'
4
+ module RDF
5
+ class FCRepo4 < RDF::StrictVocabulary("http://fedora.info/definitions/v4/repository")
6
+
7
+ # Class definitions
8
+ term :"#AnnotatedResource",
9
+ comment: %(A Resource that maintains properties in its own right.).freeze,
10
+ label: "annotated resource".freeze,
11
+ subClassOf: "http://fedora.info/definitions/v4/repository#Resource".freeze,
12
+ type: "owl:Class".freeze
13
+ term :"#Content",
14
+ comment: %(A bitstream, with no further data properties.).freeze,
15
+ label: "Content".freeze,
16
+ "owl:disjointWith" => [%(http://fedora.info/definitions/v4/repository#Datastream).freeze, %(http://fedora.info/definitions/v4/repository#Object).freeze],
17
+ subClassOf: "http://fedora.info/definitions/v4/repository#Resource".freeze,
18
+ type: "owl:Class".freeze
19
+ term :"#Datastream",
20
+ comment: %(A container for a bitstream and associated properties.).freeze,
21
+ label: "Fedora datastream".freeze,
22
+ "owl:disjointWith" => %(http://fedora.info/definitions/v4/repository#Object).freeze,
23
+ subClassOf: "http://fedora.info/definitions/v4/repository#AnnotatedResource".freeze,
24
+ type: "owl:Class".freeze
25
+ term :"#Fixity",
26
+ comment: %(A calculated or recorded result of a fixity measurement on a bitstream.).freeze,
27
+ label: "fixity".freeze,
28
+ "owl:disjointWith" => %(http://fedora.info/definitions/v4/repository#Resource).freeze,
29
+ subClassOf: "http://fedora.info/definitions/v4/repository#Thing".freeze,
30
+ type: "owl:Class".freeze
31
+ term :"#InboundReferences",
32
+ comment: %(The set of triples representing other repository resources which link to a given resource.).freeze,
33
+ label: "inbound references".freeze,
34
+ subClassOf: "http://fedora.info/definitions/v4/repository#Thing".freeze,
35
+ type: "owl:Class".freeze
36
+ term :"#Lock",
37
+ comment: %(A marker of exclusive ability to modify a resource by a single user.).freeze,
38
+ label: "lock".freeze,
39
+ "owl:disjointWith" => %(http://fedora.info/definitions/v4/repository#Resource).freeze,
40
+ subClassOf: "http://fedora.info/definitions/v4/repository#Thing".freeze,
41
+ type: "owl:Class".freeze
42
+ term :"#Object",
43
+ comment: %(A Fedora object: the fundamental quantum of durable content in a Fedora repository.).freeze,
44
+ label: "Fedora object".freeze,
45
+ subClassOf: "http://fedora.info/definitions/v4/repository#AnnotatedResource".freeze,
46
+ type: "owl:Class".freeze
47
+ term :"#Resource",
48
+ comment: %(An entity that has been committed to the repository for safekeeping. For example, Fedora objects and datastreams are Resources. A Fixity is not, because the provenance of the instance is entirely internal to the repository.).freeze,
49
+ label: "Fedora resource".freeze,
50
+ subClassOf: "http://fedora.info/definitions/v4/repository#Thing".freeze,
51
+ type: "owl:Class".freeze
52
+ term :"#Thing",
53
+ comment: %(Something that is contemplated in the Fedora repository model.).freeze,
54
+ label: "Fedora thing".freeze,
55
+ type: "owl:Class".freeze
56
+ term :"#Version",
57
+ label: "A snapshot of a Fedora object at a given point in time.".freeze,
58
+ subClassOf: "http://fedora.info/definitions/v4/repository#Object".freeze,
59
+ type: "owl:Class".freeze
60
+
61
+ # Property definitions
62
+ property :"#baseVersion",
63
+ domain: "http://fedora.info/definitions/v4/repository#Object".freeze,
64
+ label: "base version".freeze,
65
+ range: "http://fedora.info/definitions/v4/repository#Version".freeze,
66
+ type: ["owl:ObjectProperty".freeze, "owl:FunctionalProperty".freeze]
67
+ property :"#clusterCacheMode",
68
+ label: "#clusterCacheMode".freeze,
69
+ subPropertyOf: "owl:topDataProperty".freeze,
70
+ type: "owl:DatatypeProperty".freeze
71
+ property :"#clusterMembers",
72
+ label: "#clusterMembers".freeze,
73
+ subPropertyOf: "owl:topDataProperty".freeze,
74
+ type: "owl:DatatypeProperty".freeze
75
+ property :"#clusterName",
76
+ label: "#clusterName".freeze,
77
+ range: "xsd:string".freeze,
78
+ subPropertyOf: "owl:topDataProperty".freeze,
79
+ type: "owl:DatatypeProperty".freeze
80
+ property :"#clusterNodeAddress",
81
+ label: "#clusterNodeAddress".freeze,
82
+ subPropertyOf: "owl:topDataProperty".freeze,
83
+ type: "owl:DatatypeProperty".freeze
84
+ property :"#clusterNodeView",
85
+ label: "#clusterNodeView".freeze,
86
+ subPropertyOf: "owl:topDataProperty".freeze,
87
+ type: "owl:DatatypeProperty".freeze
88
+ property :"#clusterPhysicalAddress",
89
+ label: "#clusterPhysicalAddress".freeze,
90
+ subPropertyOf: "owl:topDataProperty".freeze,
91
+ type: "owl:DatatypeProperty".freeze
92
+ property :"#clusterSize",
93
+ label: "#clusterSize".freeze,
94
+ range: "xsd:nonNegativeInteger".freeze,
95
+ subPropertyOf: "owl:topDataProperty".freeze,
96
+ type: "owl:DatatypeProperty".freeze
97
+ property :"#computedChecksum",
98
+ label: "#computedChecksum".freeze,
99
+ subPropertyOf: "owl:topDataProperty".freeze,
100
+ type: "owl:DatatypeProperty".freeze
101
+ property :"#computedSize",
102
+ label: "#computedSize".freeze,
103
+ subPropertyOf: "owl:topDataProperty".freeze,
104
+ type: "owl:DatatypeProperty".freeze
105
+ property :"#couldNotStoreProperty",
106
+ label: "#couldNotStoreProperty".freeze,
107
+ subPropertyOf: "owl:topDataProperty".freeze,
108
+ type: "owl:DatatypeProperty".freeze
109
+ property :"#created",
110
+ label: "#created".freeze,
111
+ range: "xsd:dateTime".freeze,
112
+ subPropertyOf: "owl:topDataProperty".freeze,
113
+ type: "owl:DatatypeProperty".freeze
114
+ property :"#createdBy",
115
+ label: "#createdBy".freeze,
116
+ subPropertyOf: "owl:topDataProperty".freeze,
117
+ type: "owl:DatatypeProperty".freeze
118
+ property :"#frozenMixinTypes",
119
+ label: "#frozenMixinTypes".freeze,
120
+ subPropertyOf: "http://fedora.info/definitions/v4/repository#mixinTypes".freeze,
121
+ type: "owl:DatatypeProperty".freeze
122
+ property :"#frozenPrimaryType",
123
+ label: "#frozenPrimaryType".freeze,
124
+ subPropertyOf: "http://fedora.info/definitions/v4/repository#primaryType".freeze,
125
+ type: "owl:DatatypeProperty".freeze
126
+ property :"#frozenUuid",
127
+ label: "#frozenUuid".freeze,
128
+ subPropertyOf: "http://fedora.info/definitions/v4/repository#uuid".freeze,
129
+ type: "owl:DatatypeProperty".freeze
130
+ property :"#hasChild",
131
+ domain: "http://fedora.info/definitions/v4/repository#Object".freeze,
132
+ label: "has child".freeze,
133
+ type: ["owl:ObjectProperty".freeze, "owl:InverseFunctionalProperty".freeze]
134
+ property :"#hasContent",
135
+ comment: %(Indicates a Content in which content is stored for this Datastream.).freeze,
136
+ domain: "http://fedora.info/definitions/v4/repository#Datastream".freeze,
137
+ label: "has content".freeze,
138
+ range: "http://fedora.info/definitions/v4/repository#Content".freeze,
139
+ type: "owl:ObjectProperty".freeze
140
+ property :"#hasDefaultWorkspace",
141
+ comment: %(Indicates the default workspace of the repository.).freeze,
142
+ label: "has default workspace".freeze,
143
+ type: "owl:ObjectProperty".freeze
144
+ property :"#hasFixity",
145
+ domain: "http://fedora.info/definitions/v4/repository#Content".freeze,
146
+ label: "has fixity".freeze,
147
+ range: "http://fedora.info/definitions/v4/repository#Fixity".freeze,
148
+ type: "owl:ObjectProperty".freeze
149
+ property :"#hasLocation",
150
+ label: "#hasLocation".freeze,
151
+ range: "xsd:anyURI".freeze,
152
+ subPropertyOf: "owl:topDataProperty".freeze,
153
+ type: "owl:DatatypeProperty".freeze
154
+ property :"#hasLock",
155
+ label: "has lock".freeze,
156
+ range: "http://fedora.info/definitions/v4/repository#Lock".freeze,
157
+ type: "owl:ObjectProperty".freeze
158
+ property :"#hasLockToken",
159
+ label: "#hasLockToken".freeze,
160
+ subPropertyOf: "owl:topDataProperty".freeze,
161
+ type: "owl:DatatypeProperty".freeze
162
+ property :"#hasMember",
163
+ comment: %(Links to a newly-minted identifier which can be used to create a repository resource.).freeze,
164
+ label: "has member".freeze,
165
+ range: "xsd:anyURI".freeze,
166
+ type: "owl:ObjectProperty".freeze
167
+ property :"#hasNodeType",
168
+ label: "#hasNodeType".freeze,
169
+ subPropertyOf: "owl:topDataProperty".freeze,
170
+ type: "owl:DatatypeProperty".freeze
171
+ property :"#hasParent",
172
+ domain: "http://fedora.info/definitions/v4/repository#Resource".freeze,
173
+ label: "has parent".freeze,
174
+ range: "http://fedora.info/definitions/v4/repository#Object".freeze,
175
+ type: ["owl:ObjectProperty".freeze, "owl:FunctionalProperty".freeze]
176
+ property :"#hasResultsMember",
177
+ label: "has results member".freeze,
178
+ range: "http://fedora.info/definitions/v4/repository#Resource".freeze,
179
+ type: "owl:ObjectProperty".freeze
180
+ property :"#hasVersion",
181
+ domain: "http://fedora.info/definitions/v4/repository#Object".freeze,
182
+ label: "has version".freeze,
183
+ range: "http://fedora.info/definitions/v4/repository#Version".freeze,
184
+ type: "owl:ObjectProperty".freeze
185
+ property :"#hasVersionLabel",
186
+ label: "#hasVersionLabel".freeze,
187
+ range: "xsd:string".freeze,
188
+ subPropertyOf: "owl:topDataProperty".freeze,
189
+ type: "owl:DatatypeProperty".freeze
190
+ property :"#hasWorkspace",
191
+ comment: %(Links to a workspace of the repository.).freeze,
192
+ label: "has workspace".freeze,
193
+ type: "owl:ObjectProperty".freeze
194
+ property :"#isCheckedOut",
195
+ label: "#isCheckedOut".freeze,
196
+ range: "xsd:boolean".freeze,
197
+ subPropertyOf: "owl:topDataProperty".freeze,
198
+ type: "owl:DatatypeProperty".freeze
199
+ property :"#isContentOf",
200
+ comment: %(Indicates a Datastream for which this resource contains the content. ).freeze,
201
+ domain: "http://fedora.info/definitions/v4/repository#Content".freeze,
202
+ label: "is content of".freeze,
203
+ range: "http://fedora.info/definitions/v4/repository#Datastream".freeze,
204
+ type: ["owl:ObjectProperty".freeze, "owl:InverseFunctionalProperty".freeze]
205
+ property :"#isDeep",
206
+ domain: "http://fedora.info/definitions/v4/repository#Lock".freeze,
207
+ label: "#isDeep".freeze,
208
+ range: "xsd:boolean".freeze,
209
+ subPropertyOf: "owl:topDataProperty".freeze,
210
+ type: "owl:DatatypeProperty".freeze
211
+ property :"#isFixityOf",
212
+ domain: "http://fedora.info/definitions/v4/repository#Fixity".freeze,
213
+ label: "is fixity of".freeze,
214
+ range: "http://fedora.info/definitions/v4/repository#Content".freeze,
215
+ type: ["owl:ObjectProperty".freeze, "owl:InverseFunctionalProperty".freeze]
216
+ property :"#lastModified",
217
+ label: "#lastModified".freeze,
218
+ range: "xsd:dateTime".freeze,
219
+ subPropertyOf: "owl:topDataProperty".freeze,
220
+ type: "owl:DatatypeProperty".freeze
221
+ property :"#lastModifiedBy",
222
+ label: "#lastModifiedBy".freeze,
223
+ subPropertyOf: "owl:topDataProperty".freeze,
224
+ type: "owl:DatatypeProperty".freeze
225
+ property :"#locks",
226
+ domain: "http://fedora.info/definitions/v4/repository#Lock".freeze,
227
+ label: "locks".freeze,
228
+ type: "owl:ObjectProperty".freeze
229
+ property :"#mimeType",
230
+ label: "#mimeType".freeze,
231
+ range: "xsd:string".freeze,
232
+ subPropertyOf: "owl:topDataProperty".freeze,
233
+ type: "owl:DatatypeProperty".freeze
234
+ property :"#mixinTypes",
235
+ label: "#mixinTypes".freeze,
236
+ subPropertyOf: "owl:topDataProperty".freeze,
237
+ type: "owl:DatatypeProperty".freeze
238
+ property :"#numFixityChecks",
239
+ label: "#numFixityChecks".freeze,
240
+ range: "xsd:nonNegativeInteger".freeze,
241
+ subPropertyOf: "owl:topDataProperty".freeze,
242
+ type: "owl:DatatypeProperty".freeze
243
+ property :"#numFixityErrors",
244
+ label: "#numFixityErrors".freeze,
245
+ range: "xsd:nonNegativeInteger".freeze,
246
+ subPropertyOf: "owl:topDataProperty".freeze,
247
+ type: "owl:DatatypeProperty".freeze
248
+ property :"#numFixityRepaired",
249
+ label: "#numFixityRepaired".freeze,
250
+ range: "xsd:nonNegativeInteger".freeze,
251
+ subPropertyOf: "owl:topDataProperty".freeze,
252
+ type: "owl:DatatypeProperty".freeze
253
+ property :"#numberOfChildren",
254
+ label: "#numberOfChildren".freeze,
255
+ range: "xsd:nonNegativeInteger".freeze,
256
+ subPropertyOf: "owl:topDataProperty".freeze,
257
+ type: "owl:DatatypeProperty".freeze
258
+ property :"#objectCount",
259
+ label: "#objectCount".freeze,
260
+ subPropertyOf: "owl:topDataProperty".freeze,
261
+ type: "owl:DatatypeProperty".freeze
262
+ property :"#objectSize",
263
+ label: "#objectSize".freeze,
264
+ subPropertyOf: "owl:topDataProperty".freeze,
265
+ type: "owl:DatatypeProperty".freeze
266
+ property :"#predecessors",
267
+ domain: "http://fedora.info/definitions/v4/repository#Version".freeze,
268
+ label: "predecessors".freeze,
269
+ range: "http://fedora.info/definitions/v4/repository#Version".freeze,
270
+ type: "owl:ObjectProperty".freeze
271
+ property :"#primaryType",
272
+ label: "#primaryType".freeze,
273
+ subPropertyOf: "owl:topDataProperty".freeze,
274
+ type: "owl:DatatypeProperty".freeze
275
+ property :"#status",
276
+ label: "#status".freeze,
277
+ subPropertyOf: "owl:topDataProperty".freeze,
278
+ type: "owl:DatatypeProperty".freeze
279
+ property :"#uuid",
280
+ label: "#uuid".freeze,
281
+ subPropertyOf: "owl:topDataProperty".freeze,
282
+ type: "owl:DatatypeProperty".freeze
283
+
284
+ # Extra definitions
285
+ term :"#",
286
+ comment: %(A first attempt to formalize an ontology for the Fedora data model, intended primarily to make it possible to expose Fedora-curated RDF predicates via de-reference-able URIs.).freeze,
287
+ label: "Fedora Commons Repository Ontology".freeze,
288
+ type: "owl:Ontology".freeze
289
+ end
290
+ end
data/lib/rdf/fcrepo4.rb CHANGED
@@ -1,290 +1,2 @@
1
- # -*- encoding: utf-8 -*-
2
- # This file generated automatically using vocab-fetch from http://fedora.info/definitions/v4/repository
3
- require 'rdf'
4
- module RDF
5
- class FCRepo4 < RDF::StrictVocabulary("http://fedora.info/definitions/v4/repository")
6
-
7
- # Class definitions
8
- term :"#AnnotatedResource",
9
- comment: %(A Resource that maintains properties in its own right.).freeze,
10
- label: "annotated resource".freeze,
11
- subClassOf: "http://fedora.info/definitions/v4/repository#Resource".freeze,
12
- type: "owl:Class".freeze
13
- term :"#Content",
14
- comment: %(A bitstream, with no further data properties.).freeze,
15
- label: "Content".freeze,
16
- "owl:disjointWith" => [%(http://fedora.info/definitions/v4/repository#Datastream).freeze, %(http://fedora.info/definitions/v4/repository#Object).freeze],
17
- subClassOf: "http://fedora.info/definitions/v4/repository#Resource".freeze,
18
- type: "owl:Class".freeze
19
- term :"#Datastream",
20
- comment: %(A container for a bitstream and associated properties.).freeze,
21
- label: "Fedora datastream".freeze,
22
- "owl:disjointWith" => %(http://fedora.info/definitions/v4/repository#Object).freeze,
23
- subClassOf: "http://fedora.info/definitions/v4/repository#AnnotatedResource".freeze,
24
- type: "owl:Class".freeze
25
- term :"#Fixity",
26
- comment: %(A calculated or recorded result of a fixity measurement on a bitstream.).freeze,
27
- label: "fixity".freeze,
28
- "owl:disjointWith" => %(http://fedora.info/definitions/v4/repository#Resource).freeze,
29
- subClassOf: "http://fedora.info/definitions/v4/repository#Thing".freeze,
30
- type: "owl:Class".freeze
31
- term :"#InboundReferences",
32
- comment: %(The set of triples representing other repository resources which link to a given resource.).freeze,
33
- label: "inbound references".freeze,
34
- subClassOf: "http://fedora.info/definitions/v4/repository#Thing".freeze,
35
- type: "owl:Class".freeze
36
- term :"#Lock",
37
- comment: %(A marker of exclusive ability to modify a resource by a single user.).freeze,
38
- label: "lock".freeze,
39
- "owl:disjointWith" => %(http://fedora.info/definitions/v4/repository#Resource).freeze,
40
- subClassOf: "http://fedora.info/definitions/v4/repository#Thing".freeze,
41
- type: "owl:Class".freeze
42
- term :"#Object",
43
- comment: %(A Fedora object: the fundamental quantum of durable content in a Fedora repository.).freeze,
44
- label: "Fedora object".freeze,
45
- subClassOf: "http://fedora.info/definitions/v4/repository#AnnotatedResource".freeze,
46
- type: "owl:Class".freeze
47
- term :"#Resource",
48
- comment: %(An entity that has been committed to the repository for safekeeping. For example, Fedora objects and datastreams are Resources. A Fixity is not, because the provenance of the instance is entirely internal to the repository.).freeze,
49
- label: "Fedora resource".freeze,
50
- subClassOf: "http://fedora.info/definitions/v4/repository#Thing".freeze,
51
- type: "owl:Class".freeze
52
- term :"#Thing",
53
- comment: %(Something that is contemplated in the Fedora repository model.).freeze,
54
- label: "Fedora thing".freeze,
55
- type: "owl:Class".freeze
56
- term :"#Version",
57
- label: "A snapshot of a Fedora object at a given point in time.".freeze,
58
- subClassOf: "http://fedora.info/definitions/v4/repository#Object".freeze,
59
- type: "owl:Class".freeze
60
-
61
- # Property definitions
62
- property :"#baseVersion",
63
- domain: "http://fedora.info/definitions/v4/repository#Object".freeze,
64
- label: "base version".freeze,
65
- range: "http://fedora.info/definitions/v4/repository#Version".freeze,
66
- type: ["owl:ObjectProperty".freeze, "owl:FunctionalProperty".freeze]
67
- property :"#clusterCacheMode",
68
- label: "#clusterCacheMode".freeze,
69
- subPropertyOf: "owl:topDataProperty".freeze,
70
- type: "owl:DatatypeProperty".freeze
71
- property :"#clusterMembers",
72
- label: "#clusterMembers".freeze,
73
- subPropertyOf: "owl:topDataProperty".freeze,
74
- type: "owl:DatatypeProperty".freeze
75
- property :"#clusterName",
76
- label: "#clusterName".freeze,
77
- range: "xsd:string".freeze,
78
- subPropertyOf: "owl:topDataProperty".freeze,
79
- type: "owl:DatatypeProperty".freeze
80
- property :"#clusterNodeAddress",
81
- label: "#clusterNodeAddress".freeze,
82
- subPropertyOf: "owl:topDataProperty".freeze,
83
- type: "owl:DatatypeProperty".freeze
84
- property :"#clusterNodeView",
85
- label: "#clusterNodeView".freeze,
86
- subPropertyOf: "owl:topDataProperty".freeze,
87
- type: "owl:DatatypeProperty".freeze
88
- property :"#clusterPhysicalAddress",
89
- label: "#clusterPhysicalAddress".freeze,
90
- subPropertyOf: "owl:topDataProperty".freeze,
91
- type: "owl:DatatypeProperty".freeze
92
- property :"#clusterSize",
93
- label: "#clusterSize".freeze,
94
- range: "xsd:nonNegativeInteger".freeze,
95
- subPropertyOf: "owl:topDataProperty".freeze,
96
- type: "owl:DatatypeProperty".freeze
97
- property :"#computedChecksum",
98
- label: "#computedChecksum".freeze,
99
- subPropertyOf: "owl:topDataProperty".freeze,
100
- type: "owl:DatatypeProperty".freeze
101
- property :"#computedSize",
102
- label: "#computedSize".freeze,
103
- subPropertyOf: "owl:topDataProperty".freeze,
104
- type: "owl:DatatypeProperty".freeze
105
- property :"#couldNotStoreProperty",
106
- label: "#couldNotStoreProperty".freeze,
107
- subPropertyOf: "owl:topDataProperty".freeze,
108
- type: "owl:DatatypeProperty".freeze
109
- property :"#created",
110
- label: "#created".freeze,
111
- range: "xsd:dateTime".freeze,
112
- subPropertyOf: "owl:topDataProperty".freeze,
113
- type: "owl:DatatypeProperty".freeze
114
- property :"#createdBy",
115
- label: "#createdBy".freeze,
116
- subPropertyOf: "owl:topDataProperty".freeze,
117
- type: "owl:DatatypeProperty".freeze
118
- property :"#frozenMixinTypes",
119
- label: "#frozenMixinTypes".freeze,
120
- subPropertyOf: "http://fedora.info/definitions/v4/repository#mixinTypes".freeze,
121
- type: "owl:DatatypeProperty".freeze
122
- property :"#frozenPrimaryType",
123
- label: "#frozenPrimaryType".freeze,
124
- subPropertyOf: "http://fedora.info/definitions/v4/repository#primaryType".freeze,
125
- type: "owl:DatatypeProperty".freeze
126
- property :"#frozenUuid",
127
- label: "#frozenUuid".freeze,
128
- subPropertyOf: "http://fedora.info/definitions/v4/repository#uuid".freeze,
129
- type: "owl:DatatypeProperty".freeze
130
- property :"#hasChild",
131
- domain: "http://fedora.info/definitions/v4/repository#Object".freeze,
132
- label: "has child".freeze,
133
- type: ["owl:ObjectProperty".freeze, "owl:InverseFunctionalProperty".freeze]
134
- property :"#hasContent",
135
- comment: %(Indicates a Content in which content is stored for this Datastream.).freeze,
136
- domain: "http://fedora.info/definitions/v4/repository#Datastream".freeze,
137
- label: "has content".freeze,
138
- range: "http://fedora.info/definitions/v4/repository#Content".freeze,
139
- type: "owl:ObjectProperty".freeze
140
- property :"#hasDefaultWorkspace",
141
- comment: %(Indicates the default workspace of the repository.).freeze,
142
- label: "has default workspace".freeze,
143
- type: "owl:ObjectProperty".freeze
144
- property :"#hasFixity",
145
- domain: "http://fedora.info/definitions/v4/repository#Content".freeze,
146
- label: "has fixity".freeze,
147
- range: "http://fedora.info/definitions/v4/repository#Fixity".freeze,
148
- type: "owl:ObjectProperty".freeze
149
- property :"#hasLocation",
150
- label: "#hasLocation".freeze,
151
- range: "xsd:anyURI".freeze,
152
- subPropertyOf: "owl:topDataProperty".freeze,
153
- type: "owl:DatatypeProperty".freeze
154
- property :"#hasLock",
155
- label: "has lock".freeze,
156
- range: "http://fedora.info/definitions/v4/repository#Lock".freeze,
157
- type: "owl:ObjectProperty".freeze
158
- property :"#hasLockToken",
159
- label: "#hasLockToken".freeze,
160
- subPropertyOf: "owl:topDataProperty".freeze,
161
- type: "owl:DatatypeProperty".freeze
162
- property :"#hasMember",
163
- comment: %(Links to a newly-minted identifier which can be used to create a repository resource.).freeze,
164
- label: "has member".freeze,
165
- range: "xsd:anyURI".freeze,
166
- type: "owl:ObjectProperty".freeze
167
- property :"#hasNodeType",
168
- label: "#hasNodeType".freeze,
169
- subPropertyOf: "owl:topDataProperty".freeze,
170
- type: "owl:DatatypeProperty".freeze
171
- property :"#hasParent",
172
- domain: "http://fedora.info/definitions/v4/repository#Resource".freeze,
173
- label: "has parent".freeze,
174
- range: "http://fedora.info/definitions/v4/repository#Object".freeze,
175
- type: ["owl:ObjectProperty".freeze, "owl:FunctionalProperty".freeze]
176
- property :"#hasResultsMember",
177
- label: "has results member".freeze,
178
- range: "http://fedora.info/definitions/v4/repository#Resource".freeze,
179
- type: "owl:ObjectProperty".freeze
180
- property :"#hasVersion",
181
- domain: "http://fedora.info/definitions/v4/repository#Object".freeze,
182
- label: "has version".freeze,
183
- range: "http://fedora.info/definitions/v4/repository#Version".freeze,
184
- type: "owl:ObjectProperty".freeze
185
- property :"#hasVersionLabel",
186
- label: "#hasVersionLabel".freeze,
187
- range: "xsd:string".freeze,
188
- subPropertyOf: "owl:topDataProperty".freeze,
189
- type: "owl:DatatypeProperty".freeze
190
- property :"#hasWorkspace",
191
- comment: %(Links to a workspace of the repository.).freeze,
192
- label: "has workspace".freeze,
193
- type: "owl:ObjectProperty".freeze
194
- property :"#isCheckedOut",
195
- label: "#isCheckedOut".freeze,
196
- range: "xsd:boolean".freeze,
197
- subPropertyOf: "owl:topDataProperty".freeze,
198
- type: "owl:DatatypeProperty".freeze
199
- property :"#isContentOf",
200
- comment: %(Indicates a Datastream for which this resource contains the content. ).freeze,
201
- domain: "http://fedora.info/definitions/v4/repository#Content".freeze,
202
- label: "is content of".freeze,
203
- range: "http://fedora.info/definitions/v4/repository#Datastream".freeze,
204
- type: ["owl:ObjectProperty".freeze, "owl:InverseFunctionalProperty".freeze]
205
- property :"#isDeep",
206
- domain: "http://fedora.info/definitions/v4/repository#Lock".freeze,
207
- label: "#isDeep".freeze,
208
- range: "xsd:boolean".freeze,
209
- subPropertyOf: "owl:topDataProperty".freeze,
210
- type: "owl:DatatypeProperty".freeze
211
- property :"#isFixityOf",
212
- domain: "http://fedora.info/definitions/v4/repository#Fixity".freeze,
213
- label: "is fixity of".freeze,
214
- range: "http://fedora.info/definitions/v4/repository#Content".freeze,
215
- type: ["owl:ObjectProperty".freeze, "owl:InverseFunctionalProperty".freeze]
216
- property :"#lastModified",
217
- label: "#lastModified".freeze,
218
- range: "xsd:dateTime".freeze,
219
- subPropertyOf: "owl:topDataProperty".freeze,
220
- type: "owl:DatatypeProperty".freeze
221
- property :"#lastModifiedBy",
222
- label: "#lastModifiedBy".freeze,
223
- subPropertyOf: "owl:topDataProperty".freeze,
224
- type: "owl:DatatypeProperty".freeze
225
- property :"#locks",
226
- domain: "http://fedora.info/definitions/v4/repository#Lock".freeze,
227
- label: "locks".freeze,
228
- type: "owl:ObjectProperty".freeze
229
- property :"#mimeType",
230
- label: "#mimeType".freeze,
231
- range: "xsd:string".freeze,
232
- subPropertyOf: "owl:topDataProperty".freeze,
233
- type: "owl:DatatypeProperty".freeze
234
- property :"#mixinTypes",
235
- label: "#mixinTypes".freeze,
236
- subPropertyOf: "owl:topDataProperty".freeze,
237
- type: "owl:DatatypeProperty".freeze
238
- property :"#numFixityChecks",
239
- label: "#numFixityChecks".freeze,
240
- range: "xsd:nonNegativeInteger".freeze,
241
- subPropertyOf: "owl:topDataProperty".freeze,
242
- type: "owl:DatatypeProperty".freeze
243
- property :"#numFixityErrors",
244
- label: "#numFixityErrors".freeze,
245
- range: "xsd:nonNegativeInteger".freeze,
246
- subPropertyOf: "owl:topDataProperty".freeze,
247
- type: "owl:DatatypeProperty".freeze
248
- property :"#numFixityRepaired",
249
- label: "#numFixityRepaired".freeze,
250
- range: "xsd:nonNegativeInteger".freeze,
251
- subPropertyOf: "owl:topDataProperty".freeze,
252
- type: "owl:DatatypeProperty".freeze
253
- property :"#numberOfChildren",
254
- label: "#numberOfChildren".freeze,
255
- range: "xsd:nonNegativeInteger".freeze,
256
- subPropertyOf: "owl:topDataProperty".freeze,
257
- type: "owl:DatatypeProperty".freeze
258
- property :"#objectCount",
259
- label: "#objectCount".freeze,
260
- subPropertyOf: "owl:topDataProperty".freeze,
261
- type: "owl:DatatypeProperty".freeze
262
- property :"#objectSize",
263
- label: "#objectSize".freeze,
264
- subPropertyOf: "owl:topDataProperty".freeze,
265
- type: "owl:DatatypeProperty".freeze
266
- property :"#predecessors",
267
- domain: "http://fedora.info/definitions/v4/repository#Version".freeze,
268
- label: "predecessors".freeze,
269
- range: "http://fedora.info/definitions/v4/repository#Version".freeze,
270
- type: "owl:ObjectProperty".freeze
271
- property :"#primaryType",
272
- label: "#primaryType".freeze,
273
- subPropertyOf: "owl:topDataProperty".freeze,
274
- type: "owl:DatatypeProperty".freeze
275
- property :"#status",
276
- label: "#status".freeze,
277
- subPropertyOf: "owl:topDataProperty".freeze,
278
- type: "owl:DatatypeProperty".freeze
279
- property :"#uuid",
280
- label: "#uuid".freeze,
281
- subPropertyOf: "owl:topDataProperty".freeze,
282
- type: "owl:DatatypeProperty".freeze
283
-
284
- # Extra definitions
285
- term :"#",
286
- comment: %(A first attempt to formalize an ontology for the Fedora data model, intended primarily to make it possible to expose Fedora-curated RDF predicates via de-reference-able URIs.).freeze,
287
- label: "Fedora Commons Repository Ontology".freeze,
288
- type: "owl:Ontology".freeze
289
- end
290
- end
1
+ require 'rdf/fcrepo4/vocab'
2
+ require 'rdf/fcrepo4/helper'
data/rdf-fcrepo4.gemspec CHANGED
@@ -5,7 +5,7 @@ require 'rdf/fcrepo4/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "rdf-fcrepo4"
8
- spec.version = RDF::FCRepo4::VERSION
8
+ spec.version = VERSION
9
9
  spec.authors = ["Naomi Dushay"]
10
10
  spec.email = ["ndushay@stanford.edu"]
11
11
  spec.summary = %q{Fedora Commons Repository Version 4 vocabulary for RDF.rb and helper methods}
@@ -21,4 +21,7 @@ Gem::Specification.new do |spec|
21
21
 
22
22
  spec.add_development_dependency "bundler", "~> 1.6"
23
23
  spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_development_dependency "rspec", "~> 3.0"
25
+ spec.add_development_dependency "rdf-turtle" # used to load testing fixtures
26
+
24
27
  end
@@ -0,0 +1,29 @@
1
+
2
+ <http://localhost:8080/rest/anno/deb27887-1241-4ccc-a09c-439293d73fbb/fcr:export?format=jcr/xml> <http://purl.org/dc/elements/1.1/format> <http://fedora.info/definitions/v4/repository#jcr/xml> .
3
+
4
+ <http://fedora.info/definitions/v4/repository#jcr/xml> <http://www.w3.org/2000/01/rdf-schema#label> "jcr/xml"^^<http://www.w3.org/2001/XMLSchema#string> .
5
+
6
+ <http://localhost:8080/rest/anno/deb27887-1241-4ccc-a09c-439293d73fbb> <http://fedora.info/definitions/v4/rest-api#exportsAs> <http://localhost:8080/rest/anno/deb27887-1241-4ccc-a09c-439293d73fbb/fcr:export?format=jcr/xml> ;
7
+ <http://www.w3.org/ns/ldp#membershipResource> <http://localhost:8080/rest/anno/deb27887-1241-4ccc-a09c-439293d73fbb> ;
8
+ <http://www.w3.org/ns/ldp#hasMemberRelation> <http://www.w3.org/ns/ldp#member> ;
9
+ a <http://www.w3.org/ns/ldp#Container> , <http://www.w3.org/ns/ldp#DirectContainer> ;
10
+ <http://www.w3.org/ns/ldp#member> <http://localhost:8080/rest/anno/deb27887-1241-4ccc-a09c-439293d73fbb/b> , <http://localhost:8080/rest/anno/deb27887-1241-4ccc-a09c-439293d73fbb/t> ;
11
+ <http://www.w3.org/ns/oa#hasBody> <http://localhost:8080/rest/anno/deb27887-1241-4ccc-a09c-439293d73fbb/b/e14b93b7-3a88-4eb5-9688-7dea7f482d23> ;
12
+ <http://www.w3.org/ns/oa#hasTarget> <http://localhost:8080/rest/anno/deb27887-1241-4ccc-a09c-439293d73fbb/t/ee774031-74d9-4f5a-9b03-cdd21267e4e1> ;
13
+ <http://www.w3.org/ns/ldp#contains> <http://localhost:8080/rest/anno/deb27887-1241-4ccc-a09c-439293d73fbb/b> , <http://localhost:8080/rest/anno/deb27887-1241-4ccc-a09c-439293d73fbb/t> ;
14
+ <http://fedora.info/definitions/v4/repository#hasParent> <http://localhost:8080/rest/anno> .
15
+
16
+ <http://localhost:8080/rest/anno/deb27887-1241-4ccc-a09c-439293d73fbb/b> <http://www.w3.org/ns/ldp#membershipResource> <http://localhost:8080/rest/anno/deb27887-1241-4ccc-a09c-439293d73fbb> .
17
+
18
+ <http://localhost:8080/rest/anno/deb27887-1241-4ccc-a09c-439293d73fbb/t> <http://www.w3.org/ns/ldp#membershipResource> <http://localhost:8080/rest/anno/deb27887-1241-4ccc-a09c-439293d73fbb> .
19
+
20
+ <http://localhost:8080/rest/anno/deb27887-1241-4ccc-a09c-439293d73fbb> a <http://www.jcp.org/jcr/nt/1.0folder> , <http://www.jcp.org/jcr/nt/1.0hierarchyNode> , <http://www.jcp.org/jcr/nt/1.0base> , <http://www.jcp.org/jcr/mix/1.0created> , <http://fedora.info/definitions/v4/rest-api#resource> , <http://fedora.info/definitions/v4/rest-api#object> , <http://www.w3.org/ns/oa#Annotation> , <http://fedora.info/definitions/v4/rest-api#relations> , <http://www.jcp.org/jcr/mix/1.0created> , <http://www.jcp.org/jcr/mix/1.0lastModified> , <http://www.jcp.org/jcr/mix/1.0lockable> , <http://www.jcp.org/jcr/mix/1.0referenceable> , <http://purl.org/dc/elements/1.1/describable> , <http://fedora.info/definitions/v4/rest-api#resource> , <http://www.w3.org/ns/ldp#Container> ;
21
+ <http://fedora.info/definitions/v4/rest-api#writable> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> ;
22
+ <http://fedora.info/definitions/v4/repository#primaryType> "nt:folder"^^<http://www.w3.org/2001/XMLSchema#string> ;
23
+ <http://www.w3.org/ns/oa#motivatedBy> <http://www.w3.org/ns/oa#commenting> ;
24
+ <http://fedora.info/definitions/v4/repository#created> "2014-10-13T18:33:39.191Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
25
+ <http://fedora.info/definitions/v4/repository#lastModified> "2014-10-13T18:33:39.265Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
26
+ <http://fedora.info/definitions/v4/repository#mixinTypes> "fedora:resource"^^<http://www.w3.org/2001/XMLSchema#string> , "fedora:object"^^<http://www.w3.org/2001/XMLSchema#string> , "oa:Annotation"^^<http://www.w3.org/2001/XMLSchema#string> ;
27
+ <http://fedora.info/definitions/v4/repository#lastModifiedBy> "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> ;
28
+ <http://fedora.info/definitions/v4/repository#uuid> "88694f22-640b-4006-97cd-5135690987cc"^^<http://www.w3.org/2001/XMLSchema#string> ;
29
+ <http://fedora.info/definitions/v4/repository#createdBy> "bypassAdmin"^^<http://www.w3.org/2001/XMLSchema#string> .
@@ -0,0 +1,43 @@
1
+ require 'spec_helper'
2
+ require 'rdf/turtle'
3
+
4
+ describe RDF::FCRepo4 do
5
+
6
+ let(:anno_ttl) { File.read(fixture_path + '/open_anno_ldp_container.ttl') }
7
+
8
+ describe '#remove_fedora_triples' do
9
+ it 'graph returned has no fedora triples' do
10
+ graph = RDF::Graph.new
11
+ graph.from_ttl anno_ttl
12
+ expect(graph.size).to eql 39
13
+ result = graph.query [nil, RDF.type, RDF::URI.new("http://fedora.info/definitions/v4/rest-api#resource")]
14
+ expect(result.size).to eql 1
15
+ result = graph.query [nil, RDF.type, RDF::URI.new("http://www.jcp.org/jcr/nt/1.0base")]
16
+ expect(result.size).to eql 1
17
+ result = graph.query [nil, RDF::URI.new("http://fedora.info/definitions/v4/repository#lastModifiedBy"), nil]
18
+ expect(result.size).to eql 1
19
+ result = graph.query [nil, RDF::URI.new("http://fedora.info/definitions/v4/rest-api#writable"), nil]
20
+ expect(result.size).to eql 1
21
+ result = graph.query [RDF::URI.new("http://fedora.info/definitions/v4/repository#jcr/xml"), nil, nil]
22
+ expect(result.size).to eql 1
23
+ result = graph.query [nil, nil, RDF::URI.new("http://fedora.info/definitions/v4/repository#jcr/xml")]
24
+ expect(result.size).to eql 1
25
+
26
+ stripped_graph = RDF::FCRepo4.remove_fedora_triples graph
27
+ expect(graph.size).to eql 39
28
+ result = stripped_graph.query [nil, RDF.type, RDF::URI.new("http://fedora.info/definitions/v4/rest-api#resource")]
29
+ expect(result.size).to eql 0
30
+ result = stripped_graph.query [nil, RDF.type, RDF::URI.new("http://www.jcp.org/jcr/nt/1.0base")]
31
+ expect(result.size).to eql 0
32
+ result = stripped_graph.query [nil, RDF::URI.new("http://fedora.info/definitions/v4/repository#lastModifiedBy"), nil]
33
+ expect(result.size).to eql 0
34
+ result = stripped_graph.query [nil, RDF::URI.new("http://fedora.info/definitions/v4/rest-api#writable"), nil]
35
+ expect(result.size).to eql 0
36
+ result = stripped_graph.query [RDF::URI.new("http://fedora.info/definitions/v4/repository#jcr/xml"), nil, nil]
37
+ expect(result.size).to eql 0
38
+ result = stripped_graph.query [nil, nil, RDF::URI.new("http://fedora.info/definitions/v4/repository#jcr/xml")]
39
+ expect(result.size).to eql 0
40
+ end
41
+ end
42
+
43
+ end
@@ -0,0 +1,97 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
+ # file to always be loaded, without a need to explicitly require it in any files.
5
+ #
6
+ # Given that it is always loaded, you are encouraged to keep this file as
7
+ # light-weight as possible. Requiring heavyweight dependencies from this file
8
+ # will add to the boot time of your test suite on EVERY test run, even for an
9
+ # individual file that may not need all of that loaded. Instead, consider making
10
+ # a separate helper file that requires the additional dependencies and performs
11
+ # the additional setup, and require it from the spec files that actually need it.
12
+ #
13
+ # The `.rspec` file also contains a few flags that are not defaults but that
14
+ # users commonly want.
15
+ #
16
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
+
18
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
19
+ require 'rdf/fcrepo4'
20
+
21
+ RSpec.configure do |config|
22
+ # rspec-expectations config goes here. You can use an alternate
23
+ # assertion/expectation library such as wrong or the stdlib/minitest
24
+ # assertions if you prefer.
25
+ config.expect_with :rspec do |expectations|
26
+ # This option will default to `true` in RSpec 4. It makes the `description`
27
+ # and `failure_message` of custom matchers include text for helper methods
28
+ # defined using `chain`, e.g.:
29
+ # be_bigger_than(2).and_smaller_than(4).description
30
+ # # => "be bigger than 2 and smaller than 4"
31
+ # ...rather than:
32
+ # # => "be bigger than 2"
33
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
34
+ end
35
+
36
+ # rspec-mocks config goes here. You can use an alternate test double
37
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
38
+ config.mock_with :rspec do |mocks|
39
+ # Prevents you from mocking or stubbing a method that does not exist on
40
+ # a real object. This is generally recommended, and will default to
41
+ # `true` in RSpec 4.
42
+ mocks.verify_partial_doubles = true
43
+ end
44
+
45
+ # The settings below are suggested to provide a good initial experience
46
+ # with RSpec, but feel free to customize to your heart's content.
47
+ =begin
48
+ # These two settings work together to allow you to limit a spec run
49
+ # to individual examples or groups you care about by tagging them with
50
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
51
+ # get run.
52
+ config.filter_run :focus
53
+ config.run_all_when_everything_filtered = true
54
+
55
+ # Limits the available syntax to the non-monkey patched syntax that is recommended.
56
+ # For more details, see:
57
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
58
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
59
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
60
+ config.disable_monkey_patching!
61
+
62
+ # This setting enables warnings. It's recommended, but in some cases may
63
+ # be too noisy due to issues in dependencies.
64
+ config.warnings = true
65
+
66
+ # Many RSpec users commonly either run the entire suite or an individual
67
+ # file, and it's useful to allow more verbose output when running an
68
+ # individual spec file.
69
+ if config.files_to_run.one?
70
+ # Use the documentation formatter for detailed output,
71
+ # unless a formatter has already been configured
72
+ # (e.g. via a command-line flag).
73
+ config.default_formatter = 'doc'
74
+ end
75
+
76
+ # Print the 10 slowest examples and example groups at the
77
+ # end of the spec run, to help surface which specs are running
78
+ # particularly slow.
79
+ config.profile_examples = 10
80
+
81
+ # Run specs in random order to surface order dependencies. If you find an
82
+ # order dependency and want to debug it, you can fix the order by providing
83
+ # the seed, which is printed after each run.
84
+ # --seed 1234
85
+ config.order = :random
86
+
87
+ # Seed global randomization in this process using the `--seed` CLI option.
88
+ # Setting this allows you to use `--seed` to deterministically reproduce
89
+ # test failures related to randomization by passing the same `--seed` value
90
+ # as the one that triggered the failure.
91
+ Kernel.srand config.seed
92
+ =end
93
+ end
94
+
95
+ def fixture_path path=nil
96
+ File.expand_path(File.dirname(__FILE__) + "/fixtures/#{path}")
97
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdf-fcrepo4
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naomi Dushay
@@ -52,6 +52,34 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rdf-turtle
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
55
83
  description:
56
84
  email:
57
85
  - ndushay@stanford.edu
@@ -59,14 +87,21 @@ executables: []
59
87
  extensions: []
60
88
  extra_rdoc_files: []
61
89
  files:
90
+ - ".gitignore"
91
+ - ".rspec"
92
+ - ".travis.yml"
62
93
  - Gemfile
63
- - Gemfile.lock
64
94
  - LICENSE
65
95
  - README.md
66
96
  - Rakefile
67
97
  - lib/rdf/fcrepo4.rb
98
+ - lib/rdf/fcrepo4/helper.rb
68
99
  - lib/rdf/fcrepo4/version.rb
100
+ - lib/rdf/fcrepo4/vocab.rb
69
101
  - rdf-fcrepo4.gemspec
102
+ - spec/fixtures/open_anno_ldp_container.ttl
103
+ - spec/helper_spec.rb
104
+ - spec/spec_helper.rb
70
105
  homepage: ''
71
106
  licenses:
72
107
  - Apache 2
@@ -91,4 +126,7 @@ rubygems_version: 2.2.0
91
126
  signing_key:
92
127
  specification_version: 4
93
128
  summary: Fedora Commons Repository Version 4 vocabulary for RDF.rb and helper methods
94
- test_files: []
129
+ test_files:
130
+ - spec/fixtures/open_anno_ldp_container.ttl
131
+ - spec/helper_spec.rb
132
+ - spec/spec_helper.rb
data/Gemfile.lock DELETED
@@ -1,19 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- rdf-ldp (0.0.1)
5
- rdf
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- rake (10.3.2)
11
- rdf (1.1.6)
12
-
13
- PLATFORMS
14
- ruby
15
-
16
- DEPENDENCIES
17
- bundler (~> 1.6)
18
- rake (~> 10.0)
19
- rdf-ldp!