Merge commit 'alpha/update_2_12_for_2_11_2_series_merge^2' into HEAD
[jalview.git] / src / jalview / ws / dbsources / EmblXmlSource.java
index c2d661b..7bb1977 100644 (file)
@@ -41,8 +41,6 @@ import javax.xml.stream.XMLInputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 
-import com.stevesoft.pat.Regex;
-
 import jalview.analysis.SequenceIdMatcher;
 import jalview.bin.Cache;
 import jalview.datamodel.Alignment;
@@ -58,6 +56,7 @@ import jalview.util.DBRefUtils;
 import jalview.util.DnaUtils;
 import jalview.util.MapList;
 import jalview.util.MappingUtils;
+import jalview.util.MessageManager;
 import jalview.ws.ebi.EBIFetchClient;
 import jalview.xml.binding.embl.EntryType;
 import jalview.xml.binding.embl.EntryType.Feature;
@@ -71,10 +70,11 @@ import jalview.xml.binding.embl.XrefType;
  * 
  * @deprecated endpoint withdrawn August 2020 (JAL-3692), use EmblFlatfileSource
  */
+
 public abstract class EmblXmlSource extends EbiFileRetrievedProxy
 {
+  // TODO: delete class or update tyhis validator for 2.12 style Platform.regex
   private static final Regex ACCESSION_REGEX = new Regex("^[A-Z]+[0-9]+");
-
   /*
    * JAL-1856 Embl returns this text for query not found
    */
@@ -659,7 +659,6 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy
     {
       return new int[] {};
     }
-
     try
     {
       List<int[]> ranges = DnaUtils.parseLocation(location);
@@ -756,7 +755,6 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy
     }
     return getAccessionValidator().search(accession);
   }
-
   /**
    * Truncates (if necessary) the exon intervals to match 3 times the length of
    * the protein; also accepts 3 bases longer (for stop codon not included in
@@ -775,7 +773,6 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy
     }
     int expectedCdsLength = proteinLength * 3;
     int exonLength = MappingUtils.getLength(Arrays.asList(exon));
-
     /*
      * if exon length matches protein, or is shorter, or longer by the 
      * length of a stop codon (3 bases), then leave it unchanged
@@ -785,7 +782,6 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy
     {
       return exon;
     }
-
     int origxon[];
     int sxpos = -1;
     int endxon = 0;
@@ -805,7 +801,6 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy
           // .println("Truncating final exon interval on region by "
           // + (cdspos - cdslength));
         }
-
         /*
          * shrink the final exon - reduce end position if forward
          * strand, increase it if reverse
@@ -821,7 +816,6 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy
         break;
       }
     }
-
     if (sxpos != -1)
     {
       // and trim the exon interval set if necessary