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.nbio.ontology.obo; 026 027import org.biojava.nbio.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 /** 037 * starting to parse a new OBO file 038 */ 039 void documentStart(); 040 041 /** 042 * end of parsing a new OBO file 043 */ 044 void documentEnd(); 045 046 /** 047 * parsed a new OBO file header 048 */ 049 void newOboFileHeader(); 050 051 /** 052 * parsed a new stanza in the file 053 * @param stanza 054 */ 055 void newStanza(String stanza); 056 057 /** 058 * found a new key in the file 059 * @param key 060 * @param value 061 */ 062 void newKey(String key, String value ); 063 064 /** a new synonym has been found 065 * 066 * @param synonym 067 */ 068 void newSynonym(Synonym synonym); 069}