/** * Utility method to check that a given Signature is valid. * This method is light-weight - it is NOT checking that the * SignatureLibrary associated with the Signature is of the correct * type. * * @param signature being checked. * @return true of the Signature accession and name are recognised. */ public static boolean isValidSignature(Signature signature) { for (PhobiusFeatureType type : PhobiusFeatureType.values()) { if (type.getAccession().equals(signature.getAccession()) && type.getName().equals(signature.getName())) { return true; } } return false; }
final String signatureName = signature.getName();
final String signatureName = signature.getName();
boolean found = false; for (final Signature retrievedSignature : retrievedSignatures) { if (type.getName().equals(retrievedSignature.getName()) && type.getAccession().equals(retrievedSignature.getAccession())