adiwg-mdtranslator 1.3.0 → 1.4.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/.jsbeautifyrc +8 -0
  3. data/Rakefile +1 -3
  4. data/adiwg-mdtranslator.gemspec +2 -0
  5. data/bin/mdtranslator +2 -2
  6. data/lib/adiwg/mdtranslator.rb +2 -0
  7. data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +6 -3
  8. data/lib/adiwg/mdtranslator/internal/module_geoFormat.rb +183 -190
  9. data/lib/adiwg/mdtranslator/internal/module_lineString.rb +18 -0
  10. data/lib/adiwg/mdtranslator/internal/module_point.rb +18 -0
  11. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_contacts.rb +3 -1
  12. data/lib/adiwg/mdtranslator/readers/mdJson/modules_v1/module_geographicElement.rb +18 -10
  13. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_additionalDocumentation.rb +52 -0
  14. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_boundingBox.rb +54 -0
  15. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_browseGraphic.rb +66 -0
  16. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_citation.rb +125 -0
  17. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_contacts.rb +144 -0
  18. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_dateTime.rb +31 -0
  19. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_distributionInfo.rb +64 -0
  20. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_extent.rb +61 -0
  21. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_geoCoordSystem.rb +50 -0
  22. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_geoProperties.rb +91 -0
  23. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_geographicElement.rb +161 -0
  24. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_metadata.rb +70 -0
  25. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_metadataInfo.rb +131 -0
  26. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_onlineResource.rb +71 -0
  27. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_resourceIdentifier.rb +73 -0
  28. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_resourceInfo.rb +437 -0
  29. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_responsibleParty.rb +53 -0
  30. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/module_sbJson.rb +52 -0
  31. data/lib/adiwg/mdtranslator/readers/sbJson/modules_v0/version.rb +12 -0
  32. data/lib/adiwg/mdtranslator/readers/sbJson/readme.md +12 -0
  33. data/lib/adiwg/mdtranslator/readers/sbJson/sbJson_reader.rb +205 -0
  34. data/lib/adiwg/mdtranslator/readers/sbJson/sbJson_validator.rb +44 -0
  35. data/lib/adiwg/mdtranslator/version.rb +1 -2
  36. data/lib/adiwg/mdtranslator/writers/html/sections/html_browseGraphic.rb +2 -1
  37. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_multiGeometry.rb +5 -5
  38. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_responsibleParty.rb +1 -1
  39. data/lib/adiwg/mdtranslator/writers/mdJson/mdJson_writer.rb +42 -0
  40. data/lib/adiwg/mdtranslator/writers/mdJson/readme.md +19 -0
  41. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_additionalDoc.rb +19 -0
  42. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_address.rb +22 -0
  43. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_associatedResource.rb +22 -0
  44. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_attribute.rb +27 -0
  45. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_base.rb +19 -0
  46. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_citation.rb +33 -0
  47. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_constraint.rb +28 -0
  48. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_contact.rb +31 -0
  49. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coverageInfo.rb +30 -0
  50. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coverageItem.rb +44 -0
  51. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_dataQuality.rb +32 -0
  52. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_dateTime.rb +18 -0
  53. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_dictionary.rb +33 -0
  54. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_distributionInfo.rb +31 -0
  55. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_domain.rb +25 -0
  56. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_entity.rb +37 -0
  57. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_extent.rb +26 -0
  58. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_format.rb +19 -0
  59. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_geographicElement.rb +81 -0
  60. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_graphicOverview.rb +20 -0
  61. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_gridInfo.rb +27 -0
  62. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_imageInfo.rb +28 -0
  63. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_keyword.rb +20 -0
  64. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_locale.rb +19 -0
  65. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadata.rb +30 -0
  66. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_metadataInfo.rb +36 -0
  67. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_onlineResource.rb +21 -0
  68. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_phone.rb +19 -0
  69. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_processStep.rb +25 -0
  70. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_resourceIdentifier.rb +23 -0
  71. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_resourceInfo.rb +69 -0
  72. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_resourceMaintenance.rb +23 -0
  73. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_responsibleParty.rb +18 -0
  74. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_spatialreference.rb +19 -0
  75. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxon.rb +19 -0
  76. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb +32 -0
  77. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_temporalElement.rb +38 -0
  78. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_timePeriod.rb +20 -0
  79. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_transferOption.rb +33 -0
  80. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_usage.rb +23 -0
  81. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_verticalElement.rb +20 -0
  82. data/lib/adiwg/mdtranslator/writers/mdJson/version.rb +13 -0
  83. data/lib/adiwg/mdtranslator/writers/sbJson/readme.md +12 -0
  84. data/lib/adiwg/mdtranslator/writers/sbJson/sbJson_writer.rb +126 -0
  85. data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_base.rb +19 -0
  86. data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb +42 -0
  87. data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_identifier.rb +22 -0
  88. data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_spatial.rb +49 -0
  89. data/lib/adiwg/mdtranslator/writers/sbJson/version.rb +13 -0
  90. data/test/readers/mdJson/v1/tc_reader_mdjson_translation.rb +83 -0
  91. data/test/readers/sbJson/v0/tc_reader_sbjson_translation.rb +79 -0
  92. data/test/readers/sbJson/v0/test.json +431 -0
  93. data/test/readers/sbJson/v0/test1.json +383 -0
  94. data/test/writers/mdJson/v1/tc_writer_mdJson.rb +60 -0
  95. data/test/writers/sbJson/v0/tc_writer_sbJson.rb +60 -0
  96. metadata +121 -7
  97. data/test/readers/mdJson/v1/tc_translation_19115_2.rb +0 -67
