dpla-map 4.0.0.0.pre.1 → 4.0.0.0.pre.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dpla-map.gemspec +1 -1
- data/lib/dpla/map/agent.rb +3 -1
- data/lib/dpla/map/aggregation.rb +4 -5
- data/lib/dpla/map/collection.rb +2 -2
- data/lib/dpla/map/concept.rb +4 -1
- data/lib/dpla/map/factories.rb +47 -24
- data/lib/dpla/map/place.rb +11 -9
- data/lib/dpla/map/source_resource.rb +15 -24
- data/lib/dpla/map/time_span.rb +3 -2
- data/lib/dpla/map/version.rb +1 -1
- data/lib/dpla/map.rb +2 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85cd1fe3e6f70bf1970db072095aa0e9ef9dcb7f
|
4
|
+
data.tar.gz: 11d6a16b889ccc742651a03526e0feb81bd89ca5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c41dc82ba808ae2c9cf0db247ee93f7315584bbf2f0c106b78ad7bb7f09001e6c55d8cd5164af64c59c715cd4d30972d4dab0907646681e72c9c39eb8b1d429
|
7
|
+
data.tar.gz: 5e62e0d9164861cfd82bf31133a0d3db5b0d2d34cc21871909a486630676d7cb9e1b40b19cd5fd5585750d9ed508c3ba25ee54af2464a2d6c09c6fa82c79ae5c
|
data/dpla-map.gemspec
CHANGED
@@ -25,5 +25,5 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.add_development_dependency 'pry'
|
26
26
|
s.add_development_dependency 'pry-doc'
|
27
27
|
s.add_development_dependency 'pry-debugger'
|
28
|
-
s.add_development_dependency 'factory_girl', '~>4.0'
|
28
|
+
s.add_development_dependency 'factory_girl', '~>4.4.0'
|
29
29
|
end
|
data/lib/dpla/map/agent.rb
CHANGED
@@ -3,6 +3,8 @@ module DPLA::MAP
|
|
3
3
|
configure :type => RDF::EDM.Agent
|
4
4
|
|
5
5
|
property :label, :predicate => RDF::SKOS.prefLabel
|
6
|
-
property :
|
6
|
+
property :providedLabel, :predicate => RDF::DPLA.providedLabel
|
7
|
+
property :exactMatch, :predicate => RDF::SKOS.exactMatch
|
8
|
+
property :closeMatch, :predicate => RDF::SKOS.closeMatch
|
7
9
|
end
|
8
10
|
end
|
data/lib/dpla/map/aggregation.rb
CHANGED
@@ -2,18 +2,17 @@ module DPLA::MAP
|
|
2
2
|
class Aggregation < ActiveTriples::Resource
|
3
3
|
configure :type => RDF::ORE.Aggregation
|
4
4
|
|
5
|
-
validates_presence_of :
|
5
|
+
validates_presence_of :aggregatedCHO, :originalRecord, :isShownAt, :object, :provider
|
6
6
|
|
7
|
-
property :
|
8
|
-
property :dataProvider, :predicate => RDF::EDM.dataProvider
|
7
|
+
property :aggregatedCHO, :predicate => RDF::EDM.aggregatedCHO, :class_name => 'DPLA::MAP::SourceResource'
|
8
|
+
property :dataProvider, :predicate => RDF::EDM.dataProvider, :class_name => 'DPLA::MAP::Agent'
|
9
9
|
property :originalRecord, :predicate => RDF::DPLA.originalRecord
|
10
10
|
property :hasView, :predicate => RDF::EDM.hasView, :class_name => 'DPLA::MAP::WebResource'
|
11
|
-
property :intermediateProvider, :predicate => RDF::DPLA.intermediateProvider
|
11
|
+
property :intermediateProvider, :predicate => RDF::DPLA.intermediateProvider, :class_name => 'DPLA::MAP::Agent'
|
12
12
|
property :isShownAt, :predicate => RDF::EDM.isShownAt, :class_name => 'DPLA::MAP::WebResource'
|
13
13
|
property :object, :predicate => RDF::EDM.object, :class_name => 'DPLA::MAP::WebResource'
|
14
14
|
property :preview, :predicate => RDF::EDM.preview, :class_name => 'DPLA::MAP::WebResource'
|
15
15
|
property :provider, :predicate => RDF::EDM.provider, :class_name => 'DPLA::MAP::Agent'
|
16
16
|
property :rightsStatement, :predicate => RDF::EDM.rights, :class_name => 'DPLA::MAP::RightsStatement'
|
17
|
-
|
18
17
|
end
|
19
18
|
end
|
data/lib/dpla/map/collection.rb
CHANGED
@@ -2,7 +2,7 @@ module DPLA::MAP
|
|
2
2
|
class Collection < ActiveTriples::Resource
|
3
3
|
configure :base_uri => 'http://dp.la/api/collections/', :type => RDF::DCMITYPE.Collection
|
4
4
|
|
5
|
-
property :title, :predicate => RDF::
|
6
|
-
property :description, :predicate => RDF::
|
5
|
+
property :title, :predicate => RDF::DC.title
|
6
|
+
property :description, :predicate => RDF::DC.description
|
7
7
|
end
|
8
8
|
end
|
data/lib/dpla/map/concept.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
module DPLA::MAP
|
2
2
|
class Concept < ActiveTriples::Resource
|
3
3
|
configure :type => RDF::SKOS.Concept
|
4
|
-
|
4
|
+
|
5
5
|
property :prefLabel, :predicate => RDF::SKOS.prefLabel
|
6
|
+
property :providedLabel, :predicate => RDF::DPLA.providedLabel
|
7
|
+
property :exactMatch, :predicate => RDF::SKOS.exactMatch
|
8
|
+
property :closeMatch, :predicate => RDF::SKOS.closeMatch
|
6
9
|
property :note, :predicate => RDF::SKOS.note
|
7
10
|
property :scheme, :predicate => RDF::SKOS.inScheme
|
8
11
|
|
data/lib/dpla/map/factories.rb
CHANGED
@@ -3,38 +3,39 @@ require 'dpla/map'
|
|
3
3
|
FactoryGirl.define do
|
4
4
|
|
5
5
|
factory :source_resource, class: DPLA::MAP::SourceResource do
|
6
|
+
alternateTitle 'Stonewall Inn Graffiti'
|
6
7
|
collection { |collection| collection.association :collection, :strategy => :build }
|
7
|
-
contributor
|
8
|
-
|
9
|
-
|
10
|
-
subject ['Lesbians', 'Gay activists']
|
8
|
+
contributor { |person| person.association :agent, :strategy => :build }
|
9
|
+
creator { |person| person.association :agent, :label => 'Davies, Diana (1938-)', :strategy => :build }
|
10
|
+
date { |timespan| timespan.association :timespan, :strategy => :build }
|
11
11
|
description 'Window of the Stonewall Bar N.Y. 1969. The other half of the graffiti was erased by the time Diana photographed it.'
|
12
12
|
extent '10x12 cm'
|
13
13
|
format 'Silver Gelatin Print'
|
14
|
+
genre { |genre| genre.association :genre, :strategy => :build }
|
14
15
|
identifier '510d47e3-57d2-a3d9-e040-e00a18064a99'
|
15
16
|
language { |language| language.association :language, :strategy => :build }
|
16
17
|
place { |place| place.association :place, :strategy => :build }
|
17
|
-
publisher 'Penguin Books'
|
18
|
+
publisher { |agent| agent.association :agent, :label => 'Penguin Books', :strategy => :build }
|
18
19
|
relation ['Stonewall Inn [1]', 'Stonewall Inn [3]']
|
20
|
+
#replacedBy
|
21
|
+
#replaces
|
19
22
|
rights "The New York Public Library is interested in learning more about items you've seen on our websites or elsewhere online. If you have any more information about an item or its copyright status, we want to hear from you. Please contact DigitalCollections@nypl.org with your contact information and a link to the relevant content."
|
20
|
-
|
23
|
+
subject { |concept| concept.association :concept, :strategy => :build }
|
21
24
|
temporalCoverage '1969'
|
25
|
+
title 'Stonewall Inn [2]'
|
22
26
|
dctype { |type| type.association :dctype, :strategy => :build }
|
23
27
|
end
|
24
28
|
|
25
29
|
factory :aggregation, class: DPLA::MAP::Aggregation do
|
26
|
-
|
27
|
-
dataProvider 'Manuscripts and Archives Division. The New York Public Library'
|
28
|
-
originalRecord '
|
30
|
+
aggregatedCHO { |sr| sr.association :source_resource, :strategy => :build }
|
31
|
+
dataProvider { |agent| agent.association :agent, :label => 'Manuscripts and Archives Division. The New York Public Library', :strategy => :build }
|
32
|
+
originalRecord { RDF::URI('http://api.dp.la/originalRecord/12345') }
|
29
33
|
hasView { |wr| wr.association :web_resource, :strategy => :build }
|
30
|
-
intermediateProvider '
|
31
|
-
isShownAt 'http://digitalcollections.nypl.org/items/510d47e3-57d2-a3d9-e040-e00a18064a99'
|
32
|
-
object 'http://dp.la/item/116d5aaf3d77a5d7c5a6c7a3e10c5afe'
|
33
|
-
|
34
|
-
|
35
|
-
prov << RDF::Statement(prov, RDF::SKOS.prefLabel, "The New York Public Library")
|
36
|
-
prov
|
37
|
-
}
|
34
|
+
intermediateProvider { |agent| agent.association :agent, :label => 'The New York Public Library', :strategy => :build }
|
35
|
+
isShownAt { |wr| wr.association :web_resource, :strategy => :build } # 'http://digitalcollections.nypl.org/items/510d47e3-57d2-a3d9-e040-e00a18064a99'
|
36
|
+
object { |wr| wr.association :web_resource, :strategy => :build } # 'http://dp.la/item/116d5aaf3d77a5d7c5a6c7a3e10c5afe'
|
37
|
+
preview { |wr| wr.association :web_resource, :strategy => :build }
|
38
|
+
provider { |agent| agent.association :agent, :label => 'The New York Public Library', :strategy => :build }
|
38
39
|
rightsStatement { ActiveTriples::Resource.new('http://creativecommons.org/publicdomain/mark/1.0/') }
|
39
40
|
end
|
40
41
|
|
@@ -45,10 +46,19 @@ FactoryGirl.define do
|
|
45
46
|
end
|
46
47
|
|
47
48
|
factory :place, class: DPLA::MAP::Place do
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
label 'New York, NY'
|
50
|
+
providedLabel 'New York City'
|
51
|
+
lat '40.7127'
|
52
|
+
long '74.0059'
|
53
|
+
alt '10'
|
54
|
+
parentFeature { ActiveTriples::Resource.new('http://sws.geonames.org/5128638/') }
|
55
|
+
countryCode 'US'
|
56
|
+
exactMatch { ActiveTriples::Resource.new('http://sws.geonames.org/5128581/') }
|
57
|
+
end
|
58
|
+
|
59
|
+
factory :agent, class: DPLA::MAP::Agent do
|
60
|
+
label 'Norma Ford'
|
61
|
+
providedLabel 'Norma Ford'
|
52
62
|
end
|
53
63
|
|
54
64
|
factory :collection, class: DPLA::MAP::Collection do
|
@@ -56,6 +66,17 @@ FactoryGirl.define do
|
|
56
66
|
description 'Photographs of Diana Davies; LGBT and HIV/AIDS Activist Collections'
|
57
67
|
end
|
58
68
|
|
69
|
+
factory :concept, class: DPLA::MAP::Concept do
|
70
|
+
prefLabel 'Gay activists'
|
71
|
+
providedLabel 'Gay Activists'
|
72
|
+
end
|
73
|
+
|
74
|
+
factory :timespan, class: DPLA::MAP::TimeSpan do
|
75
|
+
providedLabel '1969.'
|
76
|
+
self.begin Date.new(1969)
|
77
|
+
self.end Date.new(1969, 12, 31)
|
78
|
+
end
|
79
|
+
|
59
80
|
factory :language, class: DPLA::MAP::Controlled::Language do
|
60
81
|
initialize_with do
|
61
82
|
new('eng')
|
@@ -75,8 +96,10 @@ FactoryGirl.define do
|
|
75
96
|
end
|
76
97
|
end
|
77
98
|
|
78
|
-
RSpec
|
79
|
-
|
80
|
-
|
99
|
+
if defined?(RSpec)
|
100
|
+
RSpec.configure do |config|
|
101
|
+
config.before(:suite) do
|
102
|
+
FactoryGirl.lint
|
103
|
+
end
|
81
104
|
end
|
82
105
|
end
|
data/lib/dpla/map/place.rb
CHANGED
@@ -2,15 +2,17 @@ module DPLA::MAP
|
|
2
2
|
class Place < ActiveTriples::Resource
|
3
3
|
configure :type => RDF::EDM.Place
|
4
4
|
|
5
|
-
validates_presence_of :
|
5
|
+
validates_presence_of :label
|
6
6
|
|
7
|
-
property :
|
8
|
-
property :
|
9
|
-
property :
|
10
|
-
property :
|
11
|
-
property :
|
12
|
-
property :
|
13
|
-
property :
|
14
|
-
|
7
|
+
property :label, :predicate => RDF::SKOS.prefLabel
|
8
|
+
property :providedLabel, :predicate => RDF::DPLA.providedLabel
|
9
|
+
property :lat, :predicate => RDF::GEO.lat
|
10
|
+
property :long, :predicate => RDF::GEO.long
|
11
|
+
property :alt, :predicate => RDF::GEO.alt
|
12
|
+
#property :geometry, :predicate => RDF::GEOJSON.geometry, :class_name => DPLA::MAP::Geometry
|
13
|
+
property :parentFeature, :predicate => RDF::GN.parentFeature, :class_name => 'DPLA::MAP::Place'
|
14
|
+
property :countryCode, :predicate => RDF::GN.countryCode
|
15
|
+
property :exactMatch, :predicate => RDF::SKOS.exactMatch
|
16
|
+
property :closeMatch, :predicate => RDF::SKOS.closeMatch
|
15
17
|
end
|
16
18
|
end
|
@@ -5,35 +5,26 @@ module DPLA::MAP
|
|
5
5
|
validates_presence_of :rights, :title
|
6
6
|
validates_vocabulary_of :dctype, :genre, :language
|
7
7
|
|
8
|
-
property :
|
8
|
+
property :alternative, :predicate => RDF::DC.alternative
|
9
9
|
property :collection, :predicate => RDF::DC.isPartOf, :class_name => 'DPLA::MAP::Collection'
|
10
|
-
property :contributor, :predicate => RDF::
|
11
|
-
property :creator, :predicate => RDF::
|
10
|
+
property :contributor, :predicate => RDF::DC.contributor, :class_name => 'DPLA::MAP::Agent'
|
11
|
+
property :creator, :predicate => RDF::DC.creator, :class_name => 'DPLA::MAP::Agent'
|
12
12
|
property :date, :predicate => RDF::DC11.date, :class_name => 'DPLA::MAP::TimeSpan'
|
13
|
-
property :description, :predicate => RDF::
|
13
|
+
property :description, :predicate => RDF::DC.description
|
14
14
|
property :extent, :predicate => RDF::DC.extent
|
15
|
-
property :format, :predicate => RDF::DC11.format
|
16
|
-
property :
|
15
|
+
property :format, :predicate => RDF::DC11.format
|
16
|
+
property :genre, :predicate => RDF::EDM.hasType, :class_name => 'DPLA::MAP::Controlled::Genre'
|
17
|
+
property :identifier, :predicate => RDF::DC11.identifier
|
17
18
|
property :language, :predicate => RDF::DC.language, :class_name => 'DPLA::MAP::Controlled::Language'
|
18
|
-
property :
|
19
|
-
property :publisher, :predicate => RDF::
|
20
|
-
property :relation, :predicate => RDF::DC11.relation
|
21
|
-
property :
|
22
|
-
property :replaces, :predicate => RDF::
|
19
|
+
property :spatial, :predicate => RDF::DC.spatial, :class_name => 'DPLA::MAP::Place'
|
20
|
+
property :publisher, :predicate => RDF::DC.publisher, :class_name => 'DPLA::MAP::Agent'
|
21
|
+
property :relation, :predicate => RDF::DC11.relation
|
22
|
+
property :isReplacedBy, :predicate => RDF::DPLA.isReplacedBy
|
23
|
+
property :replaces, :predicate => RDF::DPLA.replaces
|
23
24
|
property :rights, :predicate => RDF::DC11.rights
|
24
|
-
property :genre, :predicate => RDF::EDM.hasType, :class_name => 'DPLA::MAP::Controlled::Genre'
|
25
25
|
property :subject, :predicate => RDF::DC.subject, :class_name => 'DPLA::MAP::Concept'
|
26
|
-
property :
|
27
|
-
property :title, :predicate => RDF::
|
28
|
-
property :dctype, :predicate => RDF::
|
29
|
-
|
30
|
-
# formal rights statements
|
31
|
-
# property :rights, :predicate => RDF::DC.rights, :class_name => 'DPLA::RightsStatement'
|
32
|
-
|
33
|
-
# languages w/ better handling of the controlled vocab?
|
34
|
-
# property :languageControlled, :predicate => RDF::DC.language, :class_name => 'DPLA::Controlled::Language'
|
35
|
-
|
36
|
-
# controlled vocab on type
|
37
|
-
# property :dcmitype, :predicate => RDF::DC.type, :class_name => 'DPLA::Controlled::DCMIType'
|
26
|
+
property :temporal, :predicate => RDF::DC.temporal, :class_name => 'DPLA::MAP::TimeSpan'
|
27
|
+
property :title, :predicate => RDF::DC.title
|
28
|
+
property :dctype, :predicate => RDF::DC.type, :class_name => 'DPLA::MAP::Controlled::DCMIType'
|
38
29
|
end
|
39
30
|
end
|
data/lib/dpla/map/time_span.rb
CHANGED
@@ -2,8 +2,9 @@ module DPLA::MAP
|
|
2
2
|
class TimeSpan < ActiveTriples::Resource
|
3
3
|
configure :type => RDF::EDM.TimeSpan
|
4
4
|
|
5
|
-
validates_presence_of :
|
6
|
-
|
5
|
+
validates_presence_of :providedLabel
|
6
|
+
|
7
|
+
property :providedLabel, :predicate => RDF::DPLA.providedLabel
|
7
8
|
property :begin, :predicate => RDF::EDM.begin
|
8
9
|
property :end, :predicate => RDF::EDM.end
|
9
10
|
end
|
data/lib/dpla/map/version.rb
CHANGED
data/lib/dpla/map.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dpla-map
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.0.pre.
|
4
|
+
version: 4.0.0.0.pre.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Johnson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active-triples
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 4.4.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 4.4.0
|
111
111
|
description: DPLA's metadata application profile in ActiveTriples.
|
112
112
|
email: tom@dp.la
|
113
113
|
executables: []
|