- {return new StringBody(new jalview.io.AnnotationFile().printAnnotations(al.getAlignmentAnnotation(),
- al.getGroups(),al.getProperties()));
- } else {
- if (!format.equals(CSVANNOT))
+ {
+ return new StringBody(new jalview.io.AnnotationFile()
+ .printAnnotationsForAlignment(al));
+ }
+ else
+ {
+ if (!format.equals(CSVANNOT))
+ {
+ throw new UnsupportedEncodingException(
+ "Unrecognised format for exporting Annotation (" + format
+ + ")");
+ }
+ return new StringBody(new jalview.io.AnnotationFile()
+ .printCSVAnnotations(al.getAlignmentAnnotation()));
+ }
+ }
+
+ @Override
+ public List<String> getURLEncodedParameter()
+ {
+ ArrayList<String> prms = new ArrayList<String>();
+ super.addBaseParams(prms);
+ prms.add("format='" + format + "'");
+ return prms;
+ }
+
+ @Override
+ public String getURLtokenPrefix()
+ {
+ return "ALANNOTATION";
+ }
+
+ @Override
+ public boolean configureProperty(String tok, String val,
+ StringBuffer warnings)
+ {
+
+ if (tok.startsWith("format"))
+ {
+ for (String fmt : new String[] { CSVANNOT, JVANNOT })
+ {
+ if (val.equalsIgnoreCase(fmt))