public class SimilarUnitPairsFile extends MergeableSimilarUnitPairsFile
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. SimilarUnitPairsFileProducer
or read from the filesystem.merge(org.egothor.duplicity.file.SimilarUnitPairsFile, org.egothor.duplicity.file.SimilarUnitPairsTempFile) method.| Constructor and Description |
|---|
SimilarUnitPairsFile(long permID,
String location)
Initialializes the file already written to filesystem.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getFilename()
Returns the filename corresponding to this file.
|
void |
merge(CommonSimilarUnitPairsFile supf)
Merges two files externally, on filesystem.
|
void |
merge(SimilarUnitPairsFile supfr,
SimilarUnitPairsTempFile supft)
Merges three files externally, on filesystem.
|
dump, getPermID, hasTheSameContent, remove, toStringdelete, getLocation, getOut, hasTheSameContentpublic SimilarUnitPairsFile(long permID,
String location)
throws FileNotFoundException
getFilename()
and will be searched in the location directory.permID - identification of the permutation to be assigned to this filelocation - path and name of the directory in which the file will be searched,
must end with "/" signFileNotFoundException - if the file does not existpublic void merge(SimilarUnitPairsFile supfr, SimilarUnitPairsTempFile supft) throws IOException, MergeException
supfr - regular file to be merged into this
(SimilarUnitPairsFile)supft - temporary file to be merged into this
(SimilarUnitPairsTempFile)MergeException - on attempt to merge files corresponding to different permutations
or if temporary file could not be createdIOExceptionpublic void merge(CommonSimilarUnitPairsFile supf) throws IOException, MergeException
supf - file to be merged into this. Can be regular
(SimilarUnitPairsFile)
or temporary (SimilarUnitPairsTempFile).MergeException - on attempt to merge files corresponding to different permutations
or if temporary file could not be createdIOExceptionpublic String getFilename()
Constants.SIMILAR_UNIT_PAIRS_FILE_PREFIX<permID>.getFilename in class DuplicityCheckingFileCopyright © 2016 Egothor. All Rights Reserved.