|
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
An abstract class that defines basic getter methods to read data from a typed Lucene
Document
. The getter methods can then be accessed
from (Struts) beans that need the data. When writing a new concrete class of this
type, a switch should be added to return it from ResultDoc.getDocReader()
.
ResultDoc
Field Summary | |
---|---|
protected ResultDocConfig |
conf
The index that was searched over. |
protected Document |
doc
The Lucene Document that is being read. |
protected float |
score
The Lucene score assigned to the Document, or -1 if none available. |
Constructor Summary | |
---|---|
protected |
DocReader()
Constructor that initializes an empty DocReader. |
protected |
DocReader(Document myDoc)
Constructor that may be used programatically to wrap a reader around a Lucene Document that was created by a DocWriter . |
protected |
DocReader(Document myDoc,
float myScore,
ResultDocConfig myConf)
Constructor that is used by ResultDoc at search time to
create a new instance of a DocReader. |
Method Summary | |
---|---|
Document |
getDocument()
Gets the Lucene Document associated with this
DocReader. |
SimpleLuceneIndex |
getIndex()
Gets the index that was searched over to produce the resulting hit. |
String |
getQuery()
|
abstract String |
getReaderType()
Gets a String describing the reader type. |
String |
getScore()
Gets the Lucene score for the Document , or -1 if
none available. |
protected void |
setDoc(Document myDoc)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Document doc
protected float score
protected ResultDocConfig conf
Constructor Detail |
protected DocReader(Document myDoc, float myScore, ResultDocConfig myConf)
ResultDoc
at search time to
create a new instance of a DocReader.
protected DocReader(Document myDoc)
Document
that was created by a DocWriter
.
DocWriter
protected DocReader()
Method Detail |
protected void setDoc(Document myDoc)
public abstract String getReaderType()
public String getScore()
Document
, or -1 if
none available.
public Document getDocument()
Document
associated with this
DocReader.
Document
.public SimpleLuceneIndex getIndex()
public String getQuery()
|
DLESE Tools v1.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |