|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectDefaultDocLocator
public class DefaultDocLocator
Provides local filesystem-based access to lazy and non-lazy versions of a source XML document.
Nested Class Summary | |
---|---|
private static class |
DefaultDocLocator.LazyPassthru
Passes SAX events to a ContentHandler. |
Field Summary | |
---|---|
private TextServlet |
servlet
Servlet we are part of |
Constructor Summary | |
---|---|
DefaultDocLocator()
|
Method Summary | |
---|---|
private void |
buildLazyStore(File lazyFile,
String sourcePath,
Templates preFilter,
boolean removeDoctypeDecl,
boolean stripWhitespace)
Create a lazy document by loading the original, building the lazy tree, and writing it out. |
InputSource |
getInputSource(String sourcePath,
boolean removeDoctypeDecl)
Retrieve the data stream for an XML source document. |
StructuredStore |
getLazyStore(String indexConfigPath,
String indexName,
String sourcePath,
Templates preFilter,
boolean removeDoctypeDecl)
Search for a StructuredStore containing the "lazy" or persistent representation of a given document. |
private boolean |
isPostIndexLazyFile(File f)
Check if the given lazy file was created after the indexing process (i.e. by this doc locator) |
void |
setServlet(TextServlet servlet)
Attach to a servlet |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private TextServlet servlet
Constructor Detail |
---|
public DefaultDocLocator()
Method Detail |
---|
public void setServlet(TextServlet servlet)
setServlet
in interface DocLocator
servlet
- Servlet to attach topublic StructuredStore getLazyStore(String indexConfigPath, String indexName, String sourcePath, Templates preFilter, boolean removeDoctypeDecl) throws IOException
getInputSource(String, boolean)
will be called as a fall-back.
getLazyStore
in interface DocLocator
indexConfigPath
- Path to the index configuration fileindexName
- Name of the index being searchedsourcePath
- Path to the source documentpreFilter
- Prefilter stylesheet to run (or null for none)removeDoctypeDecl
- Set to true to remove DOCTYPE declaration from
the XML document.
IOException
public InputSource getInputSource(String sourcePath, boolean removeDoctypeDecl) throws IOException
getInputSource
in interface DocLocator
sourcePath
- Path to the source documentremoveDoctypeDecl
- Set to true to remove DOCTYPE declaration from
the XML document.
IOException
private void buildLazyStore(File lazyFile, String sourcePath, Templates preFilter, boolean removeDoctypeDecl, boolean stripWhitespace) throws IOException
lazyFile
- Lazy file to createsourcePath
- Path to the source documentpreFilter
- A prefilter stylesheet (or null for no pre-filtering.)removeDoctypeDecl
- true to remove DOCTYPE declarations from the
XML documentstripWhitespace
- If set, whitespace will be removed between elements
in the lazy file.
IOException
private boolean isPostIndexLazyFile(File f)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |