dpla-map 4.0.0.0.pre.3 → 4.0.0.0.pre.4

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: 1594a6d34f27a1d2a99da5ccbe5446a50cc58fa9
4
- data.tar.gz: 2eec2f91bc5708dda8dcb455256e4a907b0a865c
3
+ metadata.gz: 29207620b07fc4db2105b07547939fbe6f3bf479
4
+ data.tar.gz: 4cadc4f43b2970942a6721a1b306670bed61b4d6
5
5
  SHA512:
6
- metadata.gz: fbb9e7dedca43f8f9d87561ef2d68d10785582253598e21aa6c09a1c83100c32c4913a90c003cd8ad8c190c66e9b02336e9582f685a4d5c8271be06374b97eb5
7
- data.tar.gz: e4b1f19ef4236012a524ce6b3480c5f6ec0d37d0de06a3d5787b1224787d46255ebb01a8b909548acbd349c20d06fd5e10c165ffeb76ee57de1d5fe547c85369
6
+ metadata.gz: 267b7d03a6ba19f051938d5b9c91487952d135f264b622bbcfdab8b8d226104ac91e160647ff81dda0d316f88368ae7ae2f2b0327e98375c8131cb90e9791cda
7
+ data.tar.gz: a46ab9ffa0f185e81abe2bb30e7257875ed3edf24f165dab2611226877616ee91fa9580bb9a2398c4c4793b3717c51353ef41649b0f42b795803d827e26e2e0e
data/lib/dpla/map.rb CHANGED
@@ -29,6 +29,8 @@ module DPLA
29
29
  autoload :Agent, 'dpla/map/agent'
30
30
  autoload :Concept, 'dpla/map/concept'
31
31
  autoload :RightsStatement, 'dpla/map/rights_statement'
32
+ autoload :CONTEXT, 'dpla/map/context'
33
+ autoload :FRAME, 'dpla/map/frame'
32
34
 
33
35
  autoload :Controlled, 'dpla/map/controlled'
34
36
 
@@ -14,5 +14,9 @@ module DPLA::MAP
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
+ def jsonld_context
19
+ DPLA::MAP::CONTEXT['@context']
20
+ end
17
21
  end
18
22
  end
@@ -0,0 +1,78 @@
1
+ module DPLA::MAP
2
+ CONTEXT = JSON.parse('
3
+ {
4
+ "@context": {
5
+ "aat": "http://vocab.getty.edu/aat/",
6
+ "dc": "http://purl.org/dc/terms/",
7
+ "dc11": "http://purl.org/dc/elements/1.1/",
8
+ "dcmitype": "http://purl.org/dc/dcmitype/",
9
+ "dpla": "http://dp.la/about/map/",
10
+ "edm": "http://www.europeana.eu/schemas/edm/",
11
+ "iso_639_3": "http://lexvo.org/id/iso639-3/",
12
+ "ore": "http://www.openarchives.org/ore/terms/",
13
+ "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
14
+ "skos": "http://www.w3.org/2004/02/skos/core#",
15
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
16
+ "alternative": "dc:alternative",
17
+ "collection": "dc:isPartOf",
18
+ "creator": "dc:creator",
19
+ "contributor": "dc:contributor",
20
+ "description": "dc:description",
21
+ "language": "dc:language",
22
+ "spatial": "dc:spatial",
23
+ "title": "dc:title",
24
+ "publisher": "dc:publisher",
25
+ "extent": "dc:extent",
26
+ "type": "dc:type",
27
+ "temporal": "dc:temporal",
28
+ "subject": "dc:subject",
29
+ "date": "dc11:date",
30
+ "identifier": "dc11:identifier",
31
+ "format": "dc11:format",
32
+ "rights": "dc11:rights",
33
+ "relation": "dc11:relation",
34
+ "WebResource": "edm:WebResource",
35
+ "sourceResource": "edm:aggregatedCHO",
36
+ "dataProvider": "edm:dataProvider",
37
+ "hasView": "edm:hasView",
38
+ "object": "edm:object",
39
+ "provider": "edm:provider",
40
+ "preview": "edm:preview",
41
+ "genre": "edm:hasType",
42
+ "isShownAt": "edm:isShownAt",
43
+ "begin": {
44
+ "@id": "edm:begin",
45
+ "@type": "xsd:date"
46
+ },
47
+ "end": {
48
+ "@id": "edm:end",
49
+ "@type": "xsd:date"
50
+ },
51
+ "rightsStatement": "edm:rights",
52
+ "SourceResource": "dpla:SourceResource",
53
+ "intermediateProvider": "dpla:intermediateProvider",
54
+ "providedLabel": "dpla:providedLabel",
55
+ "originalRecord": {
56
+ "@id": "dpla:originalRecord",
57
+ "@type": "@id"
58
+ },
59
+ "isReplacedBy": "dpla:isReplacedBy",
60
+ "replaces": "dpla:replaces",
61
+ "Aggregation": "ore:Aggregation",
62
+ "name": "skos:prefLabel",
63
+ "exactMatch": {
64
+ "@id": "skos:exactMatch",
65
+ "@type": "@id"
66
+ },
67
+ "closeMatch": {
68
+ "@id": "skos:closeMatch",
69
+ "@type": "@id"
70
+ },
71
+ "note": "skos:note",
72
+ "inScheme": {
73
+ "@id": "skos:inScheme",
74
+ "@type": "@id"
75
+ }
76
+ }
77
+ }')
78
+ end
@@ -32,9 +32,9 @@ FactoryGirl.define do
32
32
  originalRecord { RDF::URI('http://api.dp.la/originalRecord/12345') }
33
33
  hasView { |wr| wr.association :web_resource, :strategy => :build }
34
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 }
35
+ isShownAt { |wr| wr.association :isShownAt, :strategy => :build }
36
+ object { |wr| wr.association :object, :strategy => :build }
37
+ preview { |wr| wr.association :preview, :strategy => :build }
38
38
  provider { |agent| agent.association :agent, :label => 'The New York Public Library', :strategy => :build }
