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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6737cb739485e1dd0410fac29c0047e2c3015ba
4
- data.tar.gz: 81cf624e5573470534f2b88293859180f88f859d
3
+ metadata.gz: 995d55540125ad2863eee4d84f1721b055bc4568
4
+ data.tar.gz: e03fc2d0026c1e6d89bc8b59a4ef4da790d37d05
5
5
  SHA512:
6
- metadata.gz: 6b60ef40c307cd32941fc045558239795dcd6d8c7229058614a7536b4bf0163f27896f794a882aca28be5cbed9080bb959ccda4c16f136643318936ccb78d33d
7
- data.tar.gz: f3b1d7faaaf5c5d39af832a49c6650aa498a518503e414720d24d9f8f199e5eb4c5c43cf090815c5ae5b46ae1e81f509fc18ab81455d4a48e7c676a4014de3c4
6
+ metadata.gz: 8988397d5768b8e4b4f49ca1ccdd6932ea236285adff9c078aa46cf8f9c17b169f2e852b8094e1dddb7ba2877135408f051f95bcb6adfcb7188b3b317c84b642
7
+ data.tar.gz: 54095ac9a08f6a41504bcbf9e4c501b3d38b312b4eb29d6283ef7727eaed932dcb499abfda8f4558fc7fb33f39f931e163e1831b4df0ef7d1fc5d98b169d5e79
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  [![Build Status](https://travis-ci.org/adiwg/mdTranslator.svg?branch=master)](https://travis-ci.org/adiwg/mdTranslator)
2
+ [![Gem Version](https://badge.fury.io/rb/adiwg-mdtranslator.svg)](http://badge.fury.io/rb/adiwg-mdtranslator)
2
3
 
3
4
  # Mdtranslator
4
5
 
data/bin/mdtranslator CHANGED
File without changes
@@ -1,7 +1,7 @@
1
1
  module ADIWG
2
2
  module Mdtranslator
3
3
  # current mdtranslator version
4
- VERSION = "0.8.0"
4
+ VERSION = "0.8.1"
5
5
  end
6
6
  end
7
7
 
@@ -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
- s = hMetaInfo[:metadataURI]
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)
@@ -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.0
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-09-29 00:00:00.000000000 Z
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: