Module: RTM::AR::IO::TOXTM1::Occurrence
- Defined in:
- lib/rtm/activerecord/io/to_xtm1.rb
Instance Method Summary collapse
Instance Method Details
#to_xtm1 ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/rtm/activerecord/io/to_xtm1.rb', line 119 def to_xtm1 warn("TOXTM1: Warning: outputting invalid Occurrence #{self}") unless valid? # occurrence = element occurrence { reifiable, # type, scope?, ( resourceRef | resourceData ) } x = REXML::Element.new 'occurrence' x.add_attribute('reifier', reifier.xtm1_id) if reifier item_identifiers.each { |ii| x << TOXTM1.ii(ii) } # itemIdentity x << TOXTM1.type(type) if type x << TOXTM1.scope(scope) unless scope.empty? x << TOXTM1.value(datatype, value) x end |