*/
@Override
public void removeLowerPriorityHits(
IdentificationResultCollection results) {
// Build a set of format ids the results have priority over:
FileFormatCollection allFormats = sigFile.getFileFormatCollection();
Set<Integer> lowerPriorityIDs = new HashSet<Integer>();
for (IdentificationResult result : results.getResults()) {
final String resultPUID = result.getPuid();
final FileFormat format = allFormats.getFormatForPUID(resultPUID);
lowerPriorityIDs.addAll(format.getFormatIdsHasPriorityOver());
}
// If a result has an id in this set, add it to the remove list;
List<IdentificationResult> lowerPriorityResults = new ArrayList<IdentificationResult>();
for (IdentificationResult result : results.getResults()) {
final String resultPUID = result.getPuid();
final FileFormat format = allFormats.getFormatForPUID(resultPUID);
if (lowerPriorityIDs.contains(format.getID())) {
lowerPriorityResults.add(result);
}
}