Skip to content

Commit ddad527

Browse files
committed
rename dir to expected path
1 parent 5733114 commit ddad527

3 files changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module NyuGeoblacklight
2+
class CuratedCollections
3+
def self.collections
4+
[
5+
{ title: 'New York City Open Data', description: 'A collection of datasets related to NYC infrastructure, real estate, transportation, and political geography', f: { 'dc_rights_s' => ['Public'], 'dct_spatial_sm' => ['New York, New York, United States'] } },
6+
{ title: 'NYU Research Data', description: 'Geospatial data submitted for preservation by NYU students, faculty, and staff', f: { 'dct_isPartOf_sm' => ['NYU Research Data'] } },
7+
{ title: 'Latin American Census Geodatabases', description: 'ESRI Geodatabases of census data from Latin American countries', f: { 'dct_isPartOf_sm' => ['Latin American Census Data'] } },
8+
{ title: 'Vector Map 1 (VMap1) Layers', description: 'Highly detailed vector layers depecting terrain, topology, transportation, and civil infrastructure', f: { 'dct_isPartOf_sm' => ['VMap 1'] } }
9+
]
10+
end
11+
12+
def self.recent
13+
[
14+
{ title: '2004 New York State Tax Parcels', description: 'Point data on property ownership and land value', f: { 'dct_isPartOf_sm' => ['NYS GIS Clearinghouse'] } },
15+
{ title: '2011 India Census Data', description: 'Vector village-level demographic data from the 2011 India Census', f: { 'dc_publisher_s' => ['ML InfoMap (Firm)'] } }
16+
]
17+
end
18+
19+
def self.maps
20+
[
21+
{ title: '2015 Aerial Laser and Photogrammetry Survey of Dublin', slug: 'nyu-2451-38684' },
22+
{ title: "China: Ch'ang-sha Region", slug: 'harvard-ams7810-s250-u54-nh49-16' },
23+
{ title: '1967 Communist China Agriculture', slug: 'nyu-2451-36739' },
24+
{ title: '2015 New York City Real Estate Sales', slug: 'nyu-2451-34678' },
25+
{ title: '1978 Soviet Map of Abu Dhabi', slug: 'nyu-2451-34737' },
26+
{ title: '2015 MapPLUTO Brooklyn V. 1', slug: 'nyu-2451-34521' },
27+
{ title: '100-Meter Resolution Land Cover of the Conterminous United States', slug: 'stanford-wv372bn9329' },
28+
{ title: '2016 LION Single Line Map for New York City', slug: 'nyu-2451-34565' }
29+
]
30+
end
31+
end
32+
end
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module NyuGeoblacklight
2+
# MultiDirectDownloads is a (NYU-specific) geoblacklight-schema parser for multi-direct-downloads field
3+
class MultiDirectDownloads
4+
attr_reader :downloads
5+
6+
def initialize(document, multi_downloads_field = Settings.FIELDS.MULTI_DOWNLOADS)
7+
@document = document
8+
@multi_downloads_field = multi_downloads_field
9+
@downloads = parse_downloads.map { |k, v| [k, v] }
10+
end
11+
12+
def parse_downloads
13+
if @document[@multi_downloads_field].nil?
14+
{}
15+
else
16+
JSON.parse(@document[@multi_downloads_field])
17+
end
18+
end
19+
end
20+
end

lib/nyugeoblacklight/version.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module NyuGeoblacklight
2+
VERSION = '1.10'.freeze
3+
end

0 commit comments

Comments
 (0)