X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAnnotationFile.java;h=ce1afc274bf08f745c6fabf3882aa7ff8ec8279f;hb=1660a4fe03b8dda74b008ae4de2d804f8044a463;hp=d004c1af0dfb429f97414e3a878d053a4bbaaf62;hpb=7dfbf441b22406f0575cd7db2a9cf351648a7838;p=jalview.git diff --git a/src/jalview/io/AnnotationFile.java b/src/jalview/io/AnnotationFile.java index d004c1a..ce1afc2 100755 --- a/src/jalview/io/AnnotationFile.java +++ b/src/jalview/io/AnnotationFile.java @@ -1,184 +1,466 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer - * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle - * + * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) + * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ - package jalview.io; import java.io.*; -import jalview.datamodel.*; +import java.net.*; import java.util.*; -import jalview.schemes.UserColourScheme; -import java.net.URL; +import jalview.analysis.*; +import jalview.datamodel.*; +import jalview.schemes.*; public class AnnotationFile { + StringBuffer text = new StringBuffer("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); + + } - public String printAnnotations(AlignmentAnnotation [] annotations) + /** + * hold all the information about a particular view definition read from or + * written out in an annotations file. + */ + public class ViewDef { - StringBuffer text = new StringBuffer( - "JALVIEW_ANNOTATION\n" - +"# Created: " - +new java.util.Date()+"\n\n"); + public String viewname; - AlignmentAnnotation row; - String comma; - String seqref = null; + public HiddenSequences hidseqs; - StringBuffer colours = new StringBuffer(); - StringBuffer graphLine = new StringBuffer(); + public ColumnSelection hiddencols; - Hashtable graphGroup = new Hashtable(); + public Vector visibleGroups; - java.awt.Color color; + public Hashtable hiddenRepSeqs; - for(int i=0; i