Skip to content

Commit

Permalink
Release Version 2.18.4 (#308)
Browse files Browse the repository at this point in the history
* Enforce Specific Versions

* Fix Code List Value

Remove hardcoded series value.
Replace with retrieved value from hDataQuality.

* Fix Errors When Undefined

* Update .gitignore

* Add External Contact Identifiers

* Remove puts

* Remove puts

* Update Version

* Update Gemfile.lock
  • Loading branch information
jwaspin committed Dec 6, 2023
1 parent 680ecbb commit 0b47a88
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
adiwg-mdtranslator (2.18.3)
adiwg-mdtranslator (2.18.4)
adiwg-mdcodes (= 2.8.4)
adiwg-mdjson_schemas (= 2.8.1)
builder (~> 3.2)
Expand Down
2 changes: 1 addition & 1 deletion lib/adiwg/mdtranslator/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
module ADIWG
module Mdtranslator
# current mdtranslator version
VERSION = "2.18.3"
VERSION = "2.18.4"
end
end

Expand Down
32 changes: 32 additions & 0 deletions lib/adiwg/mdtranslator/writers/html/sections/html_contact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,38 @@ def writeHtml(hContact)
@html.br
end

# contact - external identifiers []
if hContact.key?(:externalIdentifier) && !hContact[:externalIdentifier].empty?
hContact[:externalIdentifier].each do |identifier|
@html.details do
@html.summary("External Identifier", {'class' => 'h5'})
@html.section(:class => 'block') do
@html.em('Identifier: ')
@html.text!(identifier[:identifier])
@html.br

unless identifier[:namespace].nil?
@html.em('Namespace: ')
@html.text!(identifier[:namespace])
@html.br
end

unless identifier[:version].nil?
@html.em('Version: ')
@html.text!(identifier[:version])
@html.br
end

unless identifier[:description].nil?
@html.em('Description: ')
@html.text!(identifier[:description])
@html.br
end
end
end
end
end

end
end

Expand Down
28 changes: 18 additions & 10 deletions lib/adiwg/mdtranslator/writers/html/sections/html_scope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,29 @@ def writeHtml(hScope)
end

# scope - description [] {scopeDescription}
hScope[:scopeDescriptions].each do |hDescription|
@html.details do
@html.summary('Description', {'class' => 'h5'})
@html.section(:class => 'block') do
descriptionClass.writeHtml(hDescription)
unless !hScope.key?(:scopeDescriptions)
unless hScope[:scopeDescriptions].empty?
hScope[:scopeDescriptions].each do |hDescription|
@html.details do
@html.summary('Description', {'class' => 'h5'})
@html.section(:class => 'block') do
descriptionClass.writeHtml(hDescription)
end
end
end
end
end

# scope - extent [] {extent}
hScope[:extents].each do |hExtent|
@html.details do
@html.summary('Extent', {'class' => 'h5'})
@html.section(:class => 'block') do
extentClass.writeHtml(hExtent)
unless !hScope.key?(:extents)
unless hScope[:extents].empty?
hScope[:extents].each do |hExtent|
@html.details do
@html.summary('Extent', {'class' => 'h5'})
@html.section(:class => 'block') do
extentClass.writeHtml(hExtent)
end
end
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,19 @@ def writeXML(hDataQuality)
reportClass = DataQualityReport.new(@xml, @hResponseObj)
citationClass = CI_Citation.new(@xml, @hResponseObj)

codeListValue = nil
unless hDataQuality[:scope].empty?
unless hDataQuality[:scope][:scopeCode].nil?
codeListValue = hDataQuality[:scope][:scopeCode]
end
end

@xml.tag!('mdq:DQ_DataQuality') do

@xml.tag!('mdq:scope') do
@xml.tag!('mcc:MD_Scope') do
@xml.tag!('mcc:level') do
@xml.tag!('mcc:MD_ScopeCode', codeList: "http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode", codeListValue: "series")
@xml.tag!('mcc:MD_ScopeCode', codeList: "http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_ScopeCode", codeListValue: codeListValue)
end
end
end
Expand Down

0 comments on commit 0b47a88

Please sign in to comment.