adiwg-mdtranslator 1.4.0.beta2 → 1.4.0.beta3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68edaa289dc4c510306d76867d0f5d539fe3bd17
|
4
|
+
data.tar.gz: cc2252c9fa076ba8c7fa652153b443a3dd705069
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f859cb8ea9a253b3a11f66cd3ea37c6584546eb8916f130e3742b7d84e39a7e7b8f11dd4114c5173eb270ee4c97218c3ca62d7bce456f8d875639074395a1d50
|
7
|
+
data.tar.gz: 70bf1d4ad2a9b3023a0e430fec9beb9a16d6e89b4f46d2b0509370a92471d94e415dfdac674f6088a49935afe74cad126c794c6191c57275bb88190e5f5d25df
|
@@ -4,6 +4,7 @@ require_relative 'sections/sbJson_base'
|
|
4
4
|
require_relative 'sections/sbJson_contact'
|
5
5
|
require_relative 'sections/sbJson_identifier'
|
6
6
|
require_relative 'sections/sbJson_spatial'
|
7
|
+
require_relative 'sections/sbJson_facet'
|
7
8
|
|
8
9
|
module ADIWG
|
9
10
|
module Mdtranslator
|
@@ -102,7 +103,9 @@ module ADIWG
|
|
102
103
|
end
|
103
104
|
|
104
105
|
json.spatial Spatial.build(rInfo[:extents])
|
106
|
+
json.facets Facet.build(rInfo)
|
105
107
|
end
|
108
|
+
|
106
109
|
# set writer pass to true if no messages
|
107
110
|
# false or warning will be set by code that places the message
|
108
111
|
responseObj[:writerPass] = true if responseObj[:writerMessages].empty?
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module ADIWG
|
2
|
+
module Mdtranslator
|
3
|
+
module Writers
|
4
|
+
module SbJson
|
5
|
+
module Facet
|
6
|
+
def self.build(intObj)
|
7
|
+
facets = []
|
8
|
+
if intObj[:resourceType] == 'project'
|
9
|
+
status = {
|
10
|
+
completed: 'Completed',
|
11
|
+
underDevelopment: 'Active',
|
12
|
+
accepted: 'Approved',
|
13
|
+
funded: 'Funded',
|
14
|
+
onGoing: 'In Progress',
|
15
|
+
proposed: 'Proposed'
|
16
|
+
}
|
17
|
+
facets << {
|
18
|
+
className: 'gov.sciencebase.catalog.item.facet.ProjectFacet',
|
19
|
+
projectStatus: status[:"#{intObj[:status]}"]
|
20
|
+
}
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
facets
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adiwg-mdtranslator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.0.
|
4
|
+
version: 1.4.0.beta3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stan Smith
|
@@ -504,6 +504,7 @@ files:
|
|
504
504
|
- lib/adiwg/mdtranslator/writers/sbJson/sbJson_writer.rb
|
505
505
|
- lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_base.rb
|
506
506
|
- lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb
|
507
|
+
- lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_facet.rb
|
507
508
|
- lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_identifier.rb
|
508
509
|
- lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_spatial.rb
|
509
510
|
- lib/adiwg/mdtranslator/writers/sbJson/version.rb
|
@@ -562,7 +563,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
562
563
|
version: 1.3.1
|
563
564
|
requirements: []
|
564
565
|
rubyforge_project:
|
565
|
-
rubygems_version: 2.
|
566
|
+
rubygems_version: 2.4.5
|
566
567
|
signing_key:
|
567
568
|
specification_version: 4
|
568
569
|
summary: The mdtranslator (metadata translator) is a tool for translating metadata
|