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 newEntityPoly(EntityPoly entityPoly);
055        public void newEntityPolySeq(EntityPolySeq epolseq);
056        public void newStructAsym(StructAsym sasym);
057        public void setStruct(Struct struct);
058        public void newDatabasePDBrev(DatabasePDBrev dbrev);
059        public void newDatabasePDBrevRecord(DatabasePdbrevRecord dbrev);
060        public void newDatabasePDBremark(DatabasePDBremark remark);
061        public void newExptl(Exptl exptl);
062        public void newCell(Cell cell);
063        public void newSymmetry(Symmetry symmetry);
064        public void newStructNcsOper(StructNcsOper sNcsOper);
065        public void newAtomSites(AtomSites atomSites);
066        public void newStructRef(StructRef sref);
067        public void newStructRefSeq(StructRefSeq sref);
068        public void newStructRefSeqDif(StructRefSeqDif sref);
069        public void newStructSite(StructSite sref);
070        public void newStructSiteGen(StructSiteGen sref);
071        public void newPdbxAuditRevisionHistory(PdbxAuditRevisionHistory history);
072        public void newPdbxDatabaseStatus(PdbxDatabaseStatus status);
073        public void newPdbxPolySeqScheme(PdbxPolySeqScheme ppss);
074        public void newPdbxNonPolyScheme(PdbxNonPolyScheme ppss);
075        public void newPdbxEntityNonPoly(PdbxEntityNonPoly pen);
076        public void newStructKeywords(StructKeywords kw);
077        public void newRefine(Refine r);
078        public void newChemComp(ChemComp c);
079        public void newChemCompDescriptor(ChemCompDescriptor ccd);
080        public void newPdbxStructOperList(PdbxStructOperList structOper);
081        public void newPdbxStrucAssembly(PdbxStructAssembly strucAssembly);
082        public void newPdbxStrucAssemblyGen(PdbxStructAssemblyGen strucAssembly);
083        public void newChemCompAtom(ChemCompAtom atom);
084        public void newPdbxChemCompIndentifier(PdbxChemCompIdentifier id);
085        public void newChemCompBond(ChemCompBond bond);
086        public void newPdbxChemCompDescriptor(PdbxChemCompDescriptor desc);
087        public void newEntitySrcGen(EntitySrcGen entitySrcGen);
088        public void newEntitySrcNat(EntitySrcNat entitySrcNat);
089        public void newEntitySrcSyn(EntitySrcSyn entitySrcSyn);
090        public void newStructConn(StructConn structConn);
091
092        /** AuditAuthor contains the info from the PDB-AUTHOR records.
093         *
094         * @param aa
095         */
096        public void newAuditAuthor(AuditAuthor aa);
097
098        /** This method is called if no particular handler for the provided cif category
099         * has been implemented so far.
100         * @param category The category that is being processed.
101         * @param loopFields the fields of this category.
102         * @param lineData the data that is being provided.
103         */
104        public void newGenericData(String category, List<String> loopFields, List<String> lineData);
105
106        public void setFileParsingParameters(FileParsingParameters params);
107        public FileParsingParameters getFileParsingParameters();
108
109
110
111
112
113
114
115
116}