public static boolean seemsToHaveSignature ( Nanopub nanopub ) { for ( Statement st : nanopub . getPubinfo ( ) ) { if ( st . getPredicate ( ) . equals ( NanopubSignatureElement . HAS_SIGNATURE_ELEMENT ) ) return true ; if ( st . getPredicate ( ) . equals ( NanopubSignatureElement . HAS_SIGNATURE_TARGET ) ) return true ; if ( st . getPredicate ( ) . equals ( NanopubSignatureElement . HAS_SIGNATURE ) ) return true ; if ( st . getPredicate ( ) . equals ( CryptoElement . HAS_PUBLIC_KEY ) ) return true ; } return false ; }
This includes legacy signatures . Might include false positives .