public class MARCIndexSource extends IndexSource
| Modifier and Type | Class and Description |
|---|---|
private class |
MARCIndexSource.RecordHandler
Handles running blocks of records through the stylesheet
|
| Modifier and Type | Field and Description |
|---|---|
private Templates |
displayStyle
Stylesheet from which to gather XSLT key definitions to be computed
and cached on disk.
|
private long |
fileSize
Size of the whole input file
|
private boolean |
isDone
Are we there yet?
|
private String |
key
Key used to identify this file in the index
|
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 CountedInputStream |
rawStream
Input stream for the raw data
|
private MARCIndexSource.RecordHandler |
recordHandler
Record handling thread
|
private int |
recordNum |
| Constructor and Description |
|---|
MARCIndexSource(File path,
String key,
Templates[] preFilters,
Templates displayStyle)
Constructor -- initializes all the fields
|
| Modifier and Type | Method and Description |
|---|---|
Templates |
displayStyle()
Stylesheet from which to gather XSLT key definitions to be computed
and cached on disk.
|
String |
key()
Obtain a unique key for this input file
|
IndexRecord |
nextRecord()
Obtain the next record from the file, or null if no more.
|
private void |
openFile() |
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.
|
long |
totalSize()
Obtain the total size of the source file (used to calculate
overall % done).
|
private File path
private String key
private Templates[] preFilters
private Templates displayStyle
private long fileSize
private CountedInputStream rawStream
private MARCIndexSource.RecordHandler recordHandler
private boolean isDone
private int recordNum
public MARCIndexSource(File path,
String key,
Templates[] preFilters,
Templates displayStyle)
public File path()
IndexSourcepath in class IndexSourcepublic String key()
IndexSourcekey in class IndexSourcepublic Templates[] preFilters()
IndexSourcepreFilters in class IndexSourcepublic Templates displayStyle()
IndexSourcedisplayStyle in class IndexSourcepublic long totalSize()
IndexSourcetotalSize in class IndexSourcepublic IndexRecord nextRecord() throws SAXException, IOException
IndexSourcenextRecord in class IndexSourceSAXExceptionIOExceptionprivate void openFile()
throws IOException
IOException