- if (f.getMediaType().equals("application/jalview-annotations"))
- {
- Alignment aln = new Alignment(dataset.toArray(new SequenceI[0]));
- AnnotationFile af = new AnnotationFile();
- boolean valid = af.readAnnotationFileWithCalcId(aln, service.getId(),
- f.getContentUrl().toString(), DataSourceType.URL);
- if (valid)
- {
- return Arrays.asList(aln.getAlignmentAnnotation());
- }
- else
- {
- throw new IOException("Unable to read annotations from file " +
- f.getContentUrl().toString());
- }
- }
+ AnnotationFile af = new AnnotationFile();
+ annotPresent = af.readAnnotationFileWithCalcId(
+ aln, service.getId(), annotFile.getContentUrl().toString(),
+ DataSourceType.URL);