Class: Ddr::Extraction::Adapters::TikaAdapter
- Inherits:
-
Object
- Object
- Ddr::Extraction::Adapters::TikaAdapter
- Defined in:
- lib/ddr/extraction/adapters/tika_adapter.rb
Class Attribute Summary collapse
-
.checksum_type ⇒ Object
Tika distribution checksum type.
-
.checksum_value ⇒ Object
Tika distribution checksum.
-
.command ⇒ Object
Base command.
-
.download_url ⇒ Object
URL to download distribution.
-
.path ⇒ Object
Path to tika-app.jar.
-
.port ⇒ Object
Tika server port (optional, required for server).
-
.verify_checksum ⇒ Object
Verify checksum?.
-
.version ⇒ Object
Tika version.
Instance Method Summary collapse
-
#extract_text(file) ⇒ IO
Extract text from file.
Class Attribute Details
.checksum_type ⇒ Object
Tika distribution checksum type
34 35 36 |
# File 'lib/ddr/extraction/adapters/tika_adapter.rb', line 34 def checksum_type @checksum_type end |
.checksum_value ⇒ Object
Tika distribution checksum
31 32 33 |
# File 'lib/ddr/extraction/adapters/tika_adapter.rb', line 31 def checksum_value @checksum_value end |
.command ⇒ Object
Base command
22 23 24 |
# File 'lib/ddr/extraction/adapters/tika_adapter.rb', line 22 def command @command end |
.download_url ⇒ Object
URL to download distribution
25 26 27 |
# File 'lib/ddr/extraction/adapters/tika_adapter.rb', line 25 def download_url @download_url end |
.path ⇒ Object
Path to tika-app.jar
19 20 21 |
# File 'lib/ddr/extraction/adapters/tika_adapter.rb', line 19 def path @path end |
.port ⇒ Object
Tika server port (optional, required for server)
37 38 39 |
# File 'lib/ddr/extraction/adapters/tika_adapter.rb', line 37 def port @port end |
.verify_checksum ⇒ Object
Verify checksum?
28 29 30 |
# File 'lib/ddr/extraction/adapters/tika_adapter.rb', line 28 def verify_checksum @verify_checksum end |
.version ⇒ Object
Tika version
16 17 18 |
# File 'lib/ddr/extraction/adapters/tika_adapter.rb', line 16 def version @version end |
Instance Method Details
#extract_text(file) ⇒ IO
Extract text from file
10 11 12 |
# File 'lib/ddr/extraction/adapters/tika_adapter.rb', line 10 def extract_text(file) IO.popen(["java", "-jar", self.class.path, "--text", file]) end |