|
DLESE Tools v1.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.index.reader.DocReader org.dlese.dpc.index.reader.FileIndexingServiceDocReader
An abstract class that provides getter methods to read data from a Lucene
Document
that was created by a FileIndexingServiceWriter
. The getter methods
can then be accessed from (Struts) beans that need the data. This class may
be extended for each Document
type that
might be returned in a search. After implemeting a new
FileIndexingServiceDocReader, a new switch to access it should be added to
class ResultDoc
.
Field Summary |
---|
Fields inherited from class org.dlese.dpc.index.reader.DocReader |
---|
conf, doc, score |
Constructor Summary | |
---|---|
protected |
FileIndexingServiceDocReader()
Constructor that initializes an empty DocReader. |
protected |
FileIndexingServiceDocReader(Document doc)
Constructor that may be used programatically to wrap a reader around a Lucene Document that was created by a DocWriter . |
protected |
FileIndexingServiceDocReader(Document doc,
float score,
ResultDocConfig conf)
Constructor that is used by ResultDoc at search time to
create a new instance of a DocReader. |
Method Summary | |
---|---|
boolean |
fileExists()
Determine whether the file associated with this Document exists. |
protected static String |
getDateStamp()
Return a string for the current time and date, sutiable for display in log files and output to standout: |
String |
getDeleted()
Determine whether the status of this Document is deleted, indicated by a return
value of "true". |
String |
getDocDir()
Gets the absolute path of the directory that contained the File used to index the Document . |
String |
getDocsource()
Gets the absolute path of the file that was used to index the Document . |
String |
getDocsourceEncoded()
Gets the absolute path of the file that was used to index the Document , encoded. |
String |
getDoctype()
Gets doctype associated with the Document , for example 'dlese_ims,' 'adn,' or
'html'. |
String |
getFileExists()
Determine whether the file associated with this Document exists, indicated by a return value of
"true". |
String |
getFileName()
Gets the name of the File that was used to index the Document . |
String |
getFullContent()
Gets the full content of the file that was used to index the Document . |
long |
getLastModified()
Gets the File modification time of the File used to index the Document . |
String |
getLastModifiedString()
Gets a String representataion of the File modification time of the File used to index the Document . |
File |
getSourceFile()
Gets the File that was used to index the Document . |
boolean |
isDeleted()
Determine whether the status of this Document is deleted. |
protected static void |
prtln(String s)
Output a line of text to standard out, with datestamp, if debug is set to true. |
protected static void |
prtlnErr(String s)
Output a line of text to error out, with datestamp. |
protected static void |
setDebug(boolean db)
Sets the debug attribute. |
Methods inherited from class org.dlese.dpc.index.reader.DocReader |
---|
getDocument, getIndex, getQuery, getReaderType, getScore, setDoc |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected FileIndexingServiceDocReader(Document doc, float score, ResultDocConfig conf)
ResultDoc
at search time to
create a new instance of a DocReader.
doc
- The Lucene Document that is read.score
- The rank of the Document in a set of results.protected FileIndexingServiceDocReader(Document doc)
Document
that was created by a DocWriter
.
doc
- A Lucene Document
.DocWriter
protected FileIndexingServiceDocReader()
Method Detail |
public final String getFullContent()
Document
. This includes all XML or HTML tags,
etc.
public String getDoctype()
Document
, for example 'dlese_ims,' 'adn,' or
'html'. Note that to support wildcard searching, the doctype is indexed
with a leading '0' appened to the beginning. This method strips the leading
zero prior to returning.
public String getDeleted()
Document
is deleted, indicated by a return
value of "true". This does not necessarily mean the file has been deleted.
public boolean isDeleted()
Document
is deleted. This does not necessarily
mean the file has been deleted.
public String getFileExists()
Document
exists, indicated by a return value of
"true".
public boolean fileExists()
Document
exists.
public String getLastModifiedString()
Document
. Note that
while this represents the File modification time, this date stamp does not
get updated until the File is re-indexed by the indexer.
public long getLastModified()
Document
. Note that while this represents the
File modification time, this date stamp does not get updated until the File
is re-indexed by the indexer.
public File getSourceFile()
Document
.
public String getFileName()
Document
.
public String getDocsource()
Document
.
public String getDocsourceEncoded()
Document
, encoded.
public String getDocDir()
Document
.
protected static final String getDateStamp()
protected static final void setDebug(boolean db)
db
- The new debug valueprotected static final void prtlnErr(String s)
s
- The text that will be output to error out.protected static final void prtln(String s)
s
- The String that will be output.
|
DLESE Tools v1.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |