ansr 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +2 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +127 -0
- data/ansr.gemspec +23 -0
- data/ansr_dpla/README.md +59 -0
- data/ansr_dpla/ansr_dpla.gemspec +27 -0
- data/ansr_dpla/app/models/collection.rb +2 -0
- data/ansr_dpla/app/models/item.rb +2 -0
- data/ansr_dpla/fixtures/collection.json +1 -0
- data/ansr_dpla/fixtures/collection.jsonld +14 -0
- data/ansr_dpla/fixtures/collections.json +1 -0
- data/ansr_dpla/fixtures/collections.jsonld +65 -0
- data/ansr_dpla/fixtures/dpla.yml +2 -0
- data/ansr_dpla/fixtures/empty.jsonld +1 -0
- data/ansr_dpla/fixtures/item.json +1 -0
- data/ansr_dpla/fixtures/item.jsonld +272 -0
- data/ansr_dpla/fixtures/kittens.json +1 -0
- data/ansr_dpla/fixtures/kittens.jsonld +2477 -0
- data/ansr_dpla/fixtures/kittens_faceted.json +1 -0
- data/ansr_dpla/fixtures/kittens_faceted.jsonld +2693 -0
- data/ansr_dpla/lib/ansr_dpla.rb +6 -0
- data/ansr_dpla/lib/ansr_dpla/api.rb +78 -0
- data/ansr_dpla/lib/ansr_dpla/arel.rb +8 -0
- data/ansr_dpla/lib/ansr_dpla/arel/big_table.rb +104 -0
- data/ansr_dpla/lib/ansr_dpla/arel/connection.rb +81 -0
- data/ansr_dpla/lib/ansr_dpla/arel/query_builder.rb +131 -0
- data/ansr_dpla/lib/ansr_dpla/model.rb +7 -0
- data/ansr_dpla/lib/ansr_dpla/model/base.rb +17 -0
- data/ansr_dpla/lib/ansr_dpla/model/pseudo_associate.rb +14 -0
- data/ansr_dpla/lib/ansr_dpla/model/querying.rb +38 -0
- data/ansr_dpla/spec/adpla_test_api.rb +9 -0
- data/ansr_dpla/spec/lib/api_spec.rb +110 -0
- data/ansr_dpla/spec/lib/item_spec.rb +57 -0
- data/ansr_dpla/spec/lib/relation/facet_spec.rb +74 -0
- data/ansr_dpla/spec/lib/relation/select_spec.rb +52 -0
- data/ansr_dpla/spec/lib/relation/where_spec.rb +74 -0
- data/ansr_dpla/spec/lib/relation_spec.rb +305 -0
- data/ansr_dpla/spec/spec_helper.rb +36 -0
- data/ansr_dpla/test/debug.rb +14 -0
- data/ansr_dpla/test/system.rb +50 -0
- data/lib/ansr.rb +16 -0
- data/lib/ansr/.DS_Store +0 -0
- data/lib/ansr/arel.rb +5 -0
- data/lib/ansr/arel/big_table.rb +24 -0
- data/lib/ansr/base.rb +29 -0
- data/lib/ansr/configurable.rb +20 -0
- data/lib/ansr/model.rb +159 -0
- data/lib/ansr/model/connection.rb +103 -0
- data/lib/ansr/model/connection_handler.rb +20 -0
- data/lib/ansr/relation.rb +121 -0
- data/lib/ansr/relation/arel_methods.rb +14 -0
- data/lib/ansr/relation/query_methods.rb +156 -0
- data/lib/ansr/sanitization.rb +36 -0
- data/lib/ansr/version.rb +6 -0
- metadata +196 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,127 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
ansr (0.0.1)
|
5
|
+
blacklight (>= 5.1.0)
|
6
|
+
loggable
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: http://rubygems.org/
|
10
|
+
specs:
|
11
|
+
actionmailer (4.0.3)
|
12
|
+
actionpack (= 4.0.3)
|
13
|
+
mail (~> 2.5.4)
|
14
|
+
actionpack (4.0.3)
|
15
|
+
activesupport (= 4.0.3)
|
16
|
+
builder (~> 3.1.0)
|
17
|
+
erubis (~> 2.7.0)
|
18
|
+
rack (~> 1.5.2)
|
19
|
+
rack-test (~> 0.6.2)
|
20
|
+
activemodel (4.0.3)
|
21
|
+
activesupport (= 4.0.3)
|
22
|
+
builder (~> 3.1.0)
|
23
|
+
activerecord (4.0.3)
|
24
|
+
activemodel (= 4.0.3)
|
25
|
+
activerecord-deprecated_finders (~> 1.0.2)
|
26
|
+
activesupport (= 4.0.3)
|
27
|
+
arel (~> 4.0.0)
|
28
|
+
activerecord-deprecated_finders (1.0.3)
|
29
|
+
activesupport (4.0.3)
|
30
|
+
i18n (~> 0.6, >= 0.6.4)
|
31
|
+
minitest (~> 4.2)
|
32
|
+
multi_json (~> 1.3)
|
33
|
+
thread_safe (~> 0.1)
|
34
|
+
tzinfo (~> 0.3.37)
|
35
|
+
arel (4.0.2)
|
36
|
+
atomic (1.1.14)
|
37
|
+
blacklight (5.1.0)
|
38
|
+
bootstrap-sass (~> 3.0)
|
39
|
+
deprecation
|
40
|
+
kaminari (~> 0.13)
|
41
|
+
nokogiri (~> 1.6)
|
42
|
+
rails (>= 3.2.6, < 5)
|
43
|
+
rsolr (~> 1.0.6)
|
44
|
+
sass-rails
|
45
|
+
bootstrap-sass (3.1.1.0)
|
46
|
+
sass (~> 3.2)
|
47
|
+
builder (3.1.4)
|
48
|
+
deprecation (0.1.0)
|
49
|
+
activesupport
|
50
|
+
diff-lcs (1.2.5)
|
51
|
+
erubis (2.7.0)
|
52
|
+
hike (1.2.3)
|
53
|
+
i18n (0.6.9)
|
54
|
+
kaminari (0.15.1)
|
55
|
+
actionpack (>= 3.0.0)
|
56
|
+
activesupport (>= 3.0.0)
|
57
|
+
loggable (0.3.0)
|
58
|
+
mail (2.5.4)
|
59
|
+
mime-types (~> 1.16)
|
60
|
+
treetop (~> 1.4.8)
|
61
|
+
mime-types (1.25.1)
|
62
|
+
mini_portile (0.5.2)
|
63
|
+
minitest (4.7.5)
|
64
|
+
multi_json (1.8.4)
|
65
|
+
nokogiri (1.6.1)
|
66
|
+
mini_portile (~> 0.5.0)
|
67
|
+
polyglot (0.3.4)
|
68
|
+
rack (1.5.2)
|
69
|
+
rack-test (0.6.2)
|
70
|
+
rack (>= 1.0)
|
71
|
+
rails (4.0.3)
|
72
|
+
actionmailer (= 4.0.3)
|
73
|
+
actionpack (= 4.0.3)
|
74
|
+
activerecord (= 4.0.3)
|
75
|
+
activesupport (= 4.0.3)
|
76
|
+
bundler (>= 1.3.0, < 2.0)
|
77
|
+
railties (= 4.0.3)
|
78
|
+
sprockets-rails (~> 2.0.0)
|
79
|
+
railties (4.0.3)
|
80
|
+
actionpack (= 4.0.3)
|
81
|
+
activesupport (= 4.0.3)
|
82
|
+
rake (>= 0.8.7)
|
83
|
+
thor (>= 0.18.1, < 2.0)
|
84
|
+
rake (10.1.1)
|
85
|
+
rsolr (1.0.9)
|
86
|
+
builder (>= 2.1.2)
|
87
|
+
rspec (2.14.1)
|
88
|
+
rspec-core (~> 2.14.0)
|
89
|
+
rspec-expectations (~> 2.14.0)
|
90
|
+
rspec-mocks (~> 2.14.0)
|
91
|
+
rspec-core (2.14.7)
|
92
|
+
rspec-expectations (2.14.5)
|
93
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
94
|
+
rspec-mocks (2.14.6)
|
95
|
+
sass (3.2.14)
|
96
|
+
sass-rails (4.0.1)
|
97
|
+
railties (>= 4.0.0, < 5.0)
|
98
|
+
sass (>= 3.1.10)
|
99
|
+
sprockets-rails (~> 2.0.0)
|
100
|
+
sprockets (2.11.0)
|
101
|
+
hike (~> 1.2)
|
102
|
+
multi_json (~> 1.0)
|
103
|
+
rack (~> 1.0)
|
104
|
+
tilt (~> 1.1, != 1.3.0)
|
105
|
+
sprockets-rails (2.0.1)
|
106
|
+
actionpack (>= 3.0)
|
107
|
+
activesupport (>= 3.0)
|
108
|
+
sprockets (~> 2.8)
|
109
|
+
thor (0.18.1)
|
110
|
+
thread_safe (0.1.3)
|
111
|
+
atomic
|
112
|
+
tilt (1.4.1)
|
113
|
+
treetop (1.4.15)
|
114
|
+
polyglot
|
115
|
+
polyglot (>= 0.3.1)
|
116
|
+
tzinfo (0.3.38)
|
117
|
+
yard (0.8.7.3)
|
118
|
+
|
119
|
+
PLATFORMS
|
120
|
+
ruby
|
121
|
+
|
122
|
+
DEPENDENCIES
|
123
|
+
ansr!
|
124
|
+
bundler (>= 1.0.14)
|
125
|
+
rake
|
126
|
+
rspec
|
127
|
+
yard
|
data/ansr.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'lib/ansr/version')
|
2
|
+
Gem::Specification.new do |spec|
|
3
|
+
spec.name = 'ansr'
|
4
|
+
spec.version = Ansr.version
|
5
|
+
spec.platform = Gem::Platform::RUBY
|
6
|
+
spec.authors = ["Benjamin Armintor"]
|
7
|
+
spec.email = ["armintor@gmail.com"]
|
8
|
+
spec.summary = 'ActiveRecord-style relations for no-sql data sources'
|
9
|
+
spec.description = 'Wrapping the no-sql data sources in Rails-like models and relations'
|
10
|
+
spec.homepage = 'http://github.com/barmintor/ansr'
|
11
|
+
spec.files = `git ls-files`.split("\n")
|
12
|
+
spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
13
|
+
spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
14
|
+
spec.require_paths = ["lib"]
|
15
|
+
|
16
|
+
spec.add_dependency 'loggable'
|
17
|
+
spec.add_dependency 'blacklight', '>=5.1.0'
|
18
|
+
|
19
|
+
spec.add_development_dependency("rake")
|
20
|
+
spec.add_development_dependency("bundler", ">= 1.0.14")
|
21
|
+
spec.add_development_dependency("rspec")
|
22
|
+
spec.add_development_dependency("yard")
|
23
|
+
end
|
data/ansr_dpla/README.md
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
adpla
|
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/).
|
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 '
|
11
|
+
spec.homepage = 'http://github.com/barmintor/ansr/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 @@
|
|
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 @@
|
|
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
|
+
}
|