JAL-972 local do not have a coordsys element with source metadata (JAL-424 would...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 11 May 2012 13:15:56 +0000 (14:15 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 11 May 2012 13:15:56 +0000 (14:15 +0100)
src/jalview/ws/dbsources/das/datamodel/DasSequenceSource.java

index 5f18331..a63727f 100644 (file)
@@ -94,7 +94,9 @@ public class DasSequenceSource extends DbSourceProxyImpl implements
     this.source = source;\r
     this.dbname = dbname;\r
     this.dbrefname = dbrefname;\r
-    this.coordsys = coordsys;\r
+    if (coordsys!=null ) {\r
+      this.coordsys = coordsys;\r
+    }\r
     this.connprops=connprops;\r
   }\r
 \r
@@ -122,7 +124,7 @@ public class DasSequenceSource extends DbSourceProxyImpl implements
 \r
   public String getDbVersion()\r
   {\r
-    return coordsys.getVersion();\r
+    return coordsys!=null ? coordsys.getVersion() : "";\r
   }\r
 \r
   public AlignmentI getSequenceRecords(String queries) throws Exception\r
@@ -299,7 +301,7 @@ public class DasSequenceSource extends DbSourceProxyImpl implements
 \r
   public String getTestQuery()\r
   {\r
-    return coordsys.getTestRange();\r
+    return coordsys==null ? "" : coordsys.getTestRange();\r
   }\r
 \r
   public boolean isValidReference(String accession)\r