From: gmungoc Date: Thu, 6 Oct 2016 15:16:08 +0000 (+0100) Subject: JAL-2254 map error text in root node of EMBL XML response X-Git-Tag: Release_2_10_0b1~3^2~15^2~7 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1055858fb1c685f77ec3398723cf58f6a591f998;hp=1eda02547f8519e1dff46dac06734cba6c77b97f;p=jalview.git JAL-2254 map error text in root node of EMBL XML response --- diff --git a/resources/embl_mapping.xml b/resources/embl_mapping.xml index 01b921a..3b80821 100644 --- a/resources/embl_mapping.xml +++ b/resources/embl_mapping.xml @@ -28,6 +28,9 @@ --> + + + diff --git a/src/jalview/datamodel/xdb/embl/EmblFile.java b/src/jalview/datamodel/xdb/embl/EmblFile.java index a95f6e5..1dd854a 100644 --- a/src/jalview/datamodel/xdb/embl/EmblFile.java +++ b/src/jalview/datamodel/xdb/embl/EmblFile.java @@ -46,6 +46,8 @@ public class EmblFile Vector errors; + String text; + /** * @return the entries */ @@ -187,4 +189,14 @@ public class EmblFile } } } + + public String getText() + { + return text; + } + + public void setText(String text) + { + this.text = text; + } } diff --git a/src/jalview/ws/dbsources/EmblXmlSource.java b/src/jalview/ws/dbsources/EmblXmlSource.java index f672e8b..b139574 100644 --- a/src/jalview/ws/dbsources/EmblXmlSource.java +++ b/src/jalview/ws/dbsources/EmblXmlSource.java @@ -102,6 +102,11 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy } } + /* + * invalid accession gets a reply with no elements, text content of + * EmbFile reads something like (e.g.) this ungrammatical phrase + * Entry: display type is either not supported or entry is not found. + */ List peptides = new ArrayList(); if (efile != null && efile.getEntries() != null) {