lib/adiwg/mdtranslator/writers/iso19110/iso19110_writer.rb in adiwg-mdtranslator-2.15.0 vs lib/adiwg/mdtranslator/writers/iso19110/iso19110_writer.rb in adiwg-mdtranslator-2.16.1
- old
+ new
@@ -19,11 +19,11 @@
module ADIWG
module Mdtranslator
module Writers
module Iso19110
- def self.startWriter(intObj, hResponseObj, whichDict = 0)
+ def self.startWriter(intObj, hResponseObj, whichDict = 0, embed = false)
# load error message array
file = File.join(File.dirname(__FILE__), 'iso19110_writer_messages_eng') + '.yml'
hMessageList = YAML.load_file(file)
@aMessagesList = hMessageList['messageList']
@@ -39,22 +39,22 @@
end
if intObj[:dataDictionaries].length > 1
issueNotice(111)
end
- dictionary = intObj[:dataDictionaries][whichDict]
- @domains = dictionary[:domains]
+ hDictionary = intObj[:dataDictionaries][whichDict]
+ @domains = hDictionary[:domains]
# set the format of the output file based on the writer specified
hResponseObj[:writerOutputFormat] = 'xml'
hResponseObj[:writerVersion] = ADIWG::Mdtranslator::Writers::Iso19110::VERSION
# create new XML document
@xml = Builder::XmlMarkup.new(indent: 3)
# start writing the ISO 19110 XML record
metadataWriter = FC_FeatureCatalogue.new(@xml, hResponseObj)
- metadata = metadataWriter.writeXML(intObj)
+ metadata = metadataWriter.writeXML(hDictionary, embed)
return metadata
end