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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8ebd5e84c95f802530ade9eb09ee8a8790d6e053
4
- data.tar.gz: 8a431e821e1e7dc0e81172cfef1d5b613a05989f
3
+ metadata.gz: 85cd1fe3e6f70bf1970db072095aa0e9ef9dcb7f
4
+ data.tar.gz: 11d6a16b889ccc742651a03526e0feb81bd89ca5
5
5
  SHA512:
6
- metadata.gz: 93111c3fd951e3dd37449412590975f6dd887bd814466ca86777b89a9a3054da550cb11225a3d670717dde2b4ab6338a39a3a4eb3f95c8b5b3b619f3684baa22
7
- data.tar.gz: 88b91dacc8b6629fde2387bf21c9e198322c1c48cab3a2f61a75bdb62b1d4c35a53741ea769d21725154bb0b88d2ee5f52a7a23d6be6898394ac919fba129b89
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
@@ -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 :sameAs, :predicate => RDF::OWL.sameAs
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
@@ -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 :aggregatedSourceResource, :originalRecord, :isShownAt, :object, :provider
5
+ validates_presence_of :aggregatedCHO, :originalRecord, :isShownAt, :object, :provider
6
6
 
7
- property :aggregatedSourceResource, :predicate => RDF::EDM.aggregatedCHO, :class_name => 'DPLA::MAP::SourceResource'
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
@@ -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::DC11.title # any real reason not to use dcterms here? RDF::DC.title
6
- property :description, :predicate => RDF::DC11.description # any reason not to use dcterms here? RDF::DC.description
5
+ property :title, :predicate => RDF::DC.title
6
+ property :description, :predicate => RDF::DC.description
7
7
  end
8
8
  end
@@ -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
 
@@ -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 'Norma Ford'
8
- title 'Stonewall Inn [2]'
9
- creator 'Davies, Diana (1938-)'
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
- genre { |genre| genre.association :genre, :strategy => :build }
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
- aggregatedSourceResource { |sr| sr.association :source_resource, :strategy => :build }
27
- dataProvider 'Manuscripts and Archives Division. The New York Public Library'
28
- originalRecord '<record><title>Stonewall Inn [2]</title></record>'
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 'NYPL'
31
- isShownAt 'http://digitalcollections.nypl.org/items/510d47e3-57d2-a3d9-e040-e00a18064a99'
32
- object 'http://dp.la/item/116d5aaf3d77a5d7c5a6c7a3e10c5afe'
33
- provider {
34
- prov = ActiveTriples::Resource.new('http://dp.la/api/contributor/nypl')
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
- name 'New York, NY'
49
- # city 'New York'
50
- # county 'New York County'
51
- # coordinates '40.7127, 74.0059'
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.configure do |config|
79
- config.before(:suite) do
80
- FactoryGirl.lint
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
@@ -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 :name # validates_cardinality_of ... :count => 1?
5
+ validates_presence_of :label
6
6
 
7
- property :name, :predicate => RDF::SKOS.prefLabel
8
- property :latitude, :predicate => RDF::GEO.lat
9
- property :longitude, :predicate => RDF::GEO.long
10
- property :altitude, :predicate => RDF::GEO.alt
11
- property :parentFeature, :predicate => RDF::GN.parentFeature
12
- property :parentCountry, :predicate => RDF::GN.countryCode
13
- property :sameAs, :predicate => RDF::OWL.sameAs
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 :alternateTitle, :predicate => RDF::DC.alternative
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::DC11.contributor, :class_name => 'DPLA::MAP::Agent' # literal and/or URI
11
- property :creator, :predicate => RDF::DC11.creator, :class_name => 'DPLA::MAP::Agent' # literal and/or URI
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::DC11.description # any reason not to use dcterms here? RDF::DC.description
13
+ property :description, :predicate => RDF::DC.description
14
14
  property :extent, :predicate => RDF::DC.extent
15
- property :format, :predicate => RDF::DC11.format # literal and/or URI
16
- property :identifier, :predicate => RDF::DC11.identifier # literal and/or URI
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 :place, :predicate => RDF::DC.spatial, :class_name => 'DPLA::MAP::Place' # literal and/or URI
19
- property :publisher, :predicate => RDF::DC11.publisher # literal and/or URI
20
- property :relation, :predicate => RDF::DC11.relation # literal and/or URI
21
- property :replacedBy, :predicate => RDF::DC.isReplacedBy # literal and/or URI
22
- property :replaces, :predicate => RDF::DC.replaces # literal and/or URI
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 :temporalCoverage, :predicate => RDF::DC.temporal # literal and/or URI
27
- property :title, :predicate => RDF::DC11.title # any reason not to use dcterms here? RDF::DC.title
28
- property :dctype, :predicate => RDF::DC11.type, :class_name => 'DPLA::MAP::Controlled::DCMIType'
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
@@ -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 :originalSourceDate # validates_cardinality_of ... :count => 1?
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
@@ -1,6 +1,6 @@
1
1
  module DPLA
2
2
  module MAP
3
- VERSION = '4.0.0.0.pre.1'
3
+ VERSION = '4.0.0.0.pre.2'
4
4
  end
5
5
  end
6
6
 
data/lib/dpla/map.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  require 'active_triples'
2
2
  require 'linked_vocabs'
3
3
 
4
+ require 'date'
5
+
4
6
  require 'rdf/dpla'
5
7
 
6
8
  require 'rdf/aat'
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.1
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-20 00:00:00.000000000 Z
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: '4.0'
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: '4.0'
110
+ version: 4.4.0
111
111
  description: DPLA's metadata application profile in ActiveTriples.
112
112
  email: tom@dp.la
113
113
  executables: []