Class: CI_OnlineResource
- Inherits:
-
Object
- Object
- CI_OnlineResource
- Defined in:
- lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_onlineResource.rb
Instance Method Summary collapse
-
#initialize(xml) ⇒ CI_OnlineResource
constructor
A new instance of CI_OnlineResource.
- #writeXML(hOlResource) ⇒ Object
Constructor Details
#initialize(xml) ⇒ CI_OnlineResource
Returns a new instance of CI_OnlineResource.
13 14 15 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_onlineResource.rb', line 13 def initialize(xml) @xml = xml end |
Instance Method Details
#writeXML(hOlResource) ⇒ 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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_onlineResource.rb', line 17 def writeXML(hOlResource) # classes used olFunctionCode = CI_OnLineFunctionCode.new(@xml) @xml.tag! 'gmd:CI_OnlineResource' do # online resource - link - required s = hOlResource[:olResURI] if s.nil? @xml.tag!('gmd:linkage',{'gco:nilReason'=>'missing'}) else @xml.tag!('gmd:linkage') do @xml.tag!('gmd:URL',s) end end # online resource - protocol s = hOlResource[:olResProtocol] if !s.nil? @xml.tag!('gmd:protocol') do @xml.tag!('gco:CharacterString',s) end elsif $showAllTags @xml.tag!('gmd:protocol') end # online resource - link name s = hOlResource[:olResName] if !s.nil? @xml.tag!('gmd:name') do @xml.tag!('gco:CharacterString',s) end elsif $showAllTags @xml.tag!('gmd:name') end # online resource - link description s = hOlResource[:olResDesc] if !s.nil? @xml.tag!('gmd:description') do @xml.tag!('gco:CharacterString',s) end elsif $showAllTags @xml.tag!('gmd:description') end # online resource - link function - CI_OnLineFunctionCode s = hOlResource[:olResFunction] if !s.nil? @xml.tag!('gmd:function') do olFunctionCode.writeXML(s) end elsif $showAllTags @xml.tag!('gmd:function') end end end |