public class GroupCountProcessor extends WrappedProcessor
Modifier and Type | Field and Description |
---|---|
protected org.archive.format.cdx.CDXLine |
deferWriteLine |
static String |
endtimestamp |
static String |
groupcount |
protected boolean |
lastLineSkipped |
protected org.archive.format.cdx.CDXLine |
lastReadLine |
protected org.archive.format.cdx.CDXLine |
prevReadLine |
protected int |
skipCount |
static String |
uniqcount |
protected HashSet<Integer> |
uniqDigestSet |
protected boolean |
writeLastTimestamp |
inner
Constructor and Description |
---|
GroupCountProcessor(BaseProcessor base,
boolean writeLastTimestamp,
boolean writeUniqCount) |
Modifier and Type | Method and Description |
---|---|
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 cdxLine)
Called on each CDX line, just before timestamp range filtering
(to and from parameters), regexp filtering, and
collapser
processing. |
protected int |
writeDeferredLine() |
int |
writeLine(org.archive.format.cdx.CDXLine cdxLine)
Process
line . |
void |
writeResumeKey(String resumeKey)
Write resumption key.
|
begin
public static final String groupcount
public static final String endtimestamp
public static final String uniqcount
protected org.archive.format.cdx.CDXLine prevReadLine
protected org.archive.format.cdx.CDXLine lastReadLine
protected org.archive.format.cdx.CDXLine deferWriteLine
protected boolean lastLineSkipped
protected int skipCount
protected boolean writeLastTimestamp
public GroupCountProcessor(BaseProcessor base, boolean writeLastTimestamp, boolean writeUniqCount)
public void trackLine(org.archive.format.cdx.CDXLine cdxLine)
BaseProcessor
collapser
processing. Typically used for counting the number of CDX lines
collapsed / grouped.trackLine
in interface BaseProcessor
trackLine
in class WrappedProcessor
cdxLine
- CDX lineprotected int writeDeferredLine()
public int writeLine(org.archive.format.cdx.CDXLine cdxLine)
BaseProcessor
line
.writeLine
in interface BaseProcessor
writeLine
in class WrappedProcessor
cdxLine
- CDXLine
line
is sent to output, 0 otherwise.public org.archive.format.cdx.FieldSplitFormat modifyOutputFormat(org.archive.format.cdx.FieldSplitFormat format)
BaseProcessor
format
.
Intermediaries should call modifyOutputFormat(format)
on nested
processor first, then make appropriate changes to it if they add/remove
fields.modifyOutputFormat
in interface BaseProcessor
modifyOutputFormat
in class WrappedProcessor
format
- input formatCDXFieldConstants
public void writeResumeKey(String resumeKey)
BaseProcessor
CDXWriter
should do
actual work. All intermediaries shall simply call
writeResumeKey(resumeKey)
on nested processor.writeResumeKey
in interface BaseProcessor
writeResumeKey
in class WrappedProcessor
public void end()
BaseProcessor
end()
on nested processor.end
in interface BaseProcessor
end
in class WrappedProcessor
Copyright © 2005–2015 IIPC. All rights reserved.