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