Last change
on this file since 5800 was 5800, checked in by cs025, 20 years ago |
Adding gs3build
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
762 bytes
|
Line | |
---|
1 | package org.greenstone.gsdl3.gs3build.doctypes;
|
---|
2 |
|
---|
3 | import java.io.File;
|
---|
4 | import java.net.URL;
|
---|
5 | import java.util.ArrayList;
|
---|
6 | import java.util.List;
|
---|
7 | import java.util.Map;
|
---|
8 |
|
---|
9 | /**
|
---|
10 | * A pretty basic DocumentInterface class - just able to
|
---|
11 | * provide unsophisticated access to the document as plain
|
---|
12 | * text, and no attempt at metadata extraction
|
---|
13 | */
|
---|
14 |
|
---|
15 | public class TextDocument extends AbstractDocument
|
---|
16 | {
|
---|
17 | public static final String TEXT_DOCUMENT_TYPE = "Text";
|
---|
18 |
|
---|
19 | public TextDocument(URL url)
|
---|
20 | { super(url);
|
---|
21 | }
|
---|
22 |
|
---|
23 | public String getDocumentType()
|
---|
24 | { return TEXT_DOCUMENT_TYPE;
|
---|
25 | }
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * A pretty minimal and lazy document text extraction process.
|
---|
29 | */
|
---|
30 | public String getDocumentText()
|
---|
31 | { return DocumentLoader.getAsString((URL) this.fileSet.getFile(0).getLocation());
|
---|
32 | }
|
---|
33 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.