* signature attached to them.
*
* @param puid The puid.
*/
public final void puidHasOverridingSignatures(String puid) {
FileFormat format = getFileFormat(puid);
if (format != null) {
// 1. remove all the internal signature ids from the file format:
List<Integer> removedSignatureIDs = format.clearSignatures();
// 2. For each signature removed from the file format,
// also remove the file format from the signature:
for (Integer id : removedSignatureIDs) {
InternalSignature signature = intSigs.getInternalSignature(id);
if (signature != null) {
signature.removeFileFormat(format);
// 3. If the signature no longer points at any
// file formats, remove the signature entirely:
if (signature.getNumFileFormats() == 0) {
intSigs.removeInternalSignature(signature);
}
}
}
// 4. The file format no longer has any internal signatures.
// It is possible that it never had any, and was a
// tentative format. We can't tell at this point,
// as this method may have been called before.
// However, it is definitely not a tentative format now,
// as it has an overriding signature (probably a container
// signature at the time of writing for DROID 6).
// Therefore, remove it from the tentative extensions lists,
// if it ever existed there.
for (String extension : format.getExtensions()) {
List<FileFormat> tentativeFormatsForExtension = tentativeFormats.get(extension);
if (tentativeFormatsForExtension != null) {
tentativeFormatsForExtension.remove(format);
// 5. If there are no more file formats defined
// for this extension, remove the entry entirely