public abstract class FileIndexingServiceDocReader extends DocReader implements java.io.Serializable
Document
that was created by a FileIndexingServiceWriter
. This class may be
extended for each Document
type that might be returned in a search.Modifier | Constructor and Description |
---|---|
protected |
FileIndexingServiceDocReader()
Constructor that initializes an empty DocReader.
|
protected |
FileIndexingServiceDocReader(org.apache.lucene.document.Document doc)
Constructor that may be used programatically to wrap a reader around a Lucene
Document that was created by a DocWriter . |
Modifier and Type | Method and Description |
---|---|
boolean |
fileExists()
Determine whether the file associated with this
Document exists. |
java.util.Date |
getDateFileWasIndexed()
Gets the date this record was indexed.
|
java.lang.String |
getDateFileWasIndexedString()
Gets the date and time this record was indexed, as a String.
|
protected static java.lang.String |
getDateStamp()
Return a string for the current time and date, sutiable for display in log files and output to standout:
|
java.lang.String |
getDeleted()
Determine whether the status of this
Document is deleted, indicated by
a return value of "true". |
java.lang.String |
getDocDir()
Gets the absolute path of the directory that contained the File used to index the
Document . |
java.lang.String |
getDocsource()
Gets the absolute path of the file that was used to index the
Document . |
java.lang.String |
getDocsourceEncoded()
Gets the absolute path of the file that was used to index the
Document , encoded. |
java.lang.String |
getDoctype()
Gets doctype associated with the
Document , for example 'dlese_ims,'
'adn,' or 'html'. |
java.io.File |
getFile()
Gets the File that was used to index the
Document . |
java.lang.String |
getFileExists()
Determine whether the file associated with this
Document exists,
indicated by a return value of "true". |
java.lang.String |
getFileName()
Gets the name of the File that was used to index the
Document . |
java.lang.String |
getFullContent()
Gets the full content of the file that was used to index the
Document . |
java.lang.String |
getFullContentEncodedAs(java.lang.String characterEncoding)
Gets the full content of the file that was used to index the
Document ,
returned in the given character encoding, for example UTF-8. |
long |
getLastModified()
Gets the File modification time of the File used to index the
Document . |
java.lang.String |
getLastModifiedAsUTC()
Gets the file modification date in UTC format for the given record.
|
java.lang.String |
getLastModifiedString()
Gets a String representataion of the File modification time of the File used to index the
Document . |
boolean |
isDeleted()
Determine whether the status of this
Document is deleted. |
protected static void |
prtln(java.lang.String s)
Output a line of text to standard out, with datestamp, if debug is set to true.
|
protected static void |
prtlnErr(java.lang.String s)
Output a line of text to error out, with datestamp.
|
protected static void |
setDebug(boolean db)
Sets the debug attribute.
|
doInit, getAttribute, getDocMap, getDocument, getIndex, getLazyDocMap, getQuery, getReaderType, getRepositoryManager, getScore, init, setDoc
protected FileIndexingServiceDocReader(org.apache.lucene.document.Document doc)
Document
that was created by a DocWriter
.doc
- A Lucene Document
.DocWriter
protected FileIndexingServiceDocReader()
public final java.lang.String getFullContent()
Document
.
This includes all XML or HTML tags, etc.public final java.lang.String getFullContentEncodedAs(java.lang.String characterEncoding)
Document
,
returned in the given character encoding, for example UTF-8.characterEncoding
- The character encoding to return, for example 'UTF-8'public java.lang.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 java.lang.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. Field: status [true]
public java.lang.String getFileExists()
Document
exists,
indicated by a return value of "true".public boolean fileExists()
Document
exists.public java.lang.String getDateFileWasIndexedString()
public java.util.Date getDateFileWasIndexed()
public java.lang.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 java.lang.String getLastModifiedAsUTC()
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 java.io.File getFile()
Document
.public java.lang.String getFileName()
Document
.public java.lang.String getDocsource()
Document
.public java.lang.String getDocsourceEncoded()
Document
, encoded.public java.lang.String getDocDir()
Document
.protected static final java.lang.String getDateStamp()
protected static final void setDebug(boolean db)
db
- The new debug valueprotected static void prtlnErr(java.lang.String s)
s
- The text that will be output to error out.protected static void prtln(java.lang.String s)
s
- The String that will be output.