From 77089d22860b84145b18f084efe95f6efa484674 Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 4 Nov 2008 13:29:51 +0000 Subject: [PATCH] implemented embl validation properly --- src/jalview/ws/dbsources/EmblCdsSouce.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/jalview/ws/dbsources/EmblCdsSouce.java b/src/jalview/ws/dbsources/EmblCdsSouce.java index 1ac5c76..b3242ad 100644 --- a/src/jalview/ws/dbsources/EmblCdsSouce.java +++ b/src/jalview/ws/dbsources/EmblCdsSouce.java @@ -68,8 +68,9 @@ public class EmblCdsSouce extends EmblXmlSource implements DbSourceProxy public boolean isValidReference(String accession) { - // TODO Auto-generated method stub - return true; + // most embl CDS refs look like .. + // TODO: improve EMBLCDS regex + return (accession==null || accession.length()<2) ? false : new com.stevesoft.pat.Regex("^[A-Z]+[0-9]+").search(accession); } /** -- 1.7.10.2