class Libis::Services::CollectiveAccess::Cataloguing

Public Class Methods

new(host = nil) click to toggle source
Calls superclass method
# File lib/libis/services/collective_access/cataloguing.rb, line 11
def initialize(host = nil)
  super 'Cataloguing', host
end

Public Instance Methods

add_attribute(item, attribute, data, type = nil) click to toggle source
# File lib/libis/services/collective_access/cataloguing.rb, line 28
def add_attribute(item, attribute, data, type = nil)
  type ||= 'ca_objects'
  r, a = soap_encode data
  request :addAttribute, type: type, item_id: item, attribute_code_or_id: attribute.to_s, attribute_data_array: r, :attributes! => {attribute_data_array: a}
end
add_attributes(item, data, type = nil) click to toggle source
# File lib/libis/services/collective_access/cataloguing.rb, line 21
def add_attributes(item, data, type = nil)
  type ||= 'ca_objects'
  r, a = soap_encode data
  request :getAttributesByElement, type: type, item_id: item, attribute_code_or_id: attribute.to_s, attribute_list_array: r, :attributes! => {attribute_list_array: a}

end
add_item(fields, type = nil) click to toggle source
# File lib/libis/services/collective_access/cataloguing.rb, line 15
def add_item(fields, type = nil)
  type ||= 'ca_objects'
  r, a = soap_encode fields
  request :add, type: type, fieldInfo: r, :attributes! => {fieldInfo: a}
end
remove(item, type = nil) click to toggle source
# File lib/libis/services/collective_access/cataloguing.rb, line 34
def remove(item, type = nil)
  type ||= 'ca_objects'
  request :remove, type: type, item_id: item
end
remove_attributes(item, type = nil) click to toggle source
# File lib/libis/services/collective_access/cataloguing.rb, line 39
def remove_attributes(item, type = nil)
  type ||= 'ca_objects'
  request :removeAllAttributes, type: type, item_id: item
end