001/*
002 *                    BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 *
020 */
021
022package org.biojava.bio.program.homologene;
023
024
025/**
026 * an interface for Homologene dataset Builders
027 *
028 * @author David Huen
029 */
030public interface HomologeneBuilder
031{
032    public String TAXONID = "TaxonID";
033    public String LOCUSID = "LocusID";
034    public String HOMOID = "HomologeneID";
035    public String ACCESSION = "Accession";
036
037    public String SIMILARITYTYPE = "SimilarityType";
038    public String PERCENTIDENTITY = "PercentIdentity";
039    public String REFERENCE = "Reference";
040
041    public String TWIN = "twin";
042    public String MULTIPLE = "multiple";
043    public String CURATED = "curated";
044
045
046    /**
047     * indicates start of data for a HomologeneDB
048     */
049    public void startDB();
050
051    /**
052     * indicates start of data for a OrthoPairSet
053     */
054    public void startGroup();
055
056    /**
057     * indicates start of data for an OrthoPair
058     */
059    public void startOrthoPair();
060
061    /**
062     * indicates start of data for an orthologue
063     */
064    public void startOrthologue();
065
066    /**
067     * add a property to the current Orthologue
068     */
069    public void addOrthologueProperty(String key, String value);
070
071    /**
072     * end of data for this Orthologue
073     */
074    public void endOrthologue();
075 
076    /**
077     * add a property to the current OrthoPair
078     */
079    public void addOrthoPairProperty(String key, String value);
080
081    /**
082     * end of data for this OrthoPair
083     */
084    public void endOrthoPair();
085
086    /**
087     * add title information to an Orthologue
088     * (this is not in enclosed in the Orthologue element
089     * because it comes completely separate in the Homologene
090     * data files.  Go figger.)
091     */
092    public void addTitle(int taxonID, String homologeneID, String title);
093
094    /**
095     * end of data for group
096     */
097    public void endGroup();
098
099    /**
100     * end of data for DB
101     */
102    public void endDB();
103
104    /**
105     * retrieve the DB that has just been built
106     */
107    public HomologeneDB getDB();
108}
109