JAL-2542 correct adjustment of sequence features for flanking sequence
[jalview.git] / src / jalview / ws / seqfetcher / DbSourceProxyImpl.java
index bdea000..2fcf501 100644 (file)
  */
 package jalview.ws.seqfetcher;
 
-import jalview.api.FeatureSettingsI;
+import jalview.api.FeatureSettingsModelI;
 import jalview.datamodel.AlignmentI;
+import jalview.io.DataSourceType;
+import jalview.io.FileFormatI;
 import jalview.io.FormatAdapter;
 import jalview.io.IdentifyFile;
 
@@ -92,10 +94,12 @@ public abstract class DbSourceProxyImpl implements DbSourceProxy
   protected AlignmentI parseResult(String result) throws Exception
   {
     AlignmentI sequences = null;
-    String format = new IdentifyFile().identify(result, "Paste");
-    if (FormatAdapter.isValidFormat(format))
+    FileFormatI format = new IdentifyFile().identify(result,
+            DataSourceType.PASTE);
+    if (format != null)
     {
-      sequences = new FormatAdapter().readFile(result.toString(), "Paste",
+      sequences = new FormatAdapter().readFile(result.toString(),
+              DataSourceType.PASTE,
               format);
     }
     return sequences;
@@ -147,11 +151,11 @@ public abstract class DbSourceProxyImpl implements DbSourceProxy
   @Override
   public String getDescription()
   {
-    return null;
+    return "";
   }
 
   @Override
-  public FeatureSettingsI getFeatureColourScheme()
+  public FeatureSettingsModelI getFeatureColourScheme()
   {
     return null;
   }