import jalview.api.FeatureColourI;
import jalview.bin.Cache;
+import jalview.bin.Console;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.SequenceI;
import java.io.IOError;
import java.io.IOException;
import java.util.Arrays;
+import java.util.Collection;
import java.util.List;
import java.util.Map;
super(client, service, category);
if (category == Category.CATEGORY_CONSERVATION)
{
- setAlignAnalysisUI(new AlignAnalysisUIText(category,
+ /* FIXME: the category name is hardcoded for AACon, names other than
+ * "AAConWS" doesn't work. */
+ setAlignAnalysisUI(new AlignAnalysisUIText(getName(),
SlivkaAnnotationServiceInstance.class,
"Slivka.AACons", false, true, true, true, true, 2,
MessageManager.getString("label.aacon_calculations"),
}
@Override
- public List<AlignmentAnnotation> getAnnotationResult(JobId job,
+ public List<AlignmentAnnotation> getAnnotationResult(JobId jobId,
List<SequenceI> seqs, Map<String, FeatureColourI> featureColours,
Map<String, FeatureMatcherSetI> featureFilters) throws Throwable
{
RemoteFile featFile = null;
try
{
- List<RemoteFile> files = client.getJobResults(job.getJobId());
+ var slivkaJob = client.getJob(jobId.getJobId());
+ Collection<RemoteFile> files = slivkaJob.getResults();
for (RemoteFile f : files)
{
- if (f.getMimeType().equals("application/jalview-annotations"))
+ if (f.getMediaType().equals("application/jalview-annotations"))
{
annotFile = f;
}
- else if (f.getMimeType().equals("application/jalview-features"))
+ else if (f.getMediaType().equals("application/jalview-features"))
{
featFile = f;
}
}
Alignment aln = new Alignment(seqs.toArray(new SequenceI[0]));
if (annotFile == null
- || !new AnnotationFile().readAnnotationFile(aln, annotFile.getURL().toString(), DataSourceType.URL))
+ || !new AnnotationFile().readAnnotationFileWithCalcId(aln, service.getId(), annotFile.getContentUrl().toString(), DataSourceType.URL))
{
- Cache.log.debug("No annotation from slivka job\n" + annotFile);
+ Console.debug("No annotation from slivka job\n" + annotFile);
+ }
+ else {
+ Console.debug("Annotation file loaded " + annotFile);
}
if (featFile == null
- || !new FeaturesFile(featFile.getURL().toString(), DataSourceType.URL).parse(aln, featureColours, true))
+ || !new FeaturesFile(featFile.getContentUrl().toString(), DataSourceType.URL).parse(aln, featureColours, true))
{
- Cache.log.debug("No features from slivka job\n" + featFile);
+ Console.debug("No features from slivka job\n" + featFile);
+ }
+ else {
+ Console.debug("Features feil loaded " + featFile);
}
return Arrays.asList(aln.getAlignmentAnnotation());
}