class CPEE::Properties::GetTransformation

Public Instance Methods

response() click to toggle source
# 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