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 * Created on Jan 18, 2008
021 * 
022 * since 1.6
023 */
024
025package org.biojava.ontology.obo;
026
027import org.biojava.ontology.Synonym;
028
029/** an interface for events that occur during parsing of .obo files
030 * 
031 * @author Andreas Prlic
032 *
033 */
034public interface OboFileEventListener {
035
036        /** starting to parse a new OBO file
037         * 
038         *
039         */
040        public void documentStart();
041        
042        /** end of parsing a new OBO file
043         * 
044         *
045         */
046        public void documentEnd();
047        
048        /** parsed a new OBO file header
049         * 
050         *
051         */
052        public void newOboFileHeader();
053        
054        /** parsed a new stanza in the file
055         * 
056         * @param stanza
057         */
058        public void newStanza(String stanza);
059        
060        /**found a new key in the file
061         * 
062         * @param key
063         * @param value
064         */
065        public void newKey(String key, String value );
066        
067        /** a new synonym has been found
068         * 
069         * @param synonym
070         */
071        public void newSynonym(Synonym synonym);
072}