Class: MD_AggregateInformation
- Inherits:
-
Object
- Object
- MD_AggregateInformation
- Defined in:
- lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_aggregateInformation.rb
Instance Method Summary collapse
-
#initialize(xml) ⇒ MD_AggregateInformation
constructor
A new instance of MD_AggregateInformation.
- #writeXML(hAssocRes) ⇒ Object
Constructor Details
#initialize(xml) ⇒ MD_AggregateInformation
Returns a new instance of MD_AggregateInformation.
16 17 18 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_aggregateInformation.rb', line 16 def initialize(xml) @xml = xml end |
Instance Method Details
#writeXML(hAssocRes) ⇒ Object
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 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_aggregateInformation.rb', line 20 def writeXML(hAssocRes) # aggregate information is being supported in the 19115-1 style, # ... aggregateDataSetIdentifier is being dropped and # ... resource identifiers are being carried inside the # ... citation > identifier section # classes used assocCode = DS_AssociationTypeCode.new(@xml) initCode = DS_InitiativeTypeCode.new(@xml) citationClass = CI_Citation.new(@xml) @xml.tag!('gmd:MD_AggregateInformation') do # aggregate information - aggregate data set name - citation hAssocCit = hAssocRes[:resourceCitation] if !hAssocCit.empty? @xml.tag!('gmd:aggregateDataSetName') do citationClass.writeXML(hAssocCit) end elsif $showAllTags @xml.tag!('gmd:aggregateDataSetName') end # aggregate information - aggregate data set identifier (use citation > identifier) # aggregate information - association type s = hAssocRes[:associationType] if !s.nil? @xml.tag!('gmd:associationType') do assocCode.writeXML(s) end elsif $showAllTags @xml.tag!('gmd:associationType') end # aggregate information - initiative type s = hAssocRes[:initiativeType] if !s.nil? @xml.tag!('gmd:initiativeType') do initCode.writeXML(s) end elsif $showAllTags @xml.tag!('gmd:initiativeType') end end end |