From 1055858fb1c685f77ec3398723cf58f6a591f998 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 6 Oct 2016 16:16:08 +0100 Subject: [PATCH] JAL-2254 map error text in root node of EMBL XML response --- resources/embl_mapping.xml | 3 +++ src/jalview/datamodel/xdb/embl/EmblFile.java | 12 ++++++++++++ src/jalview/ws/dbsources/EmblXmlSource.java | 5 +++++ 3 files changed, 20 insertions(+) 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) { -- 1.7.10.2