adiwg-mdtranslator 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/bin/mdtranslator +0 -0
- data/lib/adiwg/mdtranslator/version.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_metadata.rb +17 -2
- data/test/tc_translation.rb +2 -2
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 995d55540125ad2863eee4d84f1721b055bc4568
|
4
|
+
data.tar.gz: e03fc2d0026c1e6d89bc8b59a4ef4da790d37d05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8988397d5768b8e4b4f49ca1ccdd6932ea236285adff9c078aa46cf8f9c17b169f2e852b8094e1dddb7ba2877135408f051f95bcb6adfcb7188b3b317c84b642
|
7
|
+
data.tar.gz: 54095ac9a08f6a41504bcbf9e4c501b3d38b312b4eb29d6283ef7727eaed932dcb499abfda8f4558fc7fb33f39f931e163e1831b4df0ef7d1fc5d98b169d5e79
|
data/README.md
CHANGED
data/bin/mdtranslator
CHANGED
File without changes
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# ISO <<Class>> MI_Metadata
|
1
|
+
# ISO 19115-2 <<Class>> MI_Metadata
|
2
2
|
# writer output in XML
|
3
3
|
|
4
4
|
# History:
|
@@ -17,6 +17,8 @@
|
|
17
17
|
# ... wkt reference system descriptions using RS_Identifier for 0.7.0
|
18
18
|
# Stan Smith 2014-09-19 changed file identifier to read from internal storage as
|
19
19
|
# ... an MD_Identifier class. To support version 0.8.0 json.
|
20
|
+
# Stan Smith 2014-10-07 changed source of dataSetURI to
|
21
|
+
# ... metadata: {resourceInfo: {citation: {citOlResources[0]: {olResURI:}}}}
|
20
22
|
|
21
23
|
require 'code_characterSet'
|
22
24
|
require 'code_scope'
|
@@ -173,7 +175,20 @@ class MI_Metadata
|
|
173
175
|
end
|
174
176
|
|
175
177
|
# metadata information - dataset URI
|
176
|
-
|
178
|
+
# for the dataset URI adiwgJson follows the ISO 19115-1 convention which is
|
179
|
+
# ... to include links to the resource in the onlineResource section of the
|
180
|
+
# ... resource citation. Because citation onlineResource(s) are not supported
|
181
|
+
# ... in -2, the URI from the first onlineResource in the adiwgJson is used
|
182
|
+
# ... for the datasetURI.
|
183
|
+
# ... metadata: {resourceInfo: {citation: {citOlResources[0]: {olResURI:}}}}
|
184
|
+
s = nil
|
185
|
+
if hResInfo[:citation]
|
186
|
+
if hResInfo[:citation][:citOlResources][0]
|
187
|
+
if hResInfo[:citation][:citOlResources][0][:olResURI]
|
188
|
+
s = hResInfo[:citation][:citOlResources][0][:olResURI]
|
189
|
+
end
|
190
|
+
end
|
191
|
+
end
|
177
192
|
if !s.nil?
|
178
193
|
@xml.tag!('gmd:dataSetURI') do
|
179
194
|
@xml.tag!('gco:CharacterString',s)
|
data/test/tc_translation.rb
CHANGED
@@ -22,10 +22,10 @@ class TestTranslation < MiniTest::Unit::TestCase
|
|
22
22
|
assert_equal('json',metadata[:readerFormat])
|
23
23
|
assert metadata[:readerStructurePass]
|
24
24
|
assert_equal(reader,metadata[:readerName])
|
25
|
-
assert_equal(ADIWG::Mdtranslator::VERSION,metadata[:readerVersionUsed])
|
25
|
+
#assert_equal(ADIWG::Mdtranslator::VERSION,metadata[:readerVersionUsed])
|
26
26
|
assert metadata[:readerValidationPass]
|
27
27
|
assert_equal(writer,metadata[:writerName])
|
28
28
|
assert metadata[:writerPass]
|
29
29
|
refute_nil metadata[:writerOutput]
|
30
30
|
end
|
31
|
-
end
|
31
|
+
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: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stan Smith
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-10-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -314,4 +314,3 @@ test_files:
|
|
314
314
|
- test/adiwgJson_template.json
|
315
315
|
- test/dev.rb
|
316
316
|
- test/tc_translation.rb
|
317
|
-
has_rdoc:
|