Class: CPEE::Properties::GetTransformation

Inherits:
Riddl::Implementation
  • Object
show all
Defined in:
lib/cpee/implementation_properties.rb

Overview

}}}

Instance Method Summary collapse

Instance Method Details

#responseObject

{{{



796
797
798
799
800
801
802
803
804
805
806
807
808
809
# File 'lib/cpee/implementation_properties.rb', line 796

def response
  id = @a[0]
  opts = @a[1]
  doc = XML::Smart::open_unprotected(opts[:properties_empty])
  doc.register_namespace 'p', 'http://cpee.org/ns/properties/2.0'
  des = doc.find('/p:properties/p:transformation').first
  des.find('p:description').first.text = CPEE::Persistence::extract_item(id,opts,'transformation/description')
  des.find('p:dataelements').first.text = CPEE::Persistence::extract_item(id,opts,'transformation/dataelements')
  des.find('p:endpoints').first.text = CPEE::Persistence::extract_item(id,opts,'transformation/endpoints')
  des.find('p:description/@type').first.text = CPEE::Persistence::extract_item(id,opts,'transformation/description/@type')
  des.find('p:dataelements/@type').first.text = CPEE::Persistence::extract_item(id,opts,'transformation/dataelements/@type')
  des.find('p:endpoints/@type').first.text = CPEE::Persistence::extract_item(id,opts,'transformation/endpoints/@type')
  Riddl::Parameter::Complex.new('status','text/xml',des.to_doc.to_s)
end