Package elki.result
Class ResultWriter
- java.lang.Object
-
- elki.result.ResultWriter
-
- All Implemented Interfaces:
ResultHandler
,ResultProcessor
@Priority(100) public class ResultWriter extends java.lang.Object implements ResultHandler
Result handler that feeds the data into a TextWriter.Note: these classes need to be rewritten. Contributions welcome!
- Since:
- 0.2
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ResultWriter.Par
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description private java.util.regex.Pattern
filter
Result filter pattern.private boolean
gzip
Whether or not to do gzip compression on output.private static Logging
LOG
The logger for this class.private java.nio.file.Path
out
Holds the file to print results to.private boolean
warnoverwrite
Whether or not to warn on overwrite
-
Constructor Summary
Constructors Constructor Description ResultWriter(java.nio.file.Path out, boolean gzip, boolean warnoverwrite, java.util.regex.Pattern filter)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private StreamFactory
openStreamFactory()
void
processNewResult(java.lang.Object result)
Process a result.
-
-
-
Field Detail
-
LOG
private static final Logging LOG
The logger for this class.
-
out
private java.nio.file.Path out
Holds the file to print results to.
-
gzip
private boolean gzip
Whether or not to do gzip compression on output.
-
warnoverwrite
private boolean warnoverwrite
Whether or not to warn on overwrite
-
filter
private java.util.regex.Pattern filter
Result filter pattern. Optional!
-
-
Method Detail
-
processNewResult
public void processNewResult(java.lang.Object result)
Description copied from interface:ResultProcessor
Process a result.- Specified by:
processNewResult
in interfaceResultProcessor
- Parameters:
result
- Newly added result subtree.
-
openStreamFactory
private StreamFactory openStreamFactory() throws java.io.IOException
- Throws:
java.io.IOException
-
-