Module: RTM::AR::IO::TOXTM2::Occurrence
- Defined in:
- lib/rtm/activerecord/io/to_xtm2.rb
Instance Method Summary collapse
Instance Method Details
#to_xtm2 ⇒ Object
120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/rtm/activerecord/io/to_xtm2.rb', line 120 def to_xtm2 warn("TOXTM2: 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.xtm2_id) if reifier item_identifiers.each { |ii| x << TOXTM2.locator(ii) } # itemIdentity x << TOXTM2.type(type) if type x << TOXTM2.scope(scope) unless scope.empty? x << TOXTM2.value(datatype, value) x end |