de.hpi.fgis.dude.output
Interface DuDeOutput

All Superinterfaces:
AutoJsonable
All Known Implementing Classes:
AbstractDuDeOutput, CSVOutput, JsonOutput, MultipleOutput, SimpleTextOutput

public interface DuDeOutput
extends AutoJsonable

DuDeOutput is an interface for writing DuDeObjectPairs onto an stream.

Author:
Matthias Pohl

Method Summary
 void close()
          Closes the stream.
 DuDeOutput withData()
          Enables printing the data.
 DuDeOutput withoutData()
          Disables printing the data.
 void write(DuDeObjectPair pair)
          Writes the DuDeObjectPair onto an stream.
 void writeDuplicatesOnly(DuDeObjectPair pair)
          Writes the passed DuDeObjectPair onto the stream, if it is flagged as a duplicate.
 

Method Detail

write

void write(DuDeObjectPair pair)
           throws IOException
Writes the DuDeObjectPair onto an stream.

Parameters:
pair - A pair of two DuDeObjects that are written into an OutputStream.
Throws:
IOException - If an error occurs while writing onto the stream.

writeDuplicatesOnly

void writeDuplicatesOnly(DuDeObjectPair pair)
                         throws IOException
Writes the passed DuDeObjectPair onto the stream, if it is flagged as a duplicate.

Parameters:
pair - The pair that shall be written to the stream.
Throws:
IOException - If an error occurs while writing onto the stream.
See Also:
DuDeObjectPair.getDuplicateInfo()

close

void close()
           throws IOException
Closes the stream.

Throws:
IOException - If an error occurs while closing the stream.

withData

DuDeOutput withData()
Enables printing the data. This means that the output does not only consist of the object ids but contains also the corresponding data.

Returns:
The current instance.

withoutData

DuDeOutput withoutData()
Disables printing the data. This means that each printed duplicate pair is only specified by their source and object ids.

Returns:
The current instance.


Copyright © 2011 Hasso Plattner Institute - Chair of Information Systems. All Rights Reserved.