X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAnnotationFile.java;h=00b7ead85bde0ac4d6b5c104d33c3752c971904f;hb=96f41aa46d3e568f8734834ab36fdc9ad8e54ac1;hp=a211d1aa415ab7ac9761286137a3a35a77ed6d88;hpb=544ccf2cea9d02873528cc8be4ca1682d56cfaad;p=jalview.git diff --git a/src/jalview/io/AnnotationFile.java b/src/jalview/io/AnnotationFile.java index a211d1a..00b7ead 100755 --- a/src/jalview/io/AnnotationFile.java +++ b/src/jalview/io/AnnotationFile.java @@ -1,188 +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; - SequenceI 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