Class: Xberg::FormatMetadataOcr
- Inherits:
-
Data
- Object
- Data
- Xberg::FormatMetadataOcr
- Extended by:
- T::Sig
- Includes:
- FormatMetadata
- Defined in:
- lib/xberg/native.rb
Overview
Metadata produced by an OCR pipeline.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
- #archive? ⇒ Boolean
- #audio? ⇒ Boolean
- #bibtex? ⇒ Boolean
- #citation? ⇒ Boolean
- #code? ⇒ Boolean
- #csv? ⇒ Boolean
- #dbf? ⇒ Boolean
- #docx? ⇒ Boolean
- #email? ⇒ Boolean
- #epub? ⇒ Boolean
- #excel? ⇒ Boolean
- #fiction_book? ⇒ Boolean
- #html? ⇒ Boolean
- #image? ⇒ Boolean
- #jats? ⇒ Boolean
- #ocr? ⇒ Boolean
- #pdf? ⇒ Boolean
- #pptx? ⇒ Boolean
- #pst? ⇒ Boolean
- #text? ⇒ Boolean
- #xml? ⇒ Boolean
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute 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
1929 |
# File 'lib/xberg/native.rb', line 1929 def archive? = false |
#audio? ⇒ Boolean
1957 |
# File 'lib/xberg/native.rb', line 1957 def audio? = false |
#bibtex? ⇒ Boolean
1943 |
# File 'lib/xberg/native.rb', line 1943 def bibtex? = false |
#citation? ⇒ Boolean
1945 |
# File 'lib/xberg/native.rb', line 1945 def citation? = false |
#code? ⇒ 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
1941 |
# File 'lib/xberg/native.rb', line 1941 def csv? = false |
#dbf? ⇒ Boolean
1949 |
# File 'lib/xberg/native.rb', line 1949 def dbf? = false |
#docx? ⇒ Boolean
1921 |
# File 'lib/xberg/native.rb', line 1921 def docx? = false |
#email? ⇒ Boolean
1925 |
# File 'lib/xberg/native.rb', line 1925 def email? = false |
#epub? ⇒ Boolean
1953 |
# File 'lib/xberg/native.rb', line 1953 def epub? = false |
#excel? ⇒ Boolean
1923 |
# File 'lib/xberg/native.rb', line 1923 def excel? = false |
#fiction_book? ⇒ Boolean
1947 |
# File 'lib/xberg/native.rb', line 1947 def fiction_book? = false |
#html? ⇒ Boolean
1937 |
# File 'lib/xberg/native.rb', line 1937 def html? = false |
#image? ⇒ Boolean
1931 |
# File 'lib/xberg/native.rb', line 1931 def image? = false |
#jats? ⇒ Boolean
1951 |
# File 'lib/xberg/native.rb', line 1951 def jats? = false |
#ocr? ⇒ Boolean
1939 |
# File 'lib/xberg/native.rb', line 1939 def ocr? = true |
#pdf? ⇒ Boolean
1919 |
# File 'lib/xberg/native.rb', line 1919 def pdf? = false |
#pptx? ⇒ Boolean
1927 |
# File 'lib/xberg/native.rb', line 1927 def pptx? = false |
#pst? ⇒ Boolean
1955 |
# File 'lib/xberg/native.rb', line 1955 def pst? = false |
#text? ⇒ Boolean
1935 |
# File 'lib/xberg/native.rb', line 1935 def text? = false |
#xml? ⇒ Boolean
1933 |
# File 'lib/xberg/native.rb', line 1933 def xml? = false |