|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.result.textwriter.TextWriter<O>
O
- Object typepublic class TextWriter<O extends DatabaseObject>
Class to write a result to human-readable text output
Field Summary | |
---|---|
static String |
FILE_EXTENSION
Extension for txt-files. |
private static Logging |
logger
Logger |
private Normalization<O> |
normalization
Normalization to use. |
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. |
Normalization<O> |
getNormalization()
Getter for normalization |
void |
output(Database<O> db,
Result r,
StreamFactory streamOpener)
Stream output. |
private void |
printObject(TextWriterStream out,
O obj,
List<Pair<String,Object>> anns)
|
protected void |
printSettings(Database<O> db,
TextWriterStream out,
List<SettingsResult> sr)
Writes a header providing information concerning the underlying database and the specified parameter-settings. |
void |
setNormalization(Normalization<O> normalization)
Setter for normalization |
private void |
writeGroupResult(Database<O> db,
StreamFactory streamOpener,
DatabaseObjectGroup group,
List<AnnotationResult<?>> ra,
List<OrderingResult> ro,
NamingScheme naming,
List<SettingsResult> sr)
|
private void |
writeIterableResult(Database<O> db,
StreamFactory streamOpener,
IterableResult<?> ri,
MultiResult mr,
List<SettingsResult> sr)
|
private void |
writeOtherResult(Database<O> db,
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 |
---|
private static final Logging logger
public static final String FILE_EXTENSION
public static final HandlerList<TextWriterWriterInterface<?>> writers
private Normalization<O extends DatabaseObject> normalization
Constructor Detail |
---|
public TextWriter()
Method Detail |
---|
protected void printSettings(Database<O> db, TextWriterStream out, List<SettingsResult> sr)
db
- to retrieve meta information fromout
- the print stream where to writesr
- the settings to be written into the headerpublic void output(Database<O> 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 errorprivate void writeOtherResult(Database<O> db, StreamFactory streamOpener, Result r, List<SettingsResult> rs) throws UnableToComplyException, IOException
UnableToComplyException
IOException
private void printObject(TextWriterStream out, O obj, List<Pair<String,Object>> anns) throws UnableToComplyException, IOException
UnableToComplyException
IOException
private void writeGroupResult(Database<O> db, StreamFactory streamOpener, DatabaseObjectGroup group, List<AnnotationResult<?>> ra, List<OrderingResult> ro, NamingScheme naming, List<SettingsResult> sr) throws FileNotFoundException, UnableToComplyException, IOException
FileNotFoundException
UnableToComplyException
IOException
private void writeIterableResult(Database<O> db, StreamFactory streamOpener, IterableResult<?> ri, MultiResult mr, List<SettingsResult> sr) throws UnableToComplyException, IOException
UnableToComplyException
IOException
public void setNormalization(Normalization<O> normalization)
normalization
- new normalization objectpublic Normalization<O> getNormalization()
private String filenameFromLabel(String label)
label
- cluster label
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |