Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop -> master #311

Merged
merged 7 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
.bundle
.config
.yardoc
Gemfile.lock
InstalledFiles
_yardoc
coverage
Expand All @@ -22,3 +21,5 @@ tmp
mkmf.log
/.idea
/.rake_tasks~
vendor/
*.DS_Store
84 changes: 84 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
PATH
remote: .
specs:
adiwg-mdtranslator (2.18.4)
adiwg-mdcodes (= 2.8.4)
adiwg-mdjson_schemas (= 2.8.1)
builder (~> 3.2)
coderay (~> 1.1)
jbuilder (~> 2.5)
json (~> 2.0)
json-schema (~> 2.7)
kramdown (>= 1.13, < 3.0)
nokogiri (~> 1.7)
thor (~> 0.19)
uuidtools (~> 2.1)

GEM
remote: https://rubygems.org/
specs:
actionview (5.2.8.1)
activesupport (= 5.2.8.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activesupport (5.2.8.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
adiwg-mdcodes (2.8.4)
json (~> 2.0)
adiwg-mdjson_schemas (2.8.1)
builder (3.2.4)
coderay (1.1.3)
concurrent-ruby (1.2.2)
crass (1.0.6)
erubi (1.12.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
json (2.6.3)
json-schema (2.8.1)
addressable (>= 2.4)
kramdown (2.4.0)
rexml
loofah (2.21.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mini_portile2 (2.4.0)
minitest (5.20.0)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
public_suffix (4.0.7)
rails-dom-testing (2.1.1)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
rake (13.1.0)
rexml (3.2.5)
thor (0.20.3)
thread_safe (0.3.6)
tzinfo (1.2.11)
thread_safe (~> 0.1)
uuidtools (2.2.0)

PLATFORMS
arm64-darwin-22
x86_64-linux

DEPENDENCIES
adiwg-mdtranslator!
bundler (~> 2)
minitest (~> 5)
rake (~> 13)

BUNDLED WITH
2.4.21
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Rake::TestTask.new do |t|
'test/writers/fgdc/tc*.rb',
'test/writers/html/tc*.rb',
'test/writers/iso19110/tc*.rb',
'test/writers/iso19115-1/tc*.rb',
'test/writers/iso19115-2/tc*.rb',
'test/writers/iso19115-3/tc*.rb',
'test/writers/mdJson/tc*.rb',
'test/writers/sbJson/tc*.rb',
'test/translator/tc*.rb'
Expand Down
10 changes: 5 additions & 5 deletions adiwg-mdtranslator.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = '>= 2.3'

spec.add_development_dependency "bundler", "~> 2"
spec.add_development_dependency "rake", "~> 10"
spec.add_development_dependency "rake", "~> 13"
spec.add_development_dependency "minitest", "~> 5"

spec.add_runtime_dependency "json", "~> 2.0"
spec.add_runtime_dependency "builder", "~> 3.2"
spec.add_runtime_dependency "thor", "~> 0.19"
spec.add_runtime_dependency "uuidtools", "~> 2.1"
spec.add_runtime_dependency "json-schema", "~> 2.7"
spec.add_runtime_dependency "adiwg-mdjson_schemas", "~> 2.8"
spec.add_runtime_dependency "adiwg-mdcodes", "~> 2.8"
spec.add_runtime_dependency "adiwg-mdjson_schemas", "2.8.1"
spec.add_runtime_dependency "adiwg-mdcodes", "2.8.4"
spec.add_runtime_dependency "jbuilder", "~> 2.5"
spec.add_runtime_dependency "kramdown", "~> 1.13"
spec.add_runtime_dependency "kramdown", ">= 1.13", "< 3.0"
spec.add_runtime_dependency "coderay", "~> 1.1"
spec.add_runtime_dependency "nokogiri", "~> 1.7"

end
end
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def self.unpack(hRParty, responseObj, inContext = nil)
end

# instance classes needed in script
# CI_Responsibility replaces CI_ResponsibleParty in 19115-1
# CI_Responsibility replaces CI_ResponsibleParty in 19115-3
# Responsibility object is translated to ResponsibleParty by 19115-2 writer
intMetadataClass = InternalMetadata.new
intResParty = intMetadataClass.newResponsibility
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.2"
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
15 changes: 0 additions & 15 deletions lib/adiwg/mdtranslator/writers/iso19115_1/version.rb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ISO <<Class>> MD_AssociatedResource
# 19115-1 writer output in XML
# 19115-3 writer output in XML

# History:
# Stan Smith 2019-04-22 original script
Expand All @@ -9,14 +9,14 @@
module ADIWG
module Mdtranslator
module Writers
module Iso19115_1
module Iso19115_3

class AdditionalDocument

def initialize(xml, hResponseObj)
@xml = xml
@hResponseObj = hResponseObj
@NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_1
@NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_3
end

def writeXML(hAdditionalDoc, inContext = nil)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# ISO <<Class>> CI_Address
# 19115-1 writer output in XML
# 19115-3 writer output in XML

# History:
# Stan Smith 2019-03-18 original script

module ADIWG
module Mdtranslator
module Writers
module Iso19115_1
module Iso19115_3

class CI_Address

Expand All @@ -23,9 +23,9 @@ def writeXML(hAddress)

unless hAddress.nil?

# address - address type (not used by ISO 19115-1)
# address - address type (not used by ISO 19115-3)

# address - description (not used by ISO 19115-1)
# address - description (not used by ISO 19115-3)

# address - delivery points []
aDeliveryPoints = hAddress[:deliveryPoints]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# ISO <<Class>> LE_Algorithm
# 19115-1 writer output in XML
# 19115-3 writer output in XML

# History:
# Stan Smith 201-09-27 original script.

require_relative '../iso19115_1_writer'
require_relative '../iso19115_3_writer'
require_relative 'class_citation'

module ADIWG
module Mdtranslator
module Writers
module Iso19115_1
module Iso19115_3

class LE_Algorithm

def initialize(xml, hResponseObj)
@xml = xml
@hResponseObj = hResponseObj
@NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_1
@NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_3
end

def writeXML(hAlgorithm, inContext = nil)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# ISO <<Class>> MD_AssociatedResource
# 19115-1 writer output in XML
# 19115-3 writer output in XML

# History:
# Stan Smith 2019-03-25 original script

require_relative '../iso19115_1_writer'
require_relative '../iso19115_3_writer'
require_relative 'class_codelist'
require_relative 'class_citation'

module ADIWG
module Mdtranslator
module Writers
module Iso19115_1
module Iso19115_3

class MD_AssociatedResource

def initialize(xml, hResponseObj)
@xml = xml
@hResponseObj = hResponseObj
@NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_1
@NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_3
end

def writeXML(hAssocRes, inContext = nil)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# ISO <<Class>> attribute group
# 19115-1 writer output in XML
# 19115-3 writer output in XML

# History:
# Stan Smith 2019-04-08 original script.

require_relative '../iso19115_1_writer'
require_relative '../iso19115_3_writer'
require_relative 'class_rangeDimension'
require_relative 'class_sampleDimension'
require_relative 'class_mdBand'
Expand All @@ -13,14 +13,14 @@
module ADIWG
module Mdtranslator
module Writers
module Iso19115_1
module Iso19115_3

class Attribute

def initialize(xml, hResponseObj)
@xml = xml
@hResponseObj = hResponseObj
@NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_1
@NameSpace = ADIWG::Mdtranslator::Writers::Iso19115_3
end

def writeXML(hAttribute, inContext = nil)
Expand Down
Loading
Loading