public class CachingDocReader extends Object
| Constructor and Description |
|---|
CachingDocReader(net.sf.saxon.s9api.DocumentBuilder builder,
net.sf.saxon.Configuration config,
IndexConfiguration indexConfig)
Create a CachingDocReader that will use the provided objects to read and
parse XML documents.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all cached documents.
|
net.sf.saxon.s9api.XdmNode |
get(int docID,
org.apache.lucene.index.IndexReader reader)
Reads the document with the given id.
|
long |
getBuildTime() |
int |
getCacheHits() |
int |
getCacheMisses() |
public CachingDocReader(net.sf.saxon.s9api.DocumentBuilder builder,
net.sf.saxon.Configuration config,
IndexConfiguration indexConfig)
builder - will be used to construct XML documents as XdmNodesconfig - assigns the proper document ID to each constructed documentindexConfig - supplies the names of the xml storage and uri fieldspublic net.sf.saxon.s9api.XdmNode get(int docID,
org.apache.lucene.index.IndexReader reader)
throws IOException
IndexReader.docID - the id of the document to readreader - the Lucene index readerIOException - if there is some sort of low-level problem with the indexLuxException - if there is an error building the document that has been
retrievedpublic int getCacheHits()
public int getCacheMisses()
public long getBuildTime()
public void clear()
Copyright © 2013. All Rights Reserved.