try {
files = client.getJobResults(jobId.getJobId());
for (RemoteFile f : files) {
- return readAlignment(f);
+ if (f.getMimeType().equals("application/clustal")
+ || f.getMimeType().equals("application/fasta"))
+ {
+ return readAlignment(f);
+ }
}
}
catch (IOException e) {
package jalview.ws.slivkaws;
-import java.io.IOError;
-import java.io.IOException;
-import java.rmi.ServerError;
-import java.util.List;
-
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
+import jalview.io.DataSourceType;
+import jalview.io.FileFormat;
+import jalview.io.FormatAdapter;
import jalview.ws.api.JobId;
import jalview.ws.api.MultipleSequenceAlignmentI;
import jalview.ws.params.ArgumentI;
import jalview.ws.params.InvalidArgumentException;
import jalview.ws.params.WsParamSetI;
+
+import java.io.IOError;
+import java.io.IOException;
+import java.rmi.ServerError;
+import java.util.List;
+
+import compbio.data.msa.Category;
import uk.ac.dundee.compbio.slivkaclient.RemoteFile;
import uk.ac.dundee.compbio.slivkaclient.SlivkaClient;
import uk.ac.dundee.compbio.slivkaclient.SlivkaService;
@Override
public AlignmentI getAlignmentFor(JobId jobId) throws InvalidArgumentException, ServerError, IOError
{
- List<RemoteFile> files;
try
{
- files = client.getJobResults(jobId.getJobId());
+ List<RemoteFile> files = client.getJobResults(jobId.getJobId());
for (RemoteFile f : files)
{
- return readAlignment(f);
+ if (f.getMimeType().equals("application/clustal")
+ || f.getMimeType().equals("application/fasta"))
+ {
+ return readAlignment(f);
+ }
}
} catch (IOException e)
{
{
final var mimetype = f.getMimeType();
FileFormat format;
- if (mimetype == "application/clustal")
+ if (mimetype.equals("application/clustal"))
format = FileFormat.Clustal;
- else if (mimetype == "application/fasta")
+ else if (mimetype.equals("application/fasta"))
format = FileFormat.Fasta;
else
return null;