Class: Samvera::NestingIndexer::Documents::PreservationDocument Private

Inherits:
Object
  • Object
show all
Defined in:
lib/samvera/nesting_indexer/documents.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

A simplified document that reflects the necessary attributes for re-indexing the children of Fedora objects.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keywords = {}) ⇒ PreservationDocument

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of PreservationDocument.



14
15
16
17
# File 'lib/samvera/nesting_indexer/documents.rb', line 14

def initialize(keywords = {})
  @id = keywords.fetch(:id).to_s
  @parent_ids = Array(keywords.fetch(:parent_ids))
end

Instance Attribute Details

#idObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns String The Fedora object’s PID.

Returns:

  • String The Fedora object’s PID



21
22
23
# File 'lib/samvera/nesting_indexer/documents.rb', line 21

def id
  @id
end

#parent_idsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

All of the direct parents of the Fedora document associated with the given PID.

This does not include grandparents, great-grandparents, etc.



29
30
31
# File 'lib/samvera/nesting_indexer/documents.rb', line 29

def parent_ids
  @parent_ids
end