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 at Mar 4, 2008 021 */ 022package org.biojava.nbio.structure.io.mmcif; 023 024import org.biojava.nbio.structure.io.FileParsingParameters; 025import org.biojava.nbio.structure.io.mmcif.model.*; 026 027import java.util.List; 028 029/** An interface for the events triggered by a MMcifParser. 030 * The Consumer listens to the events and builds up the protein structure. 031 * 032 * @author Andreas Prlic 033 * @since 1.7 034 * 035 */ 036public interface MMcifConsumer { 037 /** called at start of document 038 * 039 */ 040 public void documentStart(); 041 042 /** called at end of document 043 * 044 */ 045 public void documentEnd(); 046 047 048 /** A new AtomSite record has been read. Contains the Atom data 049 * 050 * @param atom 051 */ 052 public void newAtomSite(AtomSite atom); 053 public void newEntity(Entity entity); 054 public void newEntityPolySeq(EntityPolySeq epolseq); 055 public void newStructAsym(StructAsym sasym); 056 public void setStruct(Struct struct); 057 public void newDatabasePDBrev(DatabasePDBrev dbrev); 058 public void newDatabasePDBrevRecord(DatabasePdbrevRecord dbrev); 059 public void newDatabasePDBremark(DatabasePDBremark remark); 060 public void newExptl(Exptl exptl); 061 public void newCell(Cell cell); 062 public void newSymmetry(Symmetry symmetry); 063 public void newStructNcsOper(StructNcsOper sNcsOper); 064 public void newAtomSites(AtomSites atomSites); 065 public void newStructRef(StructRef sref); 066 public void newStructRefSeq(StructRefSeq sref); 067 public void newStructRefSeqDif(StructRefSeqDif sref); 068 public void newStructSite(StructSite sref); 069 public void newStructSiteGen(StructSiteGen sref); 070 public void newPdbxPolySeqScheme(PdbxPolySeqScheme ppss); 071 public void newPdbxNonPolyScheme(PdbxNonPolyScheme ppss); 072 public void newPdbxEntityNonPoly(PdbxEntityNonPoly pen); 073 public void newStructKeywords(StructKeywords kw); 074 public void newRefine(Refine r); 075 public void newChemComp(ChemComp c); 076 public void newChemCompDescriptor(ChemCompDescriptor ccd); 077 public void newPdbxStructOperList(PdbxStructOperList structOper); 078 public void newPdbxStrucAssembly(PdbxStructAssembly strucAssembly); 079 public void newPdbxStrucAssemblyGen(PdbxStructAssemblyGen strucAssembly); 080 public void newChemCompAtom(ChemCompAtom atom); 081 public void newPdbxChemCompIndentifier(PdbxChemCompIdentifier id); 082 public void newChemCompBond(ChemCompBond bond); 083 public void newPdbxChemCompDescriptor(PdbxChemCompDescriptor desc); 084 public void newEntitySrcGen(EntitySrcGen entitySrcGen); 085 public void newEntitySrcNat(EntitySrcNat entitySrcNat); 086 public void newEntitySrcSyn(EntitySrcSyn entitySrcSyn); 087 public void newStructConn(StructConn structConn); 088 089 /** AuditAuthor contains the info from the PDB-AUTHOR records. 090 * 091 * @param aa 092 */ 093 public void newAuditAuthor(AuditAuthor aa); 094 095 /** This method is called if no particular handler for the provided cif category 096 * has been implemented so far. 097 * @param category The category that is being processed. 098 * @param loopFields the fields of this category. 099 * @param lineData the data that is being provided. 100 */ 101 public void newGenericData(String category, List<String> loopFields, List<String> lineData); 102 103 public void setFileParsingParameters(FileParsingParameters params); 104 public FileParsingParameters getFileParsingParameters(); 105 106 107 108 109 110 111 112 113}