Class: Robots::SdrRepo::SdrIngest::UpdateCatalog

Inherits:
Robots::SdrRepo::SdrRobot show all
Defined in:
lib/sdr_ingest/update_catalog.rb

Overview

A robot for creating new entries in the Archive Catalog for the object version

Instance Method Summary collapse

Methods inherited from Robots::SdrRepo::SdrRobot

#create_workflow_rows, #get_workflow_status, #get_workflow_xml, #process_item, #transmit, #update_workflow_error_status, #update_workflow_status

Constructor Details

#initialize(opts = {}) ⇒ UpdateCatalog

set workflow name, step name, log location, log severity level


16
17
18
# File 'lib/sdr_ingest/update_catalog.rb', line 16

def initialize(opts = {})
  super(self.class.workflow_name, self.class.step_name, opts)
end

Instance Method Details

#perform(druid) ⇒ void

This method returns an undefined value.

Returns process an object from the queue through this robot See LyberCore::Robot#work

Parameters:

  • druid (String)

    The item to be processed


23
24
25
26
# File 'lib/sdr_ingest/update_catalog.rb', line 23

def perform(druid)
  LyberCore::Log.debug("( #{__FILE__} : #{__LINE__} ) Enter perform")
  update_catalog(druid)
end

#update_catalog(druid) ⇒ void

This method returns an undefined value.

Returns Update the Archive Catalog's object and version tables for the new version

Parameters:

  • druid (String)

    The item to be processed


30
31
32
33
34
35
36
# File 'lib/sdr_ingest/update_catalog.rb', line 30

def update_catalog(druid)
  sdr_object = Replication::SdrObject.new(druid)
  latest_version_id = sdr_object.current_version_id
  sdr_object_version = Replication::SdrObjectVersion.new(sdr_object,latest_version_id)
  sdr_object_version.catalog_object_data
  sdr_object_version.catalog_version_data
end

#verification_files(druid) ⇒ Object


43
44
45
46
# File 'lib/sdr_ingest/update_catalog.rb', line 43

def verification_files(druid)
  files = []
  files
end

#verification_queries(druid) ⇒ Object


38
39
40
41
# File 'lib/sdr_ingest/update_catalog.rb', line 38

def verification_queries(druid)
  queries = []
  queries
end