|
|
|||||||||||||||||||||
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<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<AttributeSettings> settings)
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<AttributeSettings> settings)
|
private void |
writeIterableResult(Database<O> db,
StreamFactory streamOpener,
IterableResult<?> ri,
List<MetadataResult> rm)
|
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<AttributeSettings> settings)
db
- to retrieve meta information fromout
- the print stream where to writesettings
- 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
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<AttributeSettings> settings) throws FileNotFoundException, UnableToComplyException, IOException
FileNotFoundException
UnableToComplyException
IOException
private void writeIterableResult(Database<O> db, StreamFactory streamOpener, IterableResult<?> ri, List<MetadataResult> rm) 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 |