|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectIndexSource
XMLIndexSource
public class XMLIndexSource
Supplies a single file containing a single record to the
XMLTextProcessor
.
Field Summary | |
---|---|
private Templates |
displayStyle
Stylesheet from which to gather XSLT key definitions to be computed and cached on disk. |
private InputSource |
inSrc
Source of XML data |
private boolean |
isDone
Keep track of whether we've processed this file yet |
private String |
key
Key used to identify this file in the index |
private StructuredStore |
lazyStore
Empty storage in which to build the persistent version of the document (aka the "lazy tree"), or null to avoid building it. |
private File |
path
Path to the file, or null if it's not a local file. |
private Templates[] |
preFilters
XSLT pre-filters used to massage the XML document (null for none) |
private boolean |
removeDoctypeDecl
Whether to remove DOCTYPE decl (this is kind of a kludge) |
private static SAXParser |
saxParser
A parser we can use to tell whether we need to apply crimson workaround |
Constructor Summary | |
---|---|
XMLIndexSource(InputSource inSrc,
File path,
String key,
Templates[] preFilters,
Templates displayStyle,
StructuredStore lazyStore)
Constructor -- initializes all the fields |
|
XMLIndexSource(InputSource inSrc,
String key)
Simple constructor |
Method Summary | |
---|---|
Templates |
displayStyle()
Stylesheet from which to gather XSLT key definitions to be computed and cached on disk. |
protected InputSource |
filterInput()
Filter the input, if necessary, to remove DOCTYPE declarations, or work around a bug in the Crimson parser. |
String |
key()
Obtain a unique key for this input file |
IndexRecord |
nextRecord()
Obtain the next record from the file, or null if no more. |
static String |
normalize(String s)
Prepare a string for inclusion in an XML document. |
File |
path()
Obtain the path to the file (or null if it's not a local file) |
Templates[] |
preFilters()
Obtain set of prefilters to be run, serially in order, on each input record. |
void |
removeDoctypeDecl(boolean flag)
|
long |
totalSize()
Obtain the total size of the source file (used to calculate overall % done). |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private InputSource inSrc
private File path
private String key
private Templates[] preFilters
private Templates displayStyle
private StructuredStore lazyStore
private boolean removeDoctypeDecl
private boolean isDone
private static SAXParser saxParser
Constructor Detail |
---|
public XMLIndexSource(InputSource inSrc, String key)
public XMLIndexSource(InputSource inSrc, File path, String key, Templates[] preFilters, Templates displayStyle, StructuredStore lazyStore)
Method Detail |
---|
public void removeDoctypeDecl(boolean flag)
public File path()
IndexSource
path
in class IndexSource
public String key()
IndexSource
key
in class IndexSource
public Templates[] preFilters()
IndexSource
preFilters
in class IndexSource
public Templates displayStyle()
IndexSource
displayStyle
in class IndexSource
public long totalSize()
IndexSource
totalSize
in class IndexSource
public IndexRecord nextRecord() throws SAXException, IOException
IndexSource
nextRecord
in class IndexSource
SAXException
IOException
protected InputSource filterInput() throws IOException
IOException
public static String normalize(String s)
s
- string to normalize
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |