Class: Kreuzberg::Result::DocumentNode

Inherits:
Object
  • Object
show all
Defined in:
lib/kreuzberg/document_structure.rb

Overview

Single node in the document structure tree.

Represents a logical unit of content with deterministic ID, content, tree structure information, and metadata.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ DocumentNode

Returns a new instance of DocumentNode.



49
50
51
52
53
# File 'lib/kreuzberg/document_structure.rb', line 49

def initialize(hash)
  assign_core_fields(hash)
  assign_tree_fields(hash)
  (hash)
end

Instance Attribute Details

#annotationsObject (readonly)

Returns the value of attribute annotations.



47
48
49
# File 'lib/kreuzberg/document_structure.rb', line 47

def annotations
  @annotations
end

#bboxObject (readonly)

Returns the value of attribute bbox.



47
48
49
# File 'lib/kreuzberg/document_structure.rb', line 47

def bbox
  @bbox
end

#childrenObject (readonly)

Returns the value of attribute children.



47
48
49
# File 'lib/kreuzberg/document_structure.rb', line 47

def children
  @children
end

#contentObject (readonly)

Returns the value of attribute content.



47
48
49
# File 'lib/kreuzberg/document_structure.rb', line 47

def content
  @content
end

#content_layerObject (readonly)

Returns the value of attribute content_layer.



47
48
49
# File 'lib/kreuzberg/document_structure.rb', line 47

def content_layer
  @content_layer
end

#idObject (readonly)

Returns the value of attribute id.



47
48
49
# File 'lib/kreuzberg/document_structure.rb', line 47

def id
  @id
end

#pageObject (readonly)

Returns the value of attribute page.



47
48
49
# File 'lib/kreuzberg/document_structure.rb', line 47

def page
  @page
end

#page_endObject (readonly)

Returns the value of attribute page_end.



47
48
49
# File 'lib/kreuzberg/document_structure.rb', line 47

def page_end
  @page_end
end

#parentObject (readonly)

Returns the value of attribute parent.



47
48
49
# File 'lib/kreuzberg/document_structure.rb', line 47

def parent
  @parent
end