@@ -0,0 +1,19 @@
1
+ require 'jbuilder'
2
+
3
+ module ADIWG
4
+ module Mdtranslator
5
+ module Writers
6
+ module SbJson
7
+ module Base
8
+ def json_map(collection = [], _class)
9
+ if collection.nil? || collection.empty?
10
+ return nil
11
+ else
12
+ collection.map { |item| _class.build(item).attributes! }
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,42 @@
1
+ require 'jbuilder'
2
+
3
+ module ADIWG
4
+ module Mdtranslator
5
+ module Writers
6
+ module SbJson
7
+ module Contact
8
+ def self.build(intObj)
9
+ Jbuilder.new do |json|
10
+ if intObj[:internal]
11
+ json.nil!
12
+ else
13
+ type = intObj[:indName].nil? ? 'organization' : 'person'
14
+ json.name intObj[:indName] || intObj[:orgName]
15
+ json.type type
16
+ json.email intObj[:address][:eMailList][0] unless intObj[:address].empty?
17
+ json.organization type == 'person' ? intObj[:orgName] : nil
18
+ json.primaryLocation do
19
+ json.officePhone intObj[:phones].collect { |ph|
20
+ ph[:phoneNumber] if ph[:phoneServiceType] == 'voice' }.reject(&:nil?).first
21
+ json.faxPhone intObj[:phones].collect { |ph|
22
+ ph[:phoneNumber] if ph[:phoneServiceType] == 'fax' }.reject(&:nil?).first
23
+ end
24
+ json.streetAddress do
25
+ add = intObj[:address]
26
+ unless[:deliveryPoints].empty?
27
+ json.line1 add[:deliveryPoints][0]
28
+ json.line2 add[:deliveryPoints][1]
29
+ end
30
+ json.city add[:city]
31
+ json.state add[:adminArea]
32
+ json.zip add[:postalCode]
33
+ json.country add[:country]
34
+ end unless intObj[:address].empty?
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,22 @@
1
+ require 'jbuilder'
2
+
3
+ module ADIWG
4
+ module Mdtranslator
5
+ module Writers
6
+ module SbJson
7
+ module Identifier
8
+ def self.build(intObj)
9
+ Jbuilder.new do |json|
10
+ json.type intObj[:identifierType]
11
+ json.scheme intObj[:identifierNamespace] ||
12
+ unless intObj[:identifierCitation].empty?
13
+ intObj[:identifierCitation][:citOlResources][0][:olResURI] unless intObj[:identifierCitation][:citOlResources].empty?
14
+ end
15
+ json.key intObj[:identifier]
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,49 @@
1
+ require 'jbuilder'
2
+ require 'rgeo'
3
+
4
+ module ADIWG
5
+ module Mdtranslator
6
+ module Writers
7
+ module SbJson
8
+ module Spatial
9
+ def self.build(intObj)
10
+ geo = []
11
+ intObj.each do |ext|
12
+ ext[:extGeoElements].each do |ge|
13
+ case ge[:elementType]
14
+ when 'GeometryCollection'
15
+ ge[:elementGeometry][:geometry].each do |geom|
16
+ geo << AdiwgGeoFormat.internal_to_wkt(geom[:elementGeometry])
17
+ end
18
+
19
+ when 'FeatureCollection'
20
+ ge[:elementGeometry][:geometry].each do |fea|
21
+ geo << AdiwgGeoFormat.internal_to_wkt(fea[:elementGeometry])
22
+ end
23
+ else
24
+ geo << AdiwgGeoFormat.internal_to_wkt(ge[:elementGeometry])
25
+ end
26
+ end
27
+ end
28
+ # puts geo
29
+ # calculate the bounds
30
+ reader = RGeo::WKRep::WKTParser.new(nil, support_wkt12: true)
31
+ fact = RGeo::Geographic.spherical_factory
32
+ bbox = RGeo::Cartesian::BoundingBox.new(fact, ignore_z: true)
33
+ geo.each { |geom| bbox.add(reader.parse(geom)) }
34
+
35
+ {
36
+ boundingBox: {
37
+ minX: bbox.min_x,
38
+ maxX: bbox.max_x,
39
+ minY: bbox.min_y,
40
+ maxY: bbox.max_y
41
+ }
42
+ }
43
+
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,13 @@
1
+ module ADIWG
2
+ module Mdtranslator
3
+ module Writers
4
+ module SbJson
5
+
6
+ # current version of mdJson writer,
7
+ # corresponds to mdJson output
8
+ VERSION = '0.0.0'
9
+
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,83 @@
1
+ # MdTranslator - code to test mdtranslator from Ruby Terminal during development
2
+
3
+ # History:
4
+ # Stan Smith 2014-07-02 original script
5
+ # Josh Bradley 2014-09-28 updated to use test/unit
6
+ # Stan Smith 2015-01-16 changed ADIWG::Mdtranslator.translate() to keyword parameters
7
+ # Stan Smith 2015-06-22 refactored setup to after removal of globals
8
+
9
+ require 'minitest/autorun'
10
+ require 'json'
11
+ require 'adiwg-mdtranslator'
12
+
13
+ class TestTranslation_mdJson_v1 < MiniTest::Test
14
+ @@reader = 'mdJson'
15
+ @@writer = 'html'
16
+
17
+ def test_full_success
18
+ # get json file for tests from examples folder
19
+ file = File.join(File.dirname(__FILE__), '../../../', 'schemas/v1_0/examples', 'full_example.json')
20
+ file = File.open(file, 'r')
21
+ jsonObj = file.read
22
+ file.close
23
+
24
+ # call opening module in mdTranslator
25
+ metadata = ADIWG::Mdtranslator.translate(
26
+ file: jsonObj, reader: @@reader, validate: 'normal',
27
+ writer: @@writer, showAllTags: 'true')
28
+ version = JSON.parse(jsonObj)['version']['version'].split('.')
29
+
30
+ assert_equal('json', metadata[:readerFormat], 'Check reader name')
31
+ assert metadata[:readerStructurePass], metadata[:readerStructureMessages].join(',')
32
+ assert_equal(@@reader, metadata[:readerRequested])
33
+
34
+ # major version
35
+ assert_equal(version[0], metadata[:readerVersionUsed].split('.')[0])
36
+
37
+ assert metadata[:readerValidationPass], "reader validation failed: \n" + metadata[:readerValidationMessages].join(',')
38
+ assert_equal(@@writer, metadata[:writerName])
39
+ assert metadata[:writerPass], "writer validation failed: \n" + metadata[:writerMessages].join(',')
40
+ refute_nil metadata[:writerOutput]
41
+ end
42
+
43
+ def test_minimum_success
44
+ # get json file for tests from examples folder
45
+ file = File.join(File.dirname(__FILE__), '../../../', 'schemas/v1_0/examples', 'minimum_example.json')
46
+ file = File.open(file, 'r')
47
+ jsonObj = file.read
48
+ file.close
49
+
50
+ # call opening module in mdTranslator
51
+ metadata = ADIWG::Mdtranslator.translate(
52
+ file: jsonObj, reader: @@reader, validate: 'normal',
53
+ writer: @@writer, showAllTags: 'true')
54
+
55
+ assert_equal('json', metadata[:readerFormat], 'Check reader name')
56
+ assert metadata[:readerStructurePass], metadata[:readerStructureMessages].join(',')
57
+ assert_equal(@@reader, metadata[:readerRequested])
58
+ assert metadata[:readerValidationPass], "reader validation failed: \n" + metadata[:readerValidationMessages].join(',')
59
+ assert_equal(@@writer, metadata[:writerName])
60
+ assert metadata[:writerPass], "writer validation failed: \n" + metadata[:writerMessages].join(',')
61
+ refute_nil metadata[:writerOutput]
62
+ end
63
+
64
+ def test_writers
65
+ dir = File.join(File.dirname(__FILE__), '../../../..', 'lib/adiwg/mdtranslator/writers')
66
+ writers = (Dir.glob "#{dir}/*/").map { |a| File.basename(a) }.reject! { |a| a == 'iso19110' }
67
+
68
+ # get json file for tests from examples folder
69
+ file = File.join(File.dirname(__FILE__), '../../../', 'schemas/v1_0/examples', 'full_example.json')
70
+ file = File.open(file, 'r')
71
+ jsonObj = file.read
72
+ file.close
73
+
74
+ writers.each do |writer|
75
+ # call opening module in mdTranslator
76
+ metadata = ADIWG::Mdtranslator.translate(
77
+ file: jsonObj, reader: @@reader, validate: 'normal',
78
+ writer: writer, showAllTags: 'true')
79
+
80
+ refute_nil metadata[:writerOutput], "Failed to translate #{@@reader} to #{writer}!"
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,79 @@
1
+ require 'minitest/autorun'
2
+ require 'json'
3
+ # require 'adiwg-mdtranslator'
4
+ require 'adiwg/mdtranslator/internal/internal_metadata_obj'
5
+ require 'adiwg/mdtranslator/readers/sbJson/sbJson_reader'
6
+
7
+ class TestTranslation_sbJson_v0 < MiniTest::Test
8
+ @@reader = 'sbJson'
9
+ @@writer = 'iso19115_2'
10
+
11
+ def test_full_success
12
+ # get json file for tests from examples folder
13
+ file = File.join(File.dirname(__FILE__), './', 'test.json')
14
+ file = File.open(file, 'r')
15
+ jsonObj = file.read
16
+ file.close
17
+
18
+ # call opening module in mdTranslator
19
+ metadata = ADIWG::Mdtranslator.translate(
20
+ file: jsonObj, reader: @@reader, validate: 'normal',
21
+ writer: @@writer, showAllTags: 'true')
22
+
23
+ # sbJson doesn't support versioning
24
+ version = %w(0 0 0)
25
+
26
+ assert_equal('json', metadata[:readerFormat], 'Check reader name')
27
+ assert metadata[:readerStructurePass], metadata[:readerStructureMessages].join(',')
28
+ assert_equal(@@reader, metadata[:readerRequested])
29
+
30
+ # major version
31
+ assert_equal(version[0], metadata[:readerVersionUsed].split('.')[0])
32
+
33
+ assert metadata[:readerValidationPass], "reader validation failed: \n" + metadata[:readerValidationMessages].join(',')
34
+ assert_equal(@@writer, metadata[:writerName])
35
+ assert metadata[:writerPass], "writer validation failed: \n" + metadata[:writerMessages].join(',')
36
+ refute_nil metadata[:writerOutput]
37
+ end
38
+
39
+ def test_minimum_success
40
+ # get json file for tests from examples folder
41
+ file = File.join(File.dirname(__FILE__), './', 'test.json')
42
+ file = File.open(file, 'r')
43
+ jsonObj = file.read
44
+ file.close
45
+
46
+ # call opening module in mdTranslator
47
+ metadata = ADIWG::Mdtranslator.translate(
48
+ file: jsonObj, reader: @@reader, validate: 'normal',
49
+ writer: @@writer, showAllTags: 'true')
50
+
51
+ assert_equal('json', metadata[:readerFormat], 'Check reader name')
52
+ assert metadata[:readerStructurePass], metadata[:readerStructureMessages].join(',')
53
+ assert_equal(@@reader, metadata[:readerRequested])
54
+ assert metadata[:readerValidationPass], "reader validation failed: \n" + metadata[:readerValidationMessages].join(',')
55
+ assert_equal(@@writer, metadata[:writerName])
56
+ assert metadata[:writerPass], "writer validation failed: \n" + metadata[:writerMessages].join(',')
57
+ refute_nil metadata[:writerOutput]
58
+ end
59
+
60
+ def test_writers
61
+ dir = File.join(File.dirname(__FILE__), '../../../..', 'lib/adiwg/mdtranslator/writers')
62
+ writers = (Dir.glob "#{dir}/*/").map { |a| File.basename(a) }.reject!{ |a| a == 'iso19110' }
63
+
64
+ # get json file for tests from examples folder
65
+ file = File.join(File.dirname(__FILE__), './', 'test.json')
66
+ file = File.open(file, 'r')
67
+ jsonObj = file.read
68
+ file.close
69
+
70
+ writers.each do |writer|
71
+ # call opening module in mdTranslator
72
+ metadata = ADIWG::Mdtranslator.translate(
73
+ file: jsonObj, reader: @@reader, validate: 'normal',
74
+ writer: writer, showAllTags: 'true')
75
+
76
+ refute_nil metadata[:writerOutput], "Failed to translate #{@@reader} to #{writer}!"
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,431 @@
1
+ {
2
+ "link": {
3
+ "rel": "self",
4
+ "url": "http://localhost:8090/catalog/item/52fe74416f8f4291717d3658"
5
+ },
6
+ "relatedItems": {
7
+ "link": {
8
+ "url": "http://localhost:8090/catalog/itemLinks?itemId=52fe74416f8f4291717d3658",
9
+ "rel": "related"
10
+ }
11
+ },
12
+ "id": "52fe74416f8f4291717d3658",
13
+ "identifiers": [{
14
+ "type": "testType",
15
+ "scheme": "testScheme",
16
+ "key": "testKey"
17
+ }],
18
+ "title": "TEST Item REST Services",
19
+ "subTitle": "Test Subtitle",
20
+ "alternateTitles": [
21
+ "Test Alternate Titles"
22
+ ],
23
+ "summary": "Test Body",
24
+ "body": "<div> Test Body </div>",
25
+ "purpose": "Test Purpose",
26
+ "rights": "Test Rights",
27
+ "provenance": {
28
+ "annotation": "Test Provenance - Annotation",
29
+ "dataSource": "Input directly",
30
+ "dateCreated": "2014-02-14T19:53:37Z",
31
+ "lastUpdated": "2014-02-14T22:33:09Z",
32
+ "lastUpdatedBy": "mrunnels@usgs.gov",
33
+ "createdBy": "mrunnels@usgs.gov"
34
+ },
35
+ "materialRequestInstructions": "Test Material Request Instructions",
36
+ "hasChildren": false,
37
+ "parentId": "52a767f26f8f46e6ddb14bd8",
38
+ "contacts": [{
39
+ "name": "Robert N Prescott",
40
+ "oldPartyId": 58818,
41
+ "type": "Distributor",
42
+ "sourceId": "asdf",
43
+ "contactType": "person",
44
+ "organizationsPerson": "usgs",
45
+ "ttyPhone": "123-123-1234",
46
+ "hours": "8-4",
47
+ "instructions": "test",
48
+ "email": "rprescott@usgs.gov",
49
+ "active": true,
50
+ "jobTitle": "Computer Programmer",
51
+ "personalTitle": "test",
52
+ "firstName": "Robert",
53
+ "middleName": "N",
54
+ "lastName": "Prescott",
55
+ "organization": {
56
+ "displayText": "Fort Collins Science Center"
57
+ },
58
+ "primaryLocation": {
59
+ "shortName": "asdf",
60
+ "name": "Robert N Prescott/BRD/CONT/USGS/DOI - Primary Location",
61
+ "description": "asdf",
62
+ "location": "asdf",
63
+ "building": "NRRC Bldg C",
64
+ "buildingCode": "KBA",
65
+ "roomNumber": "123",
66
+ "officePhone": "9702269250",
67
+ "faxPhone": "9702269230",
68
+ "latitude": 20,
69
+ "longitude": 20,
70
+ "streetAddress": {
71
+ "line1": "2150 Centre Avenue Bldg C",
72
+ "line2": "sadf",
73
+ "mailStopCode": "safd",
74
+ "city": "Fort Collins",
75
+ "state": "CO",
76
+ "zip": "80526",
77
+ "country": "asdf"
78
+ },
79
+ "mailAddress": {
80
+ "line1": "2150 Centre Avenue, Building C",
81
+ "line2": "asdf",
82
+ "mailStopCode": "asdf",
83
+ "city": "Fort Collins",
84
+ "state": "CO",
85
+ "zip": "80526-8118",
86
+ "country": "USA"
87
+ }
88
+ }
89
+ }, {
90
+ "name": "U.S. Geological Survey",
91
+ "oldPartyId": 18139,
92
+ "type": "Data Owner",
93
+ "contactType": "organization",
94
+ "active": true,
95
+ "aliases": [
96
+ "U.S. GEOLOGICAL SURVEY",
97
+ "USGS"
98
+ ],
99
+ "fbmsCodes": [
100
+ "GG00000000"
101
+ ],
102
+ "logoUrl": "http://my.usgs.gov/static-cache/images/dataOwner/v1/logosMed/USGSLogo.gif",
103
+ "smallLogoUrl": "http://my.usgs.gov/static-cache/images/dataOwner/v1/logosSmall/USGSLogo.gif",
104
+ "organization": {},
105
+ "primaryLocation": {
106
+ "shortName": "asdf",
107
+ "name": "Cascades Vol Observatory - COLUMBIA TECH CENTER [WWA]",
108
+ "description": "asdf",
109
+ "location": "asdf",
110
+ "building": "COLUMBIA TECH CENTER",
111
+ "buildingCode": "WWA",
112
+ "roomNumber": "asdf",
113
+ "officePhone": "asdf",
114
+ "faxPhone": "asdfasdf",
115
+ "latitude": 12,
116
+ "longitude": 12,
117
+ "streetAddress": {
118
+ "line1": "1300 SE Cardinal Court, Bldg. 10",
119
+ "city": "Vancouver",
120
+ "state": "WA",
121
+ "zip": "98683-9589",
122
+ "country": "USA"
123
+ },
124
+ "mailAddress": {
125
+ "line1": "1300 SE Cardinal Court, Bldg. 10, Suite 100",
126
+ "city": "Vancouver",
127
+ "state": "WA",
128
+ "zip": "98683",
129
+ "country": "USA"
130
+ }
131
+ }
132
+ }],
133
+ "webLinks": [{
134
+ "type": "webLink",
135
+ "typeLabel": "Web Link Test",
136
+ "uri": "http://www.google.com",
137
+ "title": "Google",
138
+ "hidden": false
139
+ }],
140
+ "browseCategories": [
141
+ "Data",
142
+ "Test1"
143
+ ],
144
+ "browseTypes": [
145
+ "GeoTIFF",
146
+ "Downloadable",
147
+ "Raster",
148
+ "Map Service",
149
+ "Book Citation"
150
+ ],
151
+ "tags": [{
152
+ "type": "Label",
153
+ "scheme": "ISO 19115 Topic Categories",
154
+ "name": "imageryBaseMapsEarthCover"
155
+ }, {
156
+ "type": "Label",
157
+ "scheme": "None",
158
+ "name": "Alaska"
159
+ }, {
160
+ "type": "Label",
161
+ "scheme": "None",
162
+ "name": "Coast"
163
+ }, {
164
+ "type": "Label",
165
+ "scheme": "None",
166
+ "name": "Landsat"
167
+ }, {
168
+ "type": "Congressional Districts - 113th Session",
169
+ "scheme": "https://www.sciencebase.gov/vocab/category/Places/CongressionalDistricts/113thSession",
170
+ "name": "AK-00"
171
+ }, {
172
+ "type": "LCC Deliverable",
173
+ "scheme": "https://www.sciencebase.gov/vocab/category/LCC/Deliverable",
174
+ "name": "Datasets/Database"
175
+ }, {
176
+ "type": "LCC Deliverable",
177
+ "scheme": "https://www.sciencebase.gov/vocab/category/LCC/Deliverable",
178
+ "name": "Junk"
179
+ }, {
180
+ "type": "Label",
181
+ "name": "Test"
182
+ }, {
183
+ "type": "Label",
184
+ "scheme": "https://beta.sciencebase.gov/vocab/category/item/browseCategory",
185
+ "name": "Test1"
186
+ }, {
187
+ "type": "Not",
188
+ "name": "now"
189
+ }],
190
+ "dates": [{
191
+ "type": "Info",
192
+ "dateString": "2014-02-14",
193
+ "label": "Info Date Test"
194
+ }],
195
+ "facets": [{
196
+ "files": [{
197
+ "name": "sample_raster_color_map.tif/sample_raster_color_map.tif",
198
+ "contentType": "image/tiff",
199
+ "contentEncoding": null,
200
+ "pathOnDisk": "__disk__87/20/c7/8720c7b0db66b323d95aece232ed4772814418f8",
201
+ "processed": null,
202
+ "processToken": null,
203
+ "imageWidth": 3848,
204
+ "imageHeight": 2121,
205
+ "dateUploaded": "2014-02-14T20:58:44Z",
206
+ "uploadedBy": "mrunnels@usgs.gov",
207
+ "originalMetadata": true,
208
+ "url": "http://localhost:8090/catalog/file/get/52fe74416f8f4291717d3658?f=__disk__87%2F20%2Fc7%2F8720c7b0db66b323d95aece232ed4772814418f8",
209
+ "size": 638813
210
+ }, {
211
+ "name": "sample_raster_color_map.tif/sample_raster_color_map.tif.aux.xml",
212
+ "contentType": "application/xml",
213
+ "contentEncoding": null,
214
+ "pathOnDisk": "__grid__52fe84136f8fd5dd40031de6",
215
+ "processed": null,
216
+ "processToken": null,
217
+ "imageWidth": null,
218
+ "imageHeight": null,
219
+ "dateUploaded": "2014-02-14T20:58:44Z",
220
+ "uploadedBy": "mrunnels@usgs.gov",
221
+ "originalMetadata": null,
222
+ "url": "http://localhost:8090/catalog/file/get/52fe74416f8f4291717d3658?f=__grid__52fe84136f8fd5dd40031de6",
223
+ "size": 261
224
+ }, {
225
+ "name": "sample_raster_color_map.tif/sample_raster_color_map.tif.ovr",
226
+ "contentType": "image/tiff",
227
+ "contentEncoding": null,
228
+ "pathOnDisk": "__disk__28/8a/90/288a9024c3a88a7e341c715c8091d948ee20105d",
229
+ "processed": null,
230
+ "processToken": null,
231
+ "imageWidth": 1924,
232
+ "imageHeight": 1061,
233
+ "dateUploaded": "2014-02-14T20:58:44Z",
234
+ "uploadedBy": "mrunnels@usgs.gov",
235
+ "originalMetadata": null,
236
+ "url": "http://localhost:8090/catalog/file/get/52fe74416f8f4291717d3658?f=__disk__28%2F8a%2F90%2F288a9024c3a88a7e341c715c8091d948ee20105d",
237
+ "size": 338723
238
+ }, {
239
+ "name": "sample_raster_color_map.tif/sample_raster_color_map.tif.xml",
240
+ "contentType": "application/fgdc+xml",
241
+ "contentEncoding": null,
242
+ "pathOnDisk": "__grid__52fe84136f8fd5dd40031de7",
243
+ "processed": null,
244
+ "processToken": null,
245
+ "imageWidth": null,
246
+ "imageHeight": null,
247
+ "dateUploaded": "2014-02-14T20:58:44Z",
248
+ "uploadedBy": "mrunnels@usgs.gov",
249
+ "originalMetadata": null,
250
+ "url": "http://localhost:8090/catalog/file/get/52fe74416f8f4291717d3658?f=__grid__52fe84136f8fd5dd40031de7",
251
+ "size": 2767
252
+ }],
253
+ "boundingBox": {
254
+ "maxY": 45.0528658360911,
255
+ "maxX": -103.82575393490978,
256
+ "minX": -111.2802631688945,
257
+ "minY": 40.943974441787155
258
+ },
259
+ "rasterType": "GeoTIFF",
260
+ "name": "sample_raster_color_map.tif/sample_raster_color_map.tif",
261
+ "nativeCrs": "EPSG:4326",
262
+ "className": "gov.sciencebase.catalog.item.facet.RasterFacet"
263
+ }, {
264
+ "files": [{
265
+ "name": "sample_raster_color_map.tif/sample_raster_color_map.tif",
266
+ "contentType": "image/tiff",
267
+ "contentEncoding": null,
268
+ "pathOnDisk": "__disk__03/91/74/0391748dfc41aec41b7421b32867bff21872f9da",
269
+ "processed": null,
270
+ "processToken": null,
271
+ "imageWidth": 3848,
272
+ "imageHeight": 2121,
273
+ "dateUploaded": "2014-02-14T21:00:58Z",
274
+ "uploadedBy": "mrunnels@usgs.gov",
275
+ "originalMetadata": true,
276
+ "url": "http://localhost:8090/catalog/file/get/52fe74416f8f4291717d3658?f=__disk__03%2F91%2F74%2F0391748dfc41aec41b7421b32867bff21872f9da",
277
+ "size": 638813
278
+ }, {
279
+ "name": "sample_raster_color_map.tif/sample_raster_color_map.tif.aux.xml",
280
+ "contentType": "application/xml",
281
+ "contentEncoding": null,
282
+ "pathOnDisk": "__grid__52fe84136f8fd5dd40031de8",
283
+ "processed": null,
284
+ "processToken": null,
285
+ "imageWidth": null,
286
+ "imageHeight": null,
287
+ "dateUploaded": "2014-02-14T21:00:58Z",
288
+ "uploadedBy": "mrunnels@usgs.gov",
289
+ "originalMetadata": null,
290
+ "url": "http://localhost:8090/catalog/file/get/52fe74416f8f4291717d3658?f=__grid__52fe84136f8fd5dd40031de8",
291
+ "size": 261
292
+ }, {
293
+ "name": "sample_raster_color_map.tif/sample_raster_color_map.tif.ovr",
294
+ "contentType": "image/tiff",
295
+ "contentEncoding": null,
296
+ "pathOnDisk": "__disk__33/6c/14/336c1416c925ed0ef41fdcce90ffd7ea5e68df70",
297
+ "processed": null,
298
+ "processToken": null,
299
+ "imageWidth": 1924,
300
+ "imageHeight": 1061,
301
+ "dateUploaded": "2014-02-14T21:00:58Z",
302
+ "uploadedBy": "mrunnels@usgs.gov",
303
+ "originalMetadata": null,
304
+ "url": "http://localhost:8090/catalog/file/get/52fe74416f8f4291717d3658?f=__disk__33%2F6c%2F14%2F336c1416c925ed0ef41fdcce90ffd7ea5e68df70",
305
+ "size": 338723
306
+ }, {
307
+ "name": "sample_raster_color_map.tif/sample_raster_color_map.tif.xml",
308
+ "contentType": "application/fgdc+xml",
309
+ "contentEncoding": null,
310
+ "pathOnDisk": "__grid__52fe84146f8fd5dd40031de9",
311
+ "processed": null,
312
+ "processToken": null,
313
+ "imageWidth": null,
314
+ "imageHeight": null,
315
+ "dateUploaded": "2014-02-14T21:00:58Z",
316
+ "uploadedBy": "mrunnels@usgs.gov",
317
+ "originalMetadata": null,
318
+ "url": "http://localhost:8090/catalog/file/get/52fe74416f8f4291717d3658?f=__grid__52fe84146f8fd5dd40031de9",
319
+ "size": 2767
320
+ }],
321
+ "boundingBox": {
322
+ "maxY": 45.0528658360911,
323
+ "maxX": -103.82575393490978,
324
+ "minX": -111.2802631688945,
325
+ "minY": 40.943974441787155
326
+ },
327
+ "rasterType": "GeoTIFF",
328
+ "name": "sample_raster_color_map.tif/sample_raster_color_map.tif",
329
+ "nativeCrs": "EPSG:4326",
330
+ "className": "gov.sciencebase.catalog.item.facet.RasterFacet"
331
+ }, {
332
+ "lithologicComments": "Test Extension",
333
+ "className": "gov.sciencebase.catalog.item.facet.GeologyFacet"
334
+ }],
335
+ "files": [{
336
+ "name": "IRISH_WOLFHOUND.jpg",
337
+ "contentType": "image/jpeg",
338
+ "contentEncoding": null,
339
+ "pathOnDisk": "__disk__8b/81/d5/8b81d5c09a7ce9bf93d23870e98bedf943a3810f",
340
+ "processed": false,
341
+ "processToken": null,
342
+ "imageWidth": 640,
343
+ "imageHeight": 360,
344
+ "dateUploaded": "2014-02-14T20:57:31Z",
345
+ "uploadedBy": "mrunnels@usgs.gov",
346
+ "originalMetadata": false,
347
+ "url": "http://localhost:8090/catalog/file/get/52fe74416f8f4291717d3658?f=__disk__8b%2F81%2Fd5%2F8b81d5c09a7ce9bf93d23870e98bedf943a3810f",
348
+ "size": 59441
349
+ }],
350
+ "permissions": {
351
+ "read": {
352
+ "acl": [
353
+ "USER:mrunnels@usgs.gov"
354
+ ],
355
+ "inherited": true,
356
+ "inheritsFromId": "52a767f26f8f46e6ddb14bd8"
357
+ },
358
+ "write": {
359
+ "acl": [
360
+ "USER:mrunnels@usgs.gov"
361
+ ],
362
+ "inherited": true,
363
+ "inheritsFromId": "52a767f26f8f46e6ddb14bd8"
364
+ }
365
+ },
366
+ "spatial": {
367
+ "boundingBox": {
368
+ "minX": -171.305496,
369
+ "maxX": -150.877746,
370
+ "minY": 53.862561,
371
+ "maxY": 67.373126
372
+ }
373
+ },
374
+ "distributionLinks": [{
375
+ "uri": "http://localhost:8081/catalogMaps/mapping/ows/52fe74416f8f4291717d3658?mode=download&request=kml&service=wms&layers=sample_raster_color_map.tif_sample_raster_color_map.tif",
376
+ "title": "KML Service",
377
+ "type": "kml",
378
+ "typeLabel": "KML Download",
379
+ "rel": "alternate"
380
+ }, {
381
+ "uri": "http://localhost:8081/catalogMaps/mapping/ows/52fe74416f8f4291717d3658?service=wms&request=getcapabilities&version=1.3.0",
382
+ "title": "ScienceBase WMS Service",
383
+ "type": "serviceCapabilitiesUrl",
384
+ "typeLabel": "OGC Service Capabilities URL",
385
+ "rel": "alternate"
386
+ }, {
387
+ "uri": "http://localhost:8081/catalogMaps/mapping/ows/52fe74416f8f4291717d3658?service=wfs&request=getcapabilities&version=1.0.0",
388
+ "title": "ScienceBase WFS Service",
389
+ "type": "serviceCapabilitiesUrl",
390
+ "typeLabel": "OGC Service Capabilities URL",
391
+ "rel": "alternate"
392
+ }, {
393
+ "uri": "http://localhost:8081/catalogMaps/mapping/ows/52fe74416f8f4291717d3658?service=wcs&request=getcapabilities&version=1.1.0",
394
+ "title": "ScienceBase WCS Service",
395
+ "type": "serviceCapabilitiesUrl",
396
+ "typeLabel": "OGC Service Capabilities URL",
397
+ "rel": "alternate"
398
+ }, {
399
+ "uri": "http://localhost:8090/catalog/file/get/52fe74416f8f4291717d3658",
400
+ "title": "Download Attached Files",
401
+ "type": "downloadLink",
402
+ "typeLabel": "Download Link",
403
+ "rel": "alternate"
404
+ }],
405
+ "previewImage": {
406
+ "original": {
407
+ "uri": "http://localhost:8090/catalog/file/get/52fe74416f8f4291717d3658?f=__disk__8b%2F81%2Fd5%2F8b81d5c09a7ce9bf93d23870e98bedf943a3810f",
408
+ "viewUri": "http://localhost:8090/catalog/file/get/52fe74416f8f4291717d3658?f=__disk__8b%2F81%2Fd5%2F8b81d5c09a7ce9bf93d23870e98bedf943a3810f&width=640&height=360",
409
+ "viewUrl": "http://localhost:8090/catalog/file/get/52fe74416f8f4291717d3658?f=__disk__8b%2F81%2Fd5%2F8b81d5c09a7ce9bf93d23870e98bedf943a3810f&width=640&height=360",
410
+ "width": 640,
411
+ "height": 360,
412
+ "size": 59441
413
+ },
414
+ "thumbnail": {
415
+ "uri": "http://localhost:8090/catalog/file/get/52fe74416f8f4291717d3658?f=__disk__8b%2F81%2Fd5%2F8b81d5c09a7ce9bf93d23870e98bedf943a3810f&width=150&height=84",
416
+ "width": 150,
417
+ "height": 84
418
+ },
419
+ "small": {
420
+ "uri": "http://localhost:8090/catalog/file/get/52fe74416f8f4291717d3658?f=__disk__8b%2F81%2Fd5%2F8b81d5c09a7ce9bf93d23870e98bedf943a3810f&width=350&height=197",
421
+ "width": 350,
422
+ "height": 197
423
+ }
424
+ },
425
+ "locked": false,
426
+ "facets": [{
427
+ "projectProducts": [],
428
+ "parts": [],
429
+ "className": "gov.sciencebase.catalog.item.facet.ProjectFacet"
430
+ }]
431
+ }