X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fdbsources%2FEmblXmlSource.java;h=034ea4f02275b58cedf56a439d6fdb1e987cb9d7;hb=2123f8ad0cc51b9f58d5d2820fa54ed03a8f3b22;hp=c5532f5e16b6338985eb7d2c5d0759bc5cf04f2e;hpb=feeb56fc2f3d7c40a46466ff52c7663cc96d6c70;p=jalview.git diff --git a/src/jalview/ws/dbsources/EmblXmlSource.java b/src/jalview/ws/dbsources/EmblXmlSource.java index c5532f5..034ea4f 100644 --- a/src/jalview/ws/dbsources/EmblXmlSource.java +++ b/src/jalview/ws/dbsources/EmblXmlSource.java @@ -28,6 +28,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Hashtable; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.Map.Entry; @@ -42,7 +43,7 @@ import javax.xml.stream.XMLStreamReader; import com.stevesoft.pat.Regex; import jalview.analysis.SequenceIdMatcher; -import jalview.bin.Cache; +import jalview.bin.Console; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentI; import jalview.datamodel.DBRefEntry; @@ -63,13 +64,6 @@ import jalview.xml.binding.embl.EntryType.Feature.Qualifier; import jalview.xml.binding.embl.ROOT; import jalview.xml.binding.embl.XrefType; -/** - * Provides XML binding and parsing of EMBL or EMBLCDS records retrieved from - * (e.g.) {@code https://www.ebi.ac.uk/ena/data/view/x53828&display=xml}. - * - * @deprecated endpoint withdrawn August 2020 (JAL-3692), use EmblFlatfileSource - */ - public abstract class EmblXmlSource extends EbiFileRetrievedProxy { private static final Regex ACCESSION_REGEX = new Regex("^[A-Z]+[0-9]+"); @@ -103,14 +97,14 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy try { reply = dbFetch.fetchDataAsFile( - emprefx.toLowerCase() + ":" + query.trim(), "display=xml", - "xml"); + emprefx.toLowerCase(Locale.ROOT) + ":" + query.trim(), + "display=xml", "xml"); } catch (Exception e) { stopQuery(); throw new Exception( String.format("EBI EMBL XML retrieval failed for %s:%s", - emprefx.toLowerCase(), query.trim()), + emprefx.toLowerCase(Locale.ROOT), query.trim()), e); } return getEmblSequenceRecords(emprefx, query, reply); @@ -454,8 +448,7 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy else { // final product length truncation check - int [] exons2 = adjustForProteinLength(translationLength, - exons); + int[] exons2 = adjustForProteinLength(translationLength, exons); dnaToProteinMapping = new Mapping(product, exons2, new int[] { 1, translationLength }, 3, 1); @@ -665,7 +658,7 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy return listToArray(ranges); } catch (ParseException e) { - Cache.log.warn( + Console.warn( String.format("Not parsing inexact CDS location %s in ENA %s", location, accession)); return new int[] {};