|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.result.textwriter.TextWriter
public class TextWriter

Class to write a result to human-readable text output
| Field Summary | |
|---|---|
static String |
FILE_EXTENSION
Extension for txt-files. |
protected Map<String,Object> |
filenames
For producing unique filenames. |
static HandlerList<TextWriterWriterInterface<?>> |
writers
Hash map for supported classes in writer. |
| Constructor Summary | |
|---|---|
TextWriter()
|
|
| Method Summary | |
|---|---|
private String |
filenameFromLabel(String label)
Derive a file name from the cluster label. |
protected String |
getFilename(Object result,
String filenamepre)
Try to find a unique file name. |
void |
output(Database db,
Result r,
StreamFactory streamOpener)
Stream output. |
private void |
printObject(TextWriterStream out,
Database db,
DBID objID,
List<Relation<?>> ra)
|
protected void |
printSettings(TextWriterStream out,
List<SettingsResult> sr)
Writes a header providing information concerning the underlying database and the specified parameter-settings. |
private void |
writeClusterResult(Database db,
StreamFactory streamOpener,
Cluster<?> clus,
List<Relation<?>> ra,
NamingScheme naming,
List<SettingsResult> sr)
|
private void |
writeIterableResult(StreamFactory streamOpener,
IterableResult<?> ri,
List<SettingsResult> sr)
|
private void |
writeOrderingResult(Database db,
StreamFactory streamOpener,
OrderingResult or,
List<Relation<?>> ra,
List<SettingsResult> sr)
|
private void |
writeOtherResult(StreamFactory streamOpener,
Result r,
List<SettingsResult> rs)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String FILE_EXTENSION
public static final HandlerList<TextWriterWriterInterface<?>> writers
protected Map<String,Object> filenames
| Constructor Detail |
|---|
public TextWriter()
| Method Detail |
|---|
protected String getFilename(Object result,
String filenamepre)
result - Result we printfilenamepre - File name prefix to use
protected void printSettings(TextWriterStream out,
List<SettingsResult> sr)
out - the print stream where to writesr - the settings to be written into the header
public void output(Database db,
Result r,
StreamFactory streamOpener)
throws UnableToComplyException,
IOException
db - Database objectr - Result classstreamOpener - output stream manager
UnableToComplyException - when no usable results were found
IOException - on IO error
private void printObject(TextWriterStream out,
Database db,
DBID objID,
List<Relation<?>> ra)
throws UnableToComplyException,
IOException
UnableToComplyException
IOException
private void writeOtherResult(StreamFactory streamOpener,
Result r,
List<SettingsResult> rs)
throws UnableToComplyException,
IOException
UnableToComplyException
IOException
private void writeClusterResult(Database db,
StreamFactory streamOpener,
Cluster<?> clus,
List<Relation<?>> ra,
NamingScheme naming,
List<SettingsResult> sr)
throws FileNotFoundException,
UnableToComplyException,
IOException
FileNotFoundException
UnableToComplyException
IOException
private void writeIterableResult(StreamFactory streamOpener,
IterableResult<?> ri,
List<SettingsResult> sr)
throws UnableToComplyException,
IOException
UnableToComplyException
IOException
private void writeOrderingResult(Database db,
StreamFactory streamOpener,
OrderingResult or,
List<Relation<?>> ra,
List<SettingsResult> sr)
throws IOException,
UnableToComplyException
IOException
UnableToComplyExceptionprivate String filenameFromLabel(String label)
label - cluster label
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||