Class: Curate::Indexer::Documents::IndexDocument Private

Inherits:
Object
  • Object
show all
Defined in:
lib/curate/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 rudimentary representation of what is needed to reindex Solr documents

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keywords = {}) ⇒ IndexDocument

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 IndexDocument.



25
26
27
28
29
30
# File 'lib/curate/indexer/documents.rb', line 25

def initialize(keywords = {})
  @pid = keywords.fetch(:pid).to_s
  @parent_pids = Array(keywords.fetch(:parent_pids))
  @pathnames = Array(keywords.fetch(:pathnames))
  @ancestors = Array(keywords.fetch(:ancestors))
end

Instance Attribute Details

#ancestorsObject (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.



31
32
33
# File 'lib/curate/indexer/documents.rb', line 31

def ancestors
  @ancestors
end

#parent_pidsObject (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.



31
32
33
# File 'lib/curate/indexer/documents.rb', line 31

def parent_pids
  @parent_pids
end

#pathnamesObject (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.



31
32
33
# File 'lib/curate/indexer/documents.rb', line 31

def pathnames
  @pathnames
end

#pidObject (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.



31
32
33
# File 'lib/curate/indexer/documents.rb', line 31

def pid
  @pid
end

Instance Method Details

#sorted_ancestorsObject

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.



41
42
43
# File 'lib/curate/indexer/documents.rb', line 41

def sorted_ancestors
  ancestors.sort
end

#sorted_parent_pidsObject

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.



33
34
35
# File 'lib/curate/indexer/documents.rb', line 33

def sorted_parent_pids
  parent_pids.sort
end

#sorted_pathnamesObject

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.



37
38
39
# File 'lib/curate/indexer/documents.rb', line 37

def sorted_pathnames
  pathnames.sort
end