diff --git a/lib/adiwg/mdtranslator/readers/mdJson/modules/module_event.rb b/lib/adiwg/mdtranslator/readers/mdJson/modules/module_event.rb index 562e7dfa..6d3b5d55 100644 --- a/lib/adiwg/mdtranslator/readers/mdJson/modules/module_event.rb +++ b/lib/adiwg/mdtranslator/readers/mdJson/modules/module_event.rb @@ -50,7 +50,7 @@ def self.unpack(hEvent, responseObj, inContext = nil) end if hEvent.has_key?('time') - intEvent[:time] = DateTime.unpack(hEvent['time'], responseObj, outContext) + intEvent[:time] = hEvent['time'] else @MessagePath.issueWarning(40, responseObj, outContext) end diff --git a/lib/adiwg/mdtranslator/readers/mdJson/modules/module_requestedDate.rb b/lib/adiwg/mdtranslator/readers/mdJson/modules/module_requestedDate.rb index 070fc414..3f65f95d 100644 --- a/lib/adiwg/mdtranslator/readers/mdJson/modules/module_requestedDate.rb +++ b/lib/adiwg/mdtranslator/readers/mdJson/modules/module_requestedDate.rb @@ -23,21 +23,15 @@ def self.unpack(hRequestedDate, responseObj, inContext = nil) intRequestedDate = intMetadataClass.newRequestedDate if hRequestedDate.has_key?('requestedDateOfCollection') - hReturn = DateTime.unpack(hRequestedDate['requestedDateOfCollection'], responseObj, outContext) - unless hReturn.nil? - intRequestedDate[:requestedDateOfCollection] = hReturn - else - @MessagePath.issueError(161, responseObj, inContext) - end + intRequestedDate[:requestedDateOfCollection] = hRequestedDate['requestedDateOfCollection'] + else + @MessagePath.issueError(161, responseObj, inContext) end if hRequestedDate.has_key?('latestAcceptableDate') - hReturn = DateTime.unpack(hRequestedDate['latestAcceptableDate'], responseObj, outContext) - unless hReturn.nil? - intRequestedDate[:latestAcceptableDate] = hReturn - else - @MessagePath.issueError(161, responseObj, inContext) - end + intRequestedDate[:latestAcceptableDate] = hRequestedDate['latestAcceptableDate'] + else + @MessagePath.issueError(161, responseObj, inContext) end intRequestedDate diff --git a/lib/adiwg/mdtranslator/readers/mdJson/modules/module_revision.rb b/lib/adiwg/mdtranslator/readers/mdJson/modules/module_revision.rb index c747d7af..648b19f0 100644 --- a/lib/adiwg/mdtranslator/readers/mdJson/modules/module_revision.rb +++ b/lib/adiwg/mdtranslator/readers/mdJson/modules/module_revision.rb @@ -30,10 +30,7 @@ def self.unpack(hRevision, responseObj, inContext = nil) if hRevision.has_key?('dateInfo') hRevision['dateInfo'].each do |item| - hReturn = DateTime.unpack(item, responseObj, outContext) - unless hReturn.nil? - intRevision[:dateInfo] << hReturn - end + intRevision[:dateInfo] << item end else @MessagePath.issueWarning(41, responseObj, outContext) diff --git a/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_environment.rb b/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_environment.rb index 346523cc..ce18730e 100644 --- a/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_environment.rb +++ b/lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_environment.rb @@ -43,12 +43,12 @@ def writeXML(hEnvironment) end unless hEnvironment[:meteorologicalConditions].nil? - @xml.tag!('mac:meteorologicalConditions') do + @xml.tag!('mac:meterologicalConditions') do @xml.tag!('gco:CharacterString', hEnvironment[:meteorologicalConditions]) end else if @hResponseObj[:writerShowTags] - @xml.tag!('mac:meteorologicalConditions') + @xml.tag!('mac:meterologicalConditions') end end diff --git a/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_event.rb b/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_event.rb index cb8da25c..a028a509 100644 --- a/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_event.rb +++ b/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_event.rb @@ -23,7 +23,7 @@ def self.build(hEvent) json.trigger hEvent[:trigger] json.context hEvent[:context] json.sequence hEvent[:sequence] - json.time DateTime.build(hEvent[:time]) + json.time hEvent[:time] json.expectedObjective @Namespace.json_map(hEvent[:expectedObjectives], Objective) json.relatedPass Pass.build(hEvent[:relatedPass]) json.relatedSensor @Namespace.json_map(hEvent[:relatedSensors], Instrument) diff --git a/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_requestedDate.rb b/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_requestedDate.rb index 63457467..23b1b3e6 100644 --- a/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_requestedDate.rb +++ b/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_requestedDate.rb @@ -13,8 +13,8 @@ module RequestedDate def self.build(hRequestedDate) Jbuilder.new do |json| - json.requestedDateOfCollection DateTime.build(hRequestedDate[:requestedDateOfCollection]) - json.latestAcceptableDate DateTime.build(hRequestedDate[:latestAcceptableDate]) + json.requestedDateOfCollection hRequestedDate[:requestedDateOfCollection] + json.latestAcceptableDate hRequestedDate[:latestAcceptableDate] end end diff --git a/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_revision.rb b/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_revision.rb index 2459433c..0a330ddc 100644 --- a/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_revision.rb +++ b/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_revision.rb @@ -16,7 +16,7 @@ def self.build(hRevision) Jbuilder.new do |json| json.description hRevision[:description] json.responsibleParty @Namespace.json_map(hRevision[:responsibleParties], ResponsibleParty) - json.dateInfo @Namespace.json_map(hRevision[:dateInfo], DateTime) + json.dateInfo hRevision[:dateInfo] end end