public interface BaseProcessor
BaseProcessor
is an interface for a receiver
of CDXLine
s.
Implementation may be final output formatter (CDXWriter
subclasses for example), or an intermediary processor that performs
transformation and/or filtering on the sequence of CDXLines.
CDXServer
starts from CDXWriter
and builds up
nested pipeline of BaseProcessor
s, and then calls following
methods in sequence on the BaseProcessor
at the top:
showResumeKey
)Modifier and Type | Method and Description |
---|---|
void |
begin()
This method will be called just before looping over
the sequence of CDX lines.
|
void |
end()
Called at the end.
|
org.archive.format.cdx.FieldSplitFormat |
modifyOutputFormat(org.archive.format.cdx.FieldSplitFormat format)
Return output format (list of fields), given input format
format . |
void |
trackLine(org.archive.format.cdx.CDXLine line)
Called on each CDX line, just before timestamp range filtering
(to and from parameters), regexp filtering, and
collapser
processing. |
int |
writeLine(org.archive.format.cdx.CDXLine line)
Process
line . |
void |
writeResumeKey(String resumeKey)
Write resumption key.
|
void begin()
begin()
on nested processor.void trackLine(org.archive.format.cdx.CDXLine line)
collapser
processing. Typically used for counting the number of CDX lines
collapsed / grouped.line
- CDX lineint writeLine(org.archive.format.cdx.CDXLine line)
line
.line
- CDXLine
line
is sent to output, 0 otherwise.void writeResumeKey(String resumeKey)
CDXWriter
should do
actual work. All intermediaries shall simply call
writeResumeKey(resumeKey)
on nested processor.resumeKey
- void end()
end()
on nested processor.org.archive.format.cdx.FieldSplitFormat modifyOutputFormat(org.archive.format.cdx.FieldSplitFormat format)
format
.
Intermediaries should call modifyOutputFormat(format)
on nested
processor first, then make appropriate changes to it if they add/remove
fields.format
- input formatCDXFieldConstants
Copyright © 2005–2015 IIPC. All rights reserved.