From 825a9e8fcb05f794dc082ce84656c477cfff4918 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 31 Oct 2007 15:11:12 +0000 Subject: [PATCH] beginnings of view definition capability for annotations file --- src/jalview/io/AnnotationFile.java | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/jalview/io/AnnotationFile.java b/src/jalview/io/AnnotationFile.java index 577b7e4..6285cf1 100755 --- a/src/jalview/io/AnnotationFile.java +++ b/src/jalview/io/AnnotationFile.java @@ -33,11 +33,42 @@ public class AnnotationFile "JALVIEW_ANNOTATION\n" + "# Created: " + new java.util.Date() + "\n\n"); - + /** + * convenience method for pre-2.4 feature files which have no view, hidden columns or hidden row keywords. + * @param annotations + * @param groups + * @param properties + * @return feature file as a string. + */ public String printAnnotations(AlignmentAnnotation[] annotations, Vector groups, Hashtable properties) { + return printAnnotations(annotations, groups, + properties, null); + + } + /** + * hold all the information about a particular view definition + * read from or written out in an annotations file. + */ + public class ViewDef { + public String viewname; + public HiddenSequences hidseqs; + public ColumnSelection hiddencols; + public Vector visibleGroups; + public ViewDef(String viewname, HiddenSequences hidseqs, + ColumnSelection hiddencols) + { + this.viewname = viewname; + this.hidseqs = hidseqs; + this.hiddencols = hiddencols; + } + } + public String printAnnotations(AlignmentAnnotation[] annotations, + Vector groups, + Hashtable properties, ViewDef[] views) + { if (annotations != null) { boolean oneColour = true; @@ -221,7 +252,7 @@ public class AnnotationFile } } - + return text.toString(); } -- 1.7.10.2