public class ResultSetResultSaver extends Object implements ResultSaver<ResultSetResult>
ResultSaver
for a ResultSetResult
.
File names for the Result
s in the contained ResultSet
are defined using the
AnnotatedEntity.getName()
method, replacing whitespace with underscores. If a file with the corresponding name
already exists, a number is appended and the existing file is not overwritten.Modifier and Type | Method and Description |
---|---|
String[] |
getFileExtensions(ResultSetResult result)
Returns the file extensions (in descending preference) for storing the given
Result |
boolean |
isAtomic()
|
static void |
register()
Registers this
ResultSaver in the ResultSaverLibrary |
boolean |
writeOutput(ResultSetResult result,
File dir)
Writes the output (i.e., the result contents) to the supplied file.
|
boolean |
writeOutput(ResultSetResult result,
StringBuffer buf)
Appends the output (i.e., the result contents) to the supplied
StringBuffer |
public static void register()
ResultSaver
in the ResultSaverLibrary
public boolean isAtomic()
ResultSaver
isAtomic
in interface ResultSaver<ResultSetResult>
ResultSaver
is for storing atomic Result
s.public String[] getFileExtensions(ResultSetResult result)
ResultSaver
Result
getFileExtensions
in interface ResultSaver<ResultSetResult>
result
- the resultpublic boolean writeOutput(ResultSetResult result, File dir)
ResultSaver
writeOutput
in interface ResultSaver<ResultSetResult>
result
- the resultdir
- the output filepublic boolean writeOutput(ResultSetResult result, StringBuffer buf)
ResultSaver
StringBuffer
writeOutput
in interface ResultSaver<ResultSetResult>
result
- the resultbuf
- the buffer