From: tcofoegbu Date: Fri, 27 Mar 2015 11:37:34 +0000 (+0000) Subject: merge commit X-Git-Tag: Jalview_2_9~71^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c77a1af8ef91918f935bbf493d348eb022fa73f7;p=jalview.git merge commit --- c77a1af8ef91918f935bbf493d348eb022fa73f7 diff --cc resources/lang/Messages.properties index 317f043,0d3d491..e103758 --- a/resources/lang/Messages.properties +++ b/resources/lang/Messages.properties @@@ -1207,4 -1222,6 +1222,23 @@@ info.select_filter_option = Select Filt info.associate_wit_sequence = Associate with Sequence label.search_result = Search Result label.found_structures_summary = Found Structures Summary + label.configure_displayed_columns = Configure Displayed Columns + label.start_jalview = Start Jalview + label.biojs_html_export = BioJS ++action.back = Back ++label.hide_insertions = Hide Insertions ++label.mark_as_representative = Mark as representative ++label.open_jabaws_web_page = Open JABAWS web page ++label.opens_the_jabaws_server_homepage = Opens the JABAWS server's homepage in web browser ++label.pdb_sequence_getcher = PDB Sequence Fetcher ++label.result = result ++label.results = results ++label.structure_chooser = Structure Chooser ++label.select = Select : ++label.invert = Invert ++label.select_pdb_file = Select PDB File ++info.select_filter_option = Select Filter Option/Manual Entry ++info.associate_wit_sequence = Associate with Sequence ++label.search_result = Search Result ++label.found_structures_summary = Found Structures Summary +label.configure_displayed_columns = Configure Displayed Columns diff --cc src/jalview/io/SequenceAnnotationReport.java index e60e7e5,07cfa8b..7c96d45 --- a/src/jalview/io/SequenceAnnotationReport.java +++ b/src/jalview/io/SequenceAnnotationReport.java @@@ -20,16 -20,17 +20,17 @@@ */ package jalview.io; + -import java.util.ArrayList; -import java.util.Hashtable; -import java.util.List; -import java.util.Vector; - import jalview.datamodel.DBRefEntry; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; import jalview.util.UrlLink; +import java.util.ArrayList; +import java.util.Hashtable; +import java.util.List; - import java.util.Vector; ++ + /** * generate HTML reports for a sequence * @@@ -179,7 -180,7 +180,7 @@@ public class SequenceAnnotationRepor } else { -- for (String urlstring : (Vector) feature.links) ++ for (String urlstring : feature.links) { try { diff --cc src/jalview/renderer/seqfeatures/FeatureRenderer.java index 362ef5e,648f776..7eda2f7 --- a/src/jalview/renderer/seqfeatures/FeatureRenderer.java +++ b/src/jalview/renderer/seqfeatures/FeatureRenderer.java @@@ -319,9 -315,9 +316,9 @@@ public class FeatureRenderer extend } if (offscreenRender && offscreenImage == null) -- { - if (lastSequenceFeatures[sfindex].begin <= start - && lastSequenceFeatures[sfindex].end >= start) ++ { + if (sequenceFeature.begin <= start + && sequenceFeature.end >= start) { // this is passed out to the overview and other sequence renderers // (e.g. molecule viewer) to get displayed colour for rendered diff --cc src/jalview/ws/dbsources/PDBRestClient.java index f406702,1ab6125..fd0c503 --- a/src/jalview/ws/dbsources/PDBRestClient.java +++ b/src/jalview/ws/dbsources/PDBRestClient.java @@@ -107,25 -107,17 +107,28 @@@ public class PDBRestClien */ public static String parseJsonExceptionString(String jsonErrorResponse) { - String errorMessage = "RunTime error"; + StringBuilder errorMessage = new StringBuilder( + "\n============= PDB Rest Client RunTime error =============\n"); ++ try { JSONParser jsonParser = new JSONParser(); JSONObject jsonObj = (JSONObject) jsonParser.parse(jsonErrorResponse); JSONObject errorResponse = (JSONObject) jsonObj.get("error"); - errorMessage = errorResponse.get("msg").toString(); + JSONObject responseHeader = (JSONObject) jsonObj .get("responseHeader"); - errorMessage += responseHeader.get("params").toString(); + JSONObject paramsObj = (JSONObject) responseHeader.get("params"); + String status = responseHeader.get("status").toString(); + String message = errorResponse.get("msg").toString(); + String query = paramsObj.get("q").toString(); + String fl = paramsObj.get("fl").toString(); + + errorMessage.append("Status: ").append(status).append("\n"); + errorMessage.append("Message: ").append(message).append("\n"); + errorMessage.append("query: ").append(query).append("\n"); + errorMessage.append("fl: ").append(fl).append("\n"); ++ } catch (ParseException e) { e.printStackTrace(); diff --cc test/jalview/ws/dbsources/PDBRestClientTest.java index c35cbe9,ba07562..d86edd2 --- a/test/jalview/ws/dbsources/PDBRestClientTest.java +++ b/test/jalview/ws/dbsources/PDBRestClientTest.java @@@ -97,13 -94,8 +97,14 @@@ public class PDBRestClientTes String parsedErrorResponse = PDBRestClient .parseJsonExceptionString(jsonErrorResponse); - String expectedErrorMsg = "org.apache.solr.search.SyntaxError: Cannot parse 'text:abc OR text:go:abc AND molecule_sequence:['' TO *]': Encountered \" \":\" \": \"\" at line 1, column 19.{\"q\":\"text:abc OR text:go:abc AND molecule_sequence:['' TO *]\",\"fl\":\"pdb_id\",\"sort\":\"\",\"rows\":\"100\",\"wt\":\"json\"}"; + System.out.println(parsedErrorResponse); + + String expectedErrorMsg = "\n============= PDB Rest Client RunTime error =============\n" + + "Status: 400\n" + + "Message: org.apache.solr.search.SyntaxError: Cannot parse 'text:abc OR text:go:abc AND molecule_sequence:['' TO *]': Encountered \" \":\" \": \"\" at line 1, column 19.\n" + + "query: text:abc OR text:go:abc AND molecule_sequence:['' TO *]\n" + + "fl: pdb_id\n"; + assertEquals(expectedErrorMsg, parsedErrorResponse); }