class ADIWG::Mdtranslator::Writers::Iso19115_2::MD_ScopeDescription

Public Class Methods

new(xml, hResponseObj) click to toggle source
# File lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_scopeDescription.rb, line 14
def initialize(xml, hResponseObj)
   @xml = xml
   @hResponseObj = hResponseObj
end

Public Instance Methods

writeXML(hScopeDesc) click to toggle source
# File lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_scopeDescription.rb, line 19
def writeXML(hScopeDesc)

   # these scope description types not implemented -----------------------------
   # attributes (ISO 19115-2 XSD type is set to 'empty')
   # features (ISO 19115-2 XSD type is set to 'empty')
   # featureInstances (not supported in mdJson)
   # attributeInstances (not supported in mdJson)

   # scope description - dataset
   sData = hScopeDesc[:dataset]
   unless sData.nil?
      @xml.tag!('gmd:levelDescription') do
         @xml.tag!('gmd:MD_ScopeDescription') do
            @xml.tag!('gmd:dataset') do
               @xml.tag!('gco:CharacterString', sData)
            end
         end
      end
   end

   # scope description - other
   sOther = hScopeDesc[:other]
   unless sOther.nil?
      @xml.tag!('gmd:levelDescription') do
         @xml.tag!('gmd:MD_ScopeDescription') do
            @xml.tag!('gmd:other') do
               @xml.tag!('gco:CharacterString', sOther)
            end
         end
      end
   end

end