Class: MD_DigitalTransferOptions
- Inherits:
-
Object
- Object
- MD_DigitalTransferOptions
- Defined in:
- lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_digitalTransferOptions.rb
Instance Method Summary collapse
-
#initialize(xml) ⇒ MD_DigitalTransferOptions
constructor
A new instance of MD_DigitalTransferOptions.
- #writeXML(transOption) ⇒ Object
Constructor Details
#initialize(xml) ⇒ MD_DigitalTransferOptions
Returns a new instance of MD_DigitalTransferOptions.
13 14 15 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_digitalTransferOptions.rb', line 13 def initialize(xml) @xml = xml end |
Instance Method Details
#writeXML(transOption) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_digitalTransferOptions.rb', line 17 def writeXML(transOption) # classes used olResClass = CI_OnlineResource.new(@xml) medClass = MD_Medium.new(@xml) @xml.tag!('gmd:MD_DigitalTransferOptions') do # digital transfer options - online [] - CI_OnlineResource aOnTranOpts = transOption[:online] if !aOnTranOpts.empty? aOnTranOpts.each do |olTranOpt| @xml.tag!('gmd:onLine') do olResClass.writeXML(olTranOpt) end end elsif $showAllTags @xml.tag!('gmd:onLine') end # digital transfer options - offline - MD_Medium hOffTranOpt = transOption[:offline] if !hOffTranOpt.empty? @xml.tag!('gmd:offLine') do medClass.writeXML(hOffTranOpt) end elsif $showAllTags @xml.tag!('gmd:offLine') end end end |