-* Jalview - A Sequence Alignment Editor and Viewer
-* Copyright (C) 2005 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
-*/\r
-package jalview.datamodel;\r
-\r
-import java.util.*;\r
-\r
-\r
-/**
- * <p>Title: </p>
- *
- * <p>Description: </p>
- *
- * <p>Copyright: Copyright (c) 2004</p>
- *
- * <p>Company: Dundee University</p>
- *
- * @author not attributable
- * @version 1.0
- */\r
-public class AlignmentOrder {\r
- // JBPNote : this method would return a vector containing all sequences in seqset\r
- // with those also contained in order at the beginning of the vector in the order\r
- // given by order. AlignmentSorter.vectorSubsetToArray already does this, but that method\r
- // should be here for completeness.\r
-\r
- /* public Vector getOrder(AlignmentI seqset)
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview 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 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview 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 Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
+package jalview.datamodel;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class AlignmentOrder
+{
+ // JBPNote : this method would return a vector containing all sequences in
+ // seqset
+ // with those also contained in order at the beginning of the vector in the
+ // order
+ // given by order. AlignmentSorter.vectorSubsetToArray already does this, but
+ // that method
+ // should be here for completeness.
+
+ /*
+ * public Vector getOrder(AlignmentI seqset) { Vector perm = new
+ * Vector(seqset.getHeight()); for (i=0, o = 0, n=seqset.getHeight(), p =
+ * Order.size(); i<n; i++) perm.setElement(i,...). return Order; }
+ */
+
+ /** DOCUMENT ME!! */
+ public static final int FILE = 0;
+
+ /** DOCUMENT ME!! */
+ public static final int MSA = 1;
+
+ /** DOCUMENT ME!! */
+ public static final int USER = 2;
+
+ private int Type = 0;
+
+ private String Name;
+
+ private List<SequenceI> Order = null;
+
+ /**
+ * Creates a new AlignmentOrder object.
+ */
+ public AlignmentOrder()
+ {
+ }
+
+ /**
+ * AlignmentOrder
+ *
+ * @param anOrder
+ */
+ public AlignmentOrder(List<SequenceI> anOrder)
+ {
+ Order = anOrder;
+ }
+
+ /**
+ * AlignmentOrder
+ *
+ * @param orderFrom
+ * AlignmentI
+ */
+ public AlignmentOrder(AlignmentI orderFrom)
+ {
+ Order = new ArrayList<SequenceI>();
+
+ for (SequenceI seq : orderFrom.getSequences())
+ {
+ Order.add(seq);
+ }
+ }
+
+ /**
+ * Creates a new AlignmentOrder object.
+ *
+ * @param orderFrom
+ * DOCUMENT ME!
+ */
+ public AlignmentOrder(SequenceI[] orderFrom)
+ {
+ Order = new ArrayList<SequenceI>(Arrays.asList(orderFrom));
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param Type
+ * DOCUMENT ME!
+ */
+ public void setType(int Type)
+ {
+ this.Type = Type;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public int getType()
+ {
+ return Type;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param Name
+ * DOCUMENT ME!
+ */
+ public void setName(String Name)
+ {
+ this.Name = Name;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public String getName()
+ {
+ return Name;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @param Order
+ * DOCUMENT ME!
+ */
+ public void setOrder(List<SequenceI> Order)
+ {
+ this.Order = Order;
+ }
+
+ /**
+ * DOCUMENT ME!
+ *
+ * @return DOCUMENT ME!
+ */
+ public List<SequenceI> getOrder()