ansr_dpla 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +15 -0
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +137 -0
  4. data/README.md +59 -0
  5. data/ansr_dpla.gemspec +27 -0
  6. data/app/models/collection.rb +2 -0
  7. data/app/models/item.rb +2 -0
  8. data/fixtures/collection.json +1 -0
  9. data/fixtures/collection.jsonld +14 -0
  10. data/fixtures/collections.json +1 -0
  11. data/fixtures/collections.jsonld +65 -0
  12. data/fixtures/dpla.yml +2 -0
  13. data/fixtures/empty.jsonld +1 -0
  14. data/fixtures/item.json +1 -0
  15. data/fixtures/item.jsonld +272 -0
  16. data/fixtures/kittens.json +1 -0
  17. data/fixtures/kittens.jsonld +2477 -0
  18. data/fixtures/kittens_faceted.json +1 -0
  19. data/fixtures/kittens_faceted.jsonld +2693 -0
  20. data/lib/ansr_dpla.rb +9 -0
  21. data/lib/ansr_dpla/api.rb +78 -0
  22. data/lib/ansr_dpla/arel.rb +7 -0
  23. data/lib/ansr_dpla/arel/big_table.rb +108 -0
  24. data/lib/ansr_dpla/arel/visitors.rb +6 -0
  25. data/lib/ansr_dpla/arel/visitors/query_builder.rb +188 -0
  26. data/lib/ansr_dpla/arel/visitors/to_no_sql.rb +9 -0
  27. data/lib/ansr_dpla/connection_adapters/no_sql_adapter.rb +58 -0
  28. data/lib/ansr_dpla/model.rb +7 -0
  29. data/lib/ansr_dpla/model/base.rb +24 -0
  30. data/lib/ansr_dpla/model/pseudo_associate.rb +14 -0
  31. data/lib/ansr_dpla/model/querying.rb +34 -0
  32. data/lib/ansr_dpla/relation.rb +60 -0
  33. data/lib/ansr_dpla/request.rb +5 -0
  34. data/spec/adpla_test_api.rb +9 -0
  35. data/spec/lib/api_spec.rb +113 -0
  36. data/spec/lib/item_spec.rb +57 -0
  37. data/spec/lib/relation/facet_spec.rb +82 -0
  38. data/spec/lib/relation/select_spec.rb +54 -0
  39. data/spec/lib/relation/where_spec.rb +74 -0
  40. data/spec/lib/relation_spec.rb +307 -0
  41. data/spec/spec_helper.rb +36 -0
  42. data/test/debug.rb +14 -0
  43. data/test/system.rb +52 -0
  44. metadata +236 -0
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NmUyOWRjODIzNzE2YjM1ZjAxZjgxMThmYjE3NjU2ZDllMmI5YzU3YQ==
5
+ data.tar.gz: !binary |-
6
+ YTQwYTVlZGY0YWE0NjNlOGMwZTg0M2QxNGEzNmQ4ODU3YjRjYjliNg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ MzRmODdjZTVkNzY1YWNiMDlmODI1ZmI1ZmU3ZTViNDVjMDY3ZDU5MzgyMTky
10
+ ZDZkODk5MTEwNGMyMDgxNTVkMWMzMGJkZGQ5ZTQ1NGFmODNmM2E2MDYyMjVl
11
+ YzBkMDllZGUwMmE0YTRlZTQ3YWE3OThmMGNjYjViMDg1NmYyYTQ=
12
+ data.tar.gz: !binary |-
13
+ NmQyNmE0NzVlNzJmOTEzZWY3M2YyMjE4MzVhMDMyMzY1NTkxZTg4ODcxZTg2
14
+ NjM4ODE2OTNmOTQ3ZTk3MTY1OWEyYTZiNmRiY2NkY2IzZWI2ZTNiODVmY2Nm
15
+ MGQ1M2NlNDAxMmM0YzRmNjNmMTIzYjQwOGViYmY1MGUxNThhM2E=
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
@@ -0,0 +1,137 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ansr_dpla (0.0.3)
5
+ ansr (= 0.0.3)
6
+ blacklight (>= 5.1.0)
7
+ json-ld
8
+ loggable
9
+ rest-client
10
+ sass-rails
11
+
12
+ GEM
13
+ remote: http://rubygems.org/
14
+ specs:
15
+ actionmailer (4.0.4)
16
+ actionpack (= 4.0.4)
17
+ mail (~> 2.5.4)
18
+ actionpack (4.0.4)
19
+ activesupport (= 4.0.4)
20
+ builder (~> 3.1.0)
21
+ erubis (~> 2.7.0)
22
+ rack (~> 1.5.2)
23
+ rack-test (~> 0.6.2)
24
+ activemodel (4.0.4)
25
+ activesupport (= 4.0.4)
26
+ builder (~> 3.1.0)
27
+ activerecord (4.0.4)
28
+ activemodel (= 4.0.4)
29
+ activerecord-deprecated_finders (~> 1.0.2)
30
+ activesupport (= 4.0.4)
31
+ arel (~> 4.0.0)
32
+ activerecord-deprecated_finders (1.0.3)
33
+ activesupport (4.0.4)
34
+ i18n (~> 0.6, >= 0.6.9)
35
+ minitest (~> 4.2)
36
+ multi_json (~> 1.3)
37
+ thread_safe (~> 0.1)
38
+ tzinfo (~> 0.3.37)
39
+ ansr (0.0.3)
40
+ activerecord
41
+ arel
42
+ loggable
43
+ arel (4.0.2)
44
+ blacklight (5.3.0)
45
+ bootstrap-sass (~> 3.0)
46
+ deprecation
47
+ kaminari (~> 0.13)
48
+ nokogiri (~> 1.6)
49
+ rails (>= 3.2.6, < 5)
50
+ rsolr (~> 1.0.6)
51
+ bootstrap-sass (3.1.1.1)
52
+ sass (~> 3.2)
53
+ builder (3.1.4)
54
+ deprecation (0.1.0)
55
+ activesupport
56
+ diff-lcs (1.2.5)
57
+ erubis (2.7.0)
58
+ hike (1.2.3)
59
+ i18n (0.6.9)
60
+ json-ld (1.1.3.1)
61
+ rdf (~> 1.1)
62
+ kaminari (0.15.1)
63
+ actionpack (>= 3.0.0)
64
+ activesupport (>= 3.0.0)
65
+ loggable (0.3.0)
66
+ mail (2.5.4)
67
+ mime-types (~> 1.16)
68
+ treetop (~> 1.4.8)
69
+ mime-types (1.25.1)
70
+ mini_portile (0.5.3)
71
+ minitest (4.7.5)
72
+ multi_json (1.9.2)
73
+ nokogiri (1.6.1)
74
+ mini_portile (~> 0.5.0)
75
+ polyglot (0.3.4)
76
+ rack (1.5.2)
77
+ rack-test (0.6.2)
78
+ rack (>= 1.0)
79
+ rails (4.0.4)
80
+ actionmailer (= 4.0.4)
81
+ actionpack (= 4.0.4)
82
+ activerecord (= 4.0.4)
83
+ activesupport (= 4.0.4)
84
+ bundler (>= 1.3.0, < 2.0)
85
+ railties (= 4.0.4)
86
+ sprockets-rails (~> 2.0.0)
87
+ railties (4.0.4)
88
+ actionpack (= 4.0.4)
89
+ activesupport (= 4.0.4)
90
+ rake (>= 0.8.7)
91
+ thor (>= 0.18.1, < 2.0)
92
+ rake (10.1.1)
93
+ rdf (1.1.3)
94
+ rest-client (1.6.7)
95
+ mime-types (>= 1.16)
96
+ rsolr (1.0.10)
97
+ builder (>= 2.1.2)
98
+ rspec (2.14.1)
99
+ rspec-core (~> 2.14.0)
100
+ rspec-expectations (~> 2.14.0)
101
+ rspec-mocks (~> 2.14.0)
102
+ rspec-core (2.14.8)
103
+ rspec-expectations (2.14.5)
104
+ diff-lcs (>= 1.1.3, < 2.0)
105
+ rspec-mocks (2.14.6)
106
+ sass (3.3.5)
107
+ sass-rails (4.0.1)
108
+ railties (>= 4.0.0, < 5.0)
109
+ sass (>= 3.1.10)
110
+ sprockets-rails (~> 2.0.0)
111
+ sprockets (2.12.1)
112
+ hike (~> 1.2)
113
+ multi_json (~> 1.0)
114
+ rack (~> 1.0)
115
+ tilt (~> 1.1, != 1.3.0)
116
+ sprockets-rails (2.0.1)
117
+ actionpack (>= 3.0)
118
+ activesupport (>= 3.0)
119
+ sprockets (~> 2.8)
120
+ thor (0.19.1)
121
+ thread_safe (0.3.3)
122
+ tilt (1.4.1)
123
+ treetop (1.4.15)
124
+ polyglot
125
+ polyglot (>= 0.3.1)
126
+ tzinfo (0.3.39)
127
+ yard (0.8.7.3)
128
+
129
+ PLATFORMS
130
+ ruby
131
+
132
+ DEPENDENCIES
133
+ ansr_dpla!
134
+ bundler (>= 1.0.14)
135
+ rake
136
+ rspec
137
+ yard
@@ -0,0 +1,59 @@
1
+ Ansr::Dpla
2
+ =====
3
+
4
+ DPLA + ActiveRecord::Relation + Blacklight
5
+
6
+ This project creates a Rails model that can be used to search the DPLA's public REST API (http://dp.la/info/developers/codex/). The goal of this project is to provide an avenue by which data from the DPLA REST API might be explored via a [Blacklight](https://github.com/projectblacklight/blacklight) application. It is proof-of-concept for a broader proposal described at (https://github.com/barmintor/ansr)
7
+
8
+ To use the Item and Collection models, they must first be configured with a DPLA API key:
9
+
10
+ Item.config({:api_key => 'your api key'})
11
+ Instructions for creating an API key are here: http://dp.la/info/developers/codex/policies/#get-a-key
12
+
13
+ Once the model is configured, it can be queried like any other Rails model.
14
+
15
+ item_id = "7eb617e559007e1ad6d95bd30a30b16b"
16
+ Item.find(item_id)
17
+ Item.dataProvider # returns a single string value
18
+
19
+ The Item and Collection models are searched like other Rails models, with relations. To search a single field, call 'where':
20
+
21
+ rel = Item.where(q: 'kittens') # full text search for 'kittens'
22
+
23
+ Where clauses can be negated:
24
+
25
+ rel = rel.where.not(q: => 'cats') # maximize cuteness density
26
+ Where clauses support simple unions:
27
+
28
+ rel = rel.where.or(q: => 'puppies') # so egalitarian
29
+ These relations are lazy-loaded; they make no queries until data is required:
30
+
31
+ rel.load # loads the data if not loaded
32
+ rel.to_a # loads the data if not loaded, returns an array of model instances
33
+ rel.filters # loads the data if not loaded, returns a list of the filters/facets for the query
34
+ rel.count # returns the number of records loaded
35
+
36
+ This is to support a decorator pattern on the relations:
37
+
38
+ rel = Item.where(q; 'kittens').where.not(q: 'cats')
39
+ rel = rel.limit(25).offset(50) # start on the third page of 25
40
+
41
+ In addition to where, there are a number of other decorator clauses:
42
+
43
+ # select limits the fields returned
44
+ rel = rel.select(:id, :"sourceResource.title")
45
+ # limit sets the maximum number of records to return, default is 10
46
+ rel = rel.limit(25)
47
+ # offset sets a starting point; it must be a multiple of the limit
48
+ rel = rel.offset(50) # start on page 3
49
+ # order adds sort clauses
50
+ rel = rel.order(:"sourceResource.title")
51
+
52
+ When using the filter decorator, you can add field names without a query. This will add the field to the relations filter information after load:
53
+
54
+ # filter adds filter/facet clauses
55
+ rel = rel.filter(:"collection.id" => '460c76299e1b0a46afea352b1ab8f556')
56
+ rel = rel.filter(:isShownAt)
57
+ rel.filters # -> a list of two filters, and the counts for the filter constraint values in the response set
58
+
59
+ And more, as per ActiveRecord and illustrated in the specs.
@@ -0,0 +1,27 @@
1
+ require File.join(File.dirname(__FILE__), '../lib/ansr/version')
2
+ version = Ansr.version
3
+ Gem::Specification.new do |spec|
4
+ spec.name = 'ansr_dpla'
5
+ spec.version = version
6
+ spec.platform = Gem::Platform::RUBY
7
+ spec.authors = ["Benjamin Armintor"]
8
+ spec.email = ["armintor@gmail.com"]
9
+ spec.summary = 'ActiveRecord-style models and relations for DPLA APIs'
10
+ spec.description = 'Wrapping the DPLA APIs in Rails-like models and relations'
11
+ spec.homepage = 'https://github.com/barmintor/ansr/tree/master/ansr_dpla'
12
+ spec.files = `git ls-files`.split("\n")
13
+ spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
14
+ spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
15
+ spec.require_paths = ["lib"]
16
+
17
+ spec.add_dependency 'ansr', version
18
+ spec.add_dependency 'json-ld'
19
+ spec.add_dependency 'rest-client'
20
+ spec.add_dependency 'loggable'
21
+ spec.add_dependency 'blacklight', '>=5.1.0'
22
+ spec.add_dependency 'sass-rails'
23
+ spec.add_development_dependency("rake")
24
+ spec.add_development_dependency("bundler", ">= 1.0.14")
25
+ spec.add_development_dependency("rspec")
26
+ spec.add_development_dependency("yard")
27
+ end
@@ -0,0 +1,2 @@
1
+ class Collection < Ansr::Dpla::Model::Base
2
+ end
@@ -0,0 +1,2 @@
1
+ class Item < Ansr::Dpla::Model::Base
2
+ end
@@ -0,0 +1 @@
1
+ {"docs":[{"_id":"bpl--commonwealth:2j62s484w","title":"Leslie Jones Collection","ingestDate":"2014-02-15T17:00:26.122359","ingestionSequence":5,"ingestType":"collection","@id":"http://dp.la/api/collections/460c76299e1b0a46afea352b1ab8f556","id":"460c76299e1b0a46afea352b1ab8f556"}],"count":1}
@@ -0,0 +1,14 @@
1
+ {
2
+ "docs": [
3
+ {
4
+ "_id": "bpl--commonwealth:2j62s484w",
5
+ "title": "Leslie Jones Collection",
6
+ "ingestDate": "2014-02-15T17:00:26.122359",
7
+ "ingestionSequence": 5,
8
+ "ingestType": "collection",
9
+ "@id": "http://dp.la/api/collections/460c76299e1b0a46afea352b1ab8f556",
10
+ "id": "460c76299e1b0a46afea352b1ab8f556"
11
+ }
12
+ ],
13
+ "count": 1
14
+ }
@@ -0,0 +1 @@
1
+ {"count":5,"start":0,"limit":10,"docs":[{"id":"460c76299e1b0a46afea352b1ab8f556","ingestDate":"2014-02-15T17:00:26.122359","_rev":"372-9d33a508d82b97621b456623321886b3","title":"Leslie Jones Collection","_id":"bpl--commonwealth:2j62s484w","ingestType":"collection","@id":"http://dp.la/api/collections/460c76299e1b0a46afea352b1ab8f556","ingestionSequence":5,"score":6.857883},{"id":"7c7eaa8eee08d3c9b32d55662c0de58b","ingestDate":"2014-02-05T03:09:43.108843","_rev":"137-6262bdd35a8cf3397aefed97d5f2731e","title":"Thomas Jones Davies Bible Records","_id":"scdl-usc--davies","ingestType":"collection","@id":"http://dp.la/api/collections/7c7eaa8eee08d3c9b32d55662c0de58b","ingestionSequence":7,"score":6.177192},{"id":"f807cdcefe2c93f7f71bf99f47899e1f","ingestDate":"2014-01-19T09:04:22.366278","_rev":"3-83d42699bd0836d639d948d921a73d66","title":"Kirby Jones Papers, 1963 - 1974","_id":"nara--1159","ingestType":"collection","@id":"http://dp.la/api/collections/f807cdcefe2c93f7f71bf99f47899e1f","ingestionSequence":5,"score":6.0006475},{"id":"c1ae618e5958fd9c9e869ebbfd47bc34","ingestDate":"2014-01-19T09:04:21.373908","_rev":"3-5f88173336cf37fb8e33ddbfb1c62705","title":"Joseph M. Jones Papers, 1928 - 1987","_id":"nara--604476","ingestType":"collection","@id":"http://dp.la/api/collections/c1ae618e5958fd9c9e869ebbfd47bc34","ingestionSequence":5,"score":5.391162},{"id":"e1e5fee5c47484e307ccdbb717a75e7f","ingestDate":"2014-01-30T12:12:19.274456","_rev":"4-6d0514009fcf0b2cc68a178fdf3209ac","title":"John Paul Jones papers, 1924-1999","_id":"smithsonian--john_paul_jones_papers_1924_1999","ingestType":"collection","@id":"http://dp.la/api/collections/e1e5fee5c47484e307ccdbb717a75e7f","ingestionSequence":8,"score":5.317501}],"facets":[]}
@@ -0,0 +1,65 @@
1
+ {
2
+ "count": 5,
3
+ "start": 0,
4
+ "limit": 10,
5
+ "docs": [
6
+ {
7
+ "id": "460c76299e1b0a46afea352b1ab8f556",
8
+ "ingestDate": "2014-02-15T17:00:26.122359",
9
+ "_rev": "372-9d33a508d82b97621b456623321886b3",
10
+ "title": "Leslie Jones Collection",
11
+ "_id": "bpl--commonwealth:2j62s484w",
12
+ "ingestType": "collection",
13
+ "@id": "http://dp.la/api/collections/460c76299e1b0a46afea352b1ab8f556",
14
+ "ingestionSequence": 5,
15
+ "score": 6.857883
16
+ },
17
+ {
18
+ "id": "7c7eaa8eee08d3c9b32d55662c0de58b",
19
+ "ingestDate": "2014-02-05T03:09:43.108843",
20
+ "_rev": "137-6262bdd35a8cf3397aefed97d5f2731e",
21
+ "title": "Thomas Jones Davies Bible Records",
22
+ "_id": "scdl-usc--davies",
23
+ "ingestType": "collection",
24
+ "@id": "http://dp.la/api/collections/7c7eaa8eee08d3c9b32d55662c0de58b",
25
+ "ingestionSequence": 7,
26
+ "score": 6.177192
27
+ },
28
+ {
29
+ "id": "f807cdcefe2c93f7f71bf99f47899e1f",
30
+ "ingestDate": "2014-01-19T09:04:22.366278",
31
+ "_rev": "3-83d42699bd0836d639d948d921a73d66",
32
+ "title": "Kirby Jones Papers, 1963 - 1974",
33
+ "_id": "nara--1159",
34
+ "ingestType": "collection",
35
+ "@id": "http://dp.la/api/collections/f807cdcefe2c93f7f71bf99f47899e1f",
36
+ "ingestionSequence": 5,
37
+ "score": 6.0006475
38
+ },
39
+ {
40
+ "id": "c1ae618e5958fd9c9e869ebbfd47bc34",
41
+ "ingestDate": "2014-01-19T09:04:21.373908",
42
+ "_rev": "3-5f88173336cf37fb8e33ddbfb1c62705",
43
+ "title": "Joseph M. Jones Papers, 1928 - 1987",
44
+ "_id": "nara--604476",
45
+ "ingestType": "collection",
46
+ "@id": "http://dp.la/api/collections/c1ae618e5958fd9c9e869ebbfd47bc34",
47
+ "ingestionSequence": 5,
48
+ "score": 5.391162
49
+ },
50
+ {
51
+ "id": "e1e5fee5c47484e307ccdbb717a75e7f",
52
+ "ingestDate": "2014-01-30T12:12:19.274456",
53
+ "_rev": "4-6d0514009fcf0b2cc68a178fdf3209ac",
54
+ "title": "John Paul Jones papers, 1924-1999",
55
+ "_id": "smithsonian--john_paul_jones_papers_1924_1999",
56
+ "ingestType": "collection",
57
+ "@id": "http://dp.la/api/collections/e1e5fee5c47484e307ccdbb717a75e7f",
58
+ "ingestionSequence": 8,
59
+ "score": 5.317501
60
+ }
61
+ ],
62
+ "facets": [
63
+
64
+ ]
65
+ }
@@ -0,0 +1,2 @@
1
+ :api_key: "fake_api_key"
2
+ :url: "http://fake.dp.la/v0/"
@@ -0,0 +1 @@
1
+ {"count":0,"start":0,"limit":10,"docs":[],"facets":[]}
@@ -0,0 +1 @@
1
+ {"docs":[{"_id":"bpl--oai:digitalcommonwealth.org:commonwealth:6682xj30d","dataProvider":"Boston Public Library","sourceResource":{"isPartOf":["Leslie Jones Collection","Leslie Jones Collection. Animals: Dogs & Cats"],"description":["Title from information provided by Leslie Jones or the Boston Public Library on the negative or negative sleeve.","Date supplied by cataloger."],"creator":"Jones, Leslie, 1886-1967","rights":"Copyright (c) Leslie Jones. This work is licensed for use under a Creative Commons Attribution Non-Commercial No Derivatives License (CC BY-NC-ND).","collection":[{"@id":"http://dp.la/api/collections/460c76299e1b0a46afea352b1ab8f556","id":"460c76299e1b0a46afea352b1ab8f556","title":"Leslie Jones Collection"}],"date":{"begin":"1917","end":"1934","displayDate":"1917-1934"},"extent":"1 negative : glass, black & white ; 4 x 5 in.","stateLocatedIn":[{"name":"Massachusetts"}],"title":"Kittens","identifier":["Local accession: 08_06_000884"],"type":"image","subject":[{"name":"Cats"},{"name":"Baby animals"}]},"object":"http://ark.digitalcommonwealth.org/ark:/50959/6682xj30d/thumbnail","ingestDate":"2014-02-15T15:10:38.797024","originalRecord":{"header":{"datestamp":"2013-09-20T14:14:36Z","identifier":"oai:digitalcommonwealth.org:commonwealth:6682xj30d","setSpec":"commonwealth:2j62s484w"},"metadata":{"mods:mods":{"mods:subject":[{"mods:topic":"Cats","authority":"lctgm"},{"mods:topic":"Baby animals","authority":"lctgm"}],"mods:genre":[{"displayLabel":"general","authorityURI":"http://id.loc.gov/vocabulary/graphicMaterials","#text":"Photographs","authority":"gmgpc","valueURI":"http://id.loc.gov/vocabulary/graphicMaterials/tgm007721"},{"displayLabel":"specific","authorityURI":"http://id.loc.gov/vocabulary/graphicMaterials","#text":"Glass negatives","authority":"gmgpc","valueURI":"http://id.loc.gov/vocabulary/graphicMaterials/tgm004561"}],"xmlns:mods":"http://www.loc.gov/mods/v3","mods:typeOfResource":"still image","mods:recordInfo":{"mods:languageOfCataloging":{"mods:languageTerm":{"authorityURI":"http://id.loc.gov/vocabulary/iso639-2","#text":"English","type":"text","authority":"iso639-2b","valueURI":"http://id.loc.gov/vocabulary/iso639-2/eng"}},"mods:descriptionStandard":{"#text":"gihc","authority":"marcdescription"},"mods:recordOrigin":"human prepared","mods:recordContentSource":"Boston Public Library"},"mods:titleInfo":{"usage":"primary","mods:title":"Kittens"},"mods:physicalDescription":{"mods:extent":"1 negative : glass, black & white ; 4 x 5 in.","mods:digitalOrigin":"reformatted digital","mods:internetMediaType":["image/tiff","image/jpeg"]},"mods:identifier":[{"#text":"08_06_000884","type":"local-accession"},{"#text":"http://ark.digitalcommonwealth.org/ark:/50959/6682xj30d","type":"uri"}],"version":"3.4","mods:note":["Title from information provided by Leslie Jones or the Boston Public Library on the negative or negative sleeve.","Date supplied by cataloger."],"mods:name":{"mods:namePart":["Jones, Leslie",{"#text":"1886-1967","type":"date"}],"mods:role":{"mods:roleTerm":{"authorityURI":"http://id.loc.gov/vocabulary/relators","#text":"Photographer","type":"text","authority":"marcrelator","valueURI":"http://id.loc.gov/vocabulary/relators/pht"}},"type":"personal","authority":"local"},"mods:location":[{"mods:physicalLocation":"Boston Public Library","mods:holdingSimple":{"mods:copyInformation":{"mods:subLocation":"Print Department"}}},{"mods:url":[{"access":"preview","#text":"http://ark.digitalcommonwealth.org/ark:/50959/6682xj30d/thumbnail"},{"usage":"primary","access":"object in context","#text":"http://ark.digitalcommonwealth.org/ark:/50959/6682xj30d"}]}],"mods:accessCondition":[{"#text":"Copyright (c) Leslie Jones.","type":"use and reproduction"},{"#text":"This work is licensed for use under a Creative Commons Attribution Non-Commercial No Derivatives License (CC BY-NC-ND).","type":"use and reproduction"}],"xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:xlink":"http://www.w3.org/1999/xlink","xsi:schemaLocation":"http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-4.xsd","mods:originInfo":{"mods:dateCreated":[{"encoding":"w3cdtf","#text":"1917","qualifier":"approximate","keyDate":"yes","point":"start"},{"encoding":"w3cdtf","#text":"1934","qualifier":"approximate","point":"end"}]},"mods:relatedItem":[{"type":"host","mods:titleInfo":{"mods:title":"Leslie Jones Collection"}},{"type":"series","mods:titleInfo":{"mods:title":"Animals: Dogs & Cats"}}]}},"id":"oai:digitalcommonwealth.org:commonwealth:6682xj30d","collection":[{"@id":"http://dp.la/api/collections/460c76299e1b0a46afea352b1ab8f556","id":"460c76299e1b0a46afea352b1ab8f556","title":"Leslie Jones Collection"}],"provider":{"@id":"http://dp.la/api/contributor/digital-commonwealth","name":"Digital Commonwealth"}},"ingestionSequence":5,"isShownAt":"http://ark.digitalcommonwealth.org/ark:/50959/6682xj30d","provider":{"@id":"http://dp.la/api/contributor/digital-commonwealth","name":"Digital Commonwealth"},"@context":{"begin":{"@id":"dpla:dateRangeStart","@type":"xsd:date"},"@vocab":"http://purl.org/dc/terms/","hasView":"edm:hasView","name":"xsd:string","object":"edm:object","dpla":"http://dp.la/terms/","collection":"dpla:aggregation","edm":"http://www.europeana.eu/schemas/edm/","end":{"@id":"dpla:end","@type":"xsd:date"},"state":"dpla:state","aggregatedDigitalResource":"dpla:aggregatedDigitalResource","coordinates":"dpla:coordinates","isShownAt":"edm:isShownAt","stateLocatedIn":"dpla:stateLocatedIn","sourceResource":"edm:sourceResource","dataProvider":"edm:dataProvider","originalRecord":"dpla:originalRecord","provider":"edm:provider","LCSH":"http://id.loc.gov/authorities/subjects"},"ingestType":"item","@id":"http://dp.la/api/items/9f695d8c16a4978061a25076a43aa11f","id":"9f695d8c16a4978061a25076a43aa11f"}],"count":1}
@@ -0,0 +1,272 @@
1
+ {
2
+ "docs": [
3
+ {
4
+ "_id": "bpl--oai:digitalcommonwealth.org:commonwealth:6682xj30d",
5
+ "dataProvider": "Boston Public Library",
6
+ "sourceResource": {
7
+ "isPartOf": [
8
+ "Leslie Jones Collection",
9
+ "Leslie Jones Collection. Animals: Dogs & Cats"
10
+ ],
11
+ "description": [
12
+ "Title from information provided by Leslie Jones or the Boston Public Library on the negative or negative sleeve.",
13
+ "Date supplied by cataloger."
14
+ ],
15
+ "creator": "Jones, Leslie, 1886-1967",
16
+ "rights": "Copyright (c) Leslie Jones. This work is licensed for use under a Creative Commons Attribution Non-Commercial No Derivatives License (CC BY-NC-ND).",
17
+ "collection": [
18
+ {
19
+ "@id": "http://dp.la/api/collections/460c76299e1b0a46afea352b1ab8f556",
20
+ "id": "460c76299e1b0a46afea352b1ab8f556",
21
+ "title": "Leslie Jones Collection"
22
+ }
23
+ ],
24
+ "date": {
25
+ "begin": "1917",
26
+ "end": "1934",
27
+ "displayDate": "1917-1934"
28
+ },
29
+ "extent": "1 negative : glass, black & white ; 4 x 5 in.",
30
+ "stateLocatedIn": [
31
+ {
32
+ "name": "Massachusetts"
33
+ }
34
+ ],
35
+ "title": "Kittens",
36
+ "identifier": [
37
+ "Local accession: 08_06_000884"
38
+ ],
39
+ "type": "image",
40
+ "subject": [
41
+ {
42
+ "name": "Cats"
43
+ },
44
+ {
45
+ "name": "Baby animals"
46
+ }
47
+ ]
48
+ },
49
+ "object": "http://ark.digitalcommonwealth.org/ark:/50959/6682xj30d/thumbnail",
50
+ "ingestDate": "2014-02-15T15:10:38.797024",
51
+ "originalRecord": {
52
+ "header": {
53
+ "datestamp": "2013-09-20T14:14:36Z",
54
+ "identifier": "oai:digitalcommonwealth.org:commonwealth:6682xj30d",
55
+ "setSpec": "commonwealth:2j62s484w"
56
+ },
57
+ "metadata": {
58
+ "mods:mods": {
59
+ "mods:subject": [
60
+ {
61
+ "mods:topic": "Cats",
62
+ "authority": "lctgm"
63
+ },
64
+ {
65
+ "mods:topic": "Baby animals",
66
+ "authority": "lctgm"
67
+ }
68
+ ],
69
+ "mods:genre": [
70
+ {
71
+ "displayLabel": "general",
72
+ "authorityURI": "http://id.loc.gov/vocabulary/graphicMaterials",
73
+ "#text": "Photographs",
74
+ "authority": "gmgpc",
75
+ "valueURI": "http://id.loc.gov/vocabulary/graphicMaterials/tgm007721"
76
+ },
77
+ {
78
+ "displayLabel": "specific",
79
+ "authorityURI": "http://id.loc.gov/vocabulary/graphicMaterials",
80
+ "#text": "Glass negatives",
81
+ "authority": "gmgpc",
82
+ "valueURI": "http://id.loc.gov/vocabulary/graphicMaterials/tgm004561"
83
+ }
84
+ ],
85
+ "xmlns:mods": "http://www.loc.gov/mods/v3",
86
+ "mods:typeOfResource": "still image",
87
+ "mods:recordInfo": {
88
+ "mods:languageOfCataloging": {
89
+ "mods:languageTerm": {
90
+ "authorityURI": "http://id.loc.gov/vocabulary/iso639-2",
91
+ "#text": "English",
92
+ "type": "text",
93
+ "authority": "iso639-2b",
94
+ "valueURI": "http://id.loc.gov/vocabulary/iso639-2/eng"
95
+ }
96
+ },
97
+ "mods:descriptionStandard": {
98
+ "#text": "gihc",
99
+ "authority": "marcdescription"
100
+ },
101
+ "mods:recordOrigin": "human prepared",
102
+ "mods:recordContentSource": "Boston Public Library"
103
+ },
104
+ "mods:titleInfo": {
105
+ "usage": "primary",
106
+ "mods:title": "Kittens"
107
+ },
108
+ "mods:physicalDescription": {
109
+ "mods:extent": "1 negative : glass, black & white ; 4 x 5 in.",
110
+ "mods:digitalOrigin": "reformatted digital",
111
+ "mods:internetMediaType": [
112
+ "image/tiff",
113
+ "image/jpeg"
114
+ ]
115
+ },
116
+ "mods:identifier": [
117
+ {
118
+ "#text": "08_06_000884",
119
+ "type": "local-accession"
120
+ },
121
+ {
122
+ "#text": "http://ark.digitalcommonwealth.org/ark:/50959/6682xj30d",
123
+ "type": "uri"
124
+ }
125
+ ],
126
+ "version": "3.4",
127
+ "mods:note": [
128
+ "Title from information provided by Leslie Jones or the Boston Public Library on the negative or negative sleeve.",
129
+ "Date supplied by cataloger."
130
+ ],
131
+ "mods:name": {
132
+ "mods:namePart": [
133
+ "Jones, Leslie",
134
+ {
135
+ "#text": "1886-1967",
136
+ "type": "date"
137
+ }
138
+ ],
139
+ "mods:role": {
140
+ "mods:roleTerm": {
141
+ "authorityURI": "http://id.loc.gov/vocabulary/relators",
142
+ "#text": "Photographer",
143
+ "type": "text",
144
+ "authority": "marcrelator",
145
+ "valueURI": "http://id.loc.gov/vocabulary/relators/pht"
146
+ }
147
+ },
148
+ "type": "personal",
149
+ "authority": "local"
150
+ },
151
+ "mods:location": [
152
+ {
153
+ "mods:physicalLocation": "Boston Public Library",
154
+ "mods:holdingSimple": {
155
+ "mods:copyInformation": {
156
+ "mods:subLocation": "Print Department"
157
+ }
158
+ }
159
+ },
160
+ {
161
+ "mods:url": [
162
+ {
163
+ "access": "preview",
164
+ "#text": "http://ark.digitalcommonwealth.org/ark:/50959/6682xj30d/thumbnail"
165
+ },
166
+ {
167
+ "usage": "primary",
168
+ "access": "object in context",
169
+ "#text": "http://ark.digitalcommonwealth.org/ark:/50959/6682xj30d"
170
+ }
171
+ ]
172
+ }
173
+ ],
174
+ "mods:accessCondition": [
175
+ {
176
+ "#text": "Copyright (c) Leslie Jones.",
177
+ "type": "use and reproduction"
178
+ },
179
+ {
180
+ "#text": "This work is licensed for use under a Creative Commons Attribution Non-Commercial No Derivatives License (CC BY-NC-ND).",
181
+ "type": "use and reproduction"
182
+ }
183
+ ],
184
+ "xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
185
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
186
+ "xsi:schemaLocation": "http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-4.xsd",
187
+ "mods:originInfo": {
188
+ "mods:dateCreated": [
189
+ {
190
+ "encoding": "w3cdtf",
191
+ "#text": "1917",
192
+ "qualifier": "approximate",
193
+ "keyDate": "yes",
194
+ "point": "start"
195
+ },
196
+ {
197
+ "encoding": "w3cdtf",
198
+ "#text": "1934",
199
+ "qualifier": "approximate",
200
+ "point": "end"
201
+ }
202
+ ]
203
+ },
204
+ "mods:relatedItem": [
205
+ {
206
+ "type": "host",
207
+ "mods:titleInfo": {
208
+ "mods:title": "Leslie Jones Collection"
209
+ }
210
+ },
211
+ {
212
+ "type": "series",
213
+ "mods:titleInfo": {
214
+ "mods:title": "Animals: Dogs & Cats"
215
+ }
216
+ }
217
+ ]
218
+ }
219
+ },
220
+ "id": "oai:digitalcommonwealth.org:commonwealth:6682xj30d",
221
+ "collection": [
222
+ {
223
+ "@id": "http://dp.la/api/collections/460c76299e1b0a46afea352b1ab8f556",
224
+ "id": "460c76299e1b0a46afea352b1ab8f556",
225
+ "title": "Leslie Jones Collection"
226
+ }
227
+ ],
228
+ "provider": {
229
+ "@id": "http://dp.la/api/contributor/digital-commonwealth",
230
+ "name": "Digital Commonwealth"
231
+ }
232
+ },
233
+ "ingestionSequence": 5,
234
+ "isShownAt": "http://ark.digitalcommonwealth.org/ark:/50959/6682xj30d",
235
+ "provider": {
236
+ "@id": "http://dp.la/api/contributor/digital-commonwealth",
237
+ "name": "Digital Commonwealth"
238
+ },
239
+ "@context": {
240
+ "begin": {
241
+ "@id": "dpla:dateRangeStart",
242
+ "@type": "xsd:date"
243
+ },
244
+ "@vocab": "http://purl.org/dc/terms/",
245
+ "hasView": "edm:hasView",
246
+ "name": "xsd:string",
247
+ "object": "edm:object",
248
+ "dpla": "http://dp.la/terms/",
249
+ "collection": "dpla:aggregation",
250
+ "edm": "http://www.europeana.eu/schemas/edm/",
251
+ "end": {
252
+ "@id": "dpla:end",
253
+ "@type": "xsd:date"
254
+ },
255
+ "state": "dpla:state",
256
+ "aggregatedDigitalResource": "dpla:aggregatedDigitalResource",
257
+ "coordinates": "dpla:coordinates",
258
+ "isShownAt": "edm:isShownAt",
259
+ "stateLocatedIn": "dpla:stateLocatedIn",
260
+ "sourceResource": "edm:sourceResource",
261
+ "dataProvider": "edm:dataProvider",
262
+ "originalRecord": "dpla:originalRecord",
263
+ "provider": "edm:provider",
264
+ "LCSH": "http://id.loc.gov/authorities/subjects"
265
+ },
266
+ "ingestType": "item",
267
+ "@id": "http://dp.la/api/items/9f695d8c16a4978061a25076a43aa11f",
268
+ "id": "9f695d8c16a4978061a25076a43aa11f"
269
+ }
270
+ ],
271
+ "count": 1
272
+ }