39
39
  rightsStatement { ActiveTriples::Resource.new('http://creativecommons.org/publicdomain/mark/1.0/') }
40
40
  end
@@ -43,8 +43,21 @@ FactoryGirl.define do
43
43
  format 'image/tiff'
44
44
  rights 'Public Domain'
45
45
  rightsStatement { ActiveTriples::Resource.new('http://creativecommons.org/publicdomain/mark/1.0/') }
46
+
47
+ factory :preview do
48
+ initialize_with { new('http://images.nypl.org/index.php?id=1582254&t=t') }
49
+ end
50
+
51
+ factory :object do
52
+ initialize_with { new('http://dp.la/item/116d5aaf3d77a5d7c5a6c7a3e10c5afe') }
53
+ end
54
+
55
+ factory :isShownAt do
56
+ initialize_with { new('http://digitalcollections.nypl.org/items/510d47e3-57d2-a3d9-e040-e00a18064a99') }
57
+ end
46
58
  end
47
59
 
60
+
48
61
  factory :place, class: DPLA::MAP::Place do
49
62
  label 'New York, NY'
50
63
  providedLabel 'New York City'
@@ -77,19 +90,19 @@ FactoryGirl.define do
77
90
  self.end Date.new(1969, 12, 31)
78
91
  end
79
92
 
80
- factory :language, class: DPLA::MAP::Controlled::Language do
93
+ factory :language, class: DPLA::MAP::Controlled::Language do
81
94
  initialize_with do
82
95
  new('eng')
83
96
  end
84
97
  end
85
98
 
86
- factory :dctype, class: DPLA::MAP::Controlled::DCMIType do
99
+ factory :dctype, class: DPLA::MAP::Controlled::DCMIType do
87
100
  initialize_with do
88
101
  new('Image')
89
102
  end
90
103
  end
91
104
 
92
- factory :genre, class: DPLA::MAP::Controlled::Genre do
105
+ factory :genre, class: DPLA::MAP::Controlled::Genre do
93
106
  initialize_with do
94
107
  new('300132472')
95
108
  end
@@ -0,0 +1,5 @@
1
+ module DPLA::MAP
2
+ frame = CONTEXT
3
+ frame['@type'] = "ore:Aggregation"
4
+ FRAME = frame
5
+ end
@@ -1,6 +1,5 @@
1
1
  module DPLA
2
2
  module MAP
3
- VERSION = '4.0.0.0.pre.3'
3
+ VERSION = '4.0.0.0.pre.4'
4
4
  end
5
5
  end
6
-
@@ -5,8 +5,9 @@ describe DPLA::MAP::SourceResource do
5
5
  subject { build(:source_resource) }
6
6
 
7
7
  it 'is a dpla:SourceResource' do
8
+ require 'pry'
9
+ binding.pry
8
10
  expect(subject.type).to eq [RDF::URI('http://dp.la/about/map/SourceResource')]
9
11
  end
10
12
 
11
13
  end
12
-
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.3
4
+ version: 4.0.0.0.pre.4
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-24 00:00:00.000000000 Z
11
+ date: 2014-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active-triples
@@ -112,11 +112,13 @@ files:
112
112
  - lib/dpla/map/aggregation.rb
113
113
  - lib/dpla/map/collection.rb
114
114
  - lib/dpla/map/concept.rb
115
+ - lib/dpla/map/context.rb
115
116
  - lib/dpla/map/controlled.rb
116
117
  - lib/dpla/map/controlled/dcmitype.rb
117
118
  - lib/dpla/map/controlled/genre.rb
118
119
  - lib/dpla/map/controlled/language.rb
119
120
  - lib/dpla/map/factories.rb
121
+ - lib/dpla/map/frame.rb
120
122
  - lib/dpla/map/place.rb
121
123
  - lib/dpla/map/rights_statement.rb
122
124
  - lib/dpla/map/source_resource.rb