initial commit
[jalview.git] / forester / java / src / org / forester / phylogeny / factories / PhylogenyFactory.java
1 // $Id:
2 // FORESTER -- software libraries and applications
3 // for evolutionary biology research and applications.
4 //
5 // Copyright (C) 2008-2009 Christian M. Zmasek
6 // Copyright (C) 2008-2009 Burnham Institute for Medical Research
7 // All rights reserved
8 // 
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License as published by the Free Software Foundation; either
12 // version 2.1 of the License, or (at your option) any later version.
13 //
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Lesser General Public License for more details.
18 // 
19 // You should have received a copy of the GNU Lesser General Public
20 // License along with this library; if not, write to the Free Software
21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 //
23 // Contact: phylosoft @ gmail . com
24 // WWW: www.phylosoft.org/forester
25
26 package org.forester.phylogeny.factories;
27
28 import java.io.IOException;
29 import java.util.List;
30
31 import org.forester.phylogeny.Phylogeny;
32
33 /*
34  * Interface for Phylogeny factories.
35  * 
36  * @author Christian M. Zmasek
37  */
38 public interface PhylogenyFactory {
39
40     /**
41      * This must be implemented in such a way that it returns an empty
42      * Phylogeny.
43      * 
44      * @return an empty Phylogeny
45      */
46     public Phylogeny create();
47
48     /**
49      * This must create a Phylogeny from source (e.g. an XML file, an alignment,
50      * pairwise distances) by using creator (e.g. an XML file parser, an
51      * algorithm implementation).
52      * 
53      * @param source
54      *            a source to create a Phylogeny from
55      * @param creator
56      *            a means to create a Phylogeny
57      * @return a Phylogeny[] based on argument source
58      * @throws IOException
59      */
60     public Phylogeny[] create( Object source, Object creator ) throws IOException;
61
62     /**
63      * This must create a Phylogeny from source (e.g. an XML file, an alignment,
64      * pairwise distances) by using creator (e.g. an XML file parser, an
65      * algorithm implementation) with parameters listed in parameters.
66      * 
67      * @param source
68      *            a source to create a Phylogeny from
69      * @param creator
70      *            a means to create a Phylogeny
71      * @param parameters
72      *            a List of parameters for Phylogeny creation
73      * @return a Phylogeny[] based on argument source
74      * @throws IOException
75      */
76     public Phylogeny[] create( Object source, Object creator, List<Object> parameters ) throws IOException;
77 } // PhylogenyFactory