Represents the "similar unit pairs" file used in duplicity checking algorithm.
This class represents the temporary version of this file, which is created
when two PermutatedMinsFile instances are merged.
This file differs from
the SimilarUnitPairsFile in three things:
If the file already exists on the filesystem, if will be rewritten.
The file contains instances of UnitPair class.
That means it contains pairs {first, second}, where first, second are identificators of units
on which we check duplicity (can be document, paragraph or sentence).
The file is sorted - the main criteria is first field, in case of tie second field.
Initialializes the file by writing producer content to disk.
Sets permID and location fields, creates
a file on filesystem for this file and fills it with data from producer object.
The filename is in form returned by getFilename()
and will be created in the temp directory under the directory given in location parameter.
The temp directory must exist. If the file already exists, it will be rewritten.
Parameters:
p - producer object
location - path and name of the directory under which the file will be created,
must end with "/" sign
Throws:
java.io.IOException - if the file could not be created,
or writing data to the file failed
Returns the filename corresponding to this file.
The location and permID fields MUST be already set.
The filename is created in temp directory under the directory given in location field
and is in form Constants.SIMILAR_UNIT_PAIRS_FILE_PREFIX<permID>.