Class: Xberg::FormatMetadataOcr

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
FormatMetadata
Defined in:
lib/xberg/native.rb

Overview

Metadata produced by an OCR pipeline.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



1911
1912
1913
# File 'lib/xberg/native.rb', line 1911

def value
  @value
end

Class Method Details

.from_hash(hash) ⇒ Object



1963
1964
1965
1966
# File 'lib/xberg/native.rb', line 1963

def self.from_hash(hash)
  payload = hash.reject { |key, _| key.to_s == "format_type" }.transform_keys(&:to_sym)
  new(value: OcrMetadata.new(payload))
end

Instance Method Details

#archive?Boolean

Returns:

  • (Boolean)


1929
# File 'lib/xberg/native.rb', line 1929

def archive? = false

#audio?Boolean

Returns:

  • (Boolean)


1957
# File 'lib/xberg/native.rb', line 1957

def audio? = false

#bibtex?Boolean

Returns:

  • (Boolean)


1943
# File 'lib/xberg/native.rb', line 1943

def bibtex? = false

#citation?Boolean

Returns:

  • (Boolean)


1945
# File 'lib/xberg/native.rb', line 1945

def citation? = false

#code?Boolean

Returns:

  • (Boolean)


1959
1960
1961
# File 'lib/xberg/native.rb', line 1959

def code? = false
# @param hash [Hash] deserialized from the native extension
# @return [self]

#csv?Boolean

Returns:

  • (Boolean)


1941
# File 'lib/xberg/native.rb', line 1941

def csv? = false

#dbf?Boolean

Returns:

  • (Boolean)


1949
# File 'lib/xberg/native.rb', line 1949

def dbf? = false

#docx?Boolean

Returns:

  • (Boolean)


1921
# File 'lib/xberg/native.rb', line 1921

def docx? = false

#email?Boolean

Returns:

  • (Boolean)


1925
# File 'lib/xberg/native.rb', line 1925

def email? = false

#epub?Boolean

Returns:

  • (Boolean)


1953
# File 'lib/xberg/native.rb', line 1953

def epub? = false

#excel?Boolean

Returns:

  • (Boolean)


1923
# File 'lib/xberg/native.rb', line 1923

def excel? = false

#fiction_book?Boolean

Returns:

  • (Boolean)


1947
# File 'lib/xberg/native.rb', line 1947

def fiction_book? = false

#html?Boolean

Returns:

  • (Boolean)


1937
# File 'lib/xberg/native.rb', line 1937

def html? = false

#image?Boolean

Returns:

  • (Boolean)


1931
# File 'lib/xberg/native.rb', line 1931

def image? = false

#jats?Boolean

Returns:

  • (Boolean)


1951
# File 'lib/xberg/native.rb', line 1951

def jats? = false

#ocr?Boolean

Returns:

  • (Boolean)


1939
# File 'lib/xberg/native.rb', line 1939

def ocr? = true

#pdf?Boolean

Returns:

  • (Boolean)


1919
# File 'lib/xberg/native.rb', line 1919

def pdf? = false

#pptx?Boolean

Returns:

  • (Boolean)


1927
# File 'lib/xberg/native.rb', line 1927

def pptx? = false

#pst?Boolean

Returns:

  • (Boolean)


1955
# File 'lib/xberg/native.rb', line 1955

def pst? = false

#text?Boolean

Returns:

  • (Boolean)


1935
# File 'lib/xberg/native.rb', line 1935

def text? = false

#xml?Boolean

Returns:

  • (Boolean)


1933
# File 'lib/xberg/native.rb', line 1933

def xml? = false