org.biojava.bio.structure.io.mmcif
Class SimpleMMcifConsumer

java.lang.Object
  extended by org.biojava.bio.structure.io.mmcif.SimpleMMcifConsumer
All Implemented Interfaces:
MMcifConsumer

public class SimpleMMcifConsumer
extends Object
implements MMcifConsumer

A MMcifConsumer implementation that build a in-memory representation of the content of a mmcif file as a BioJava Structure object.

Since:
1.7
Author:
Andreas Prlic

Field Summary
static Logger logger
           
 
Constructor Summary
SimpleMMcifConsumer()
           
 
Method Summary
 void documentEnd()
          called at end of document
 void documentStart()
          Start the parsing
 FileParsingParameters getFileParsingParameters()
           
 Structure getStructure()
          This method will return the parsed protein structure, once the parsing has been finished
 void newAtomSite(AtomSite atom)
          A new AtomSite record has been read.
 void newAuditAuthor(AuditAuthor aa)
          AuditAuthor contains the info from the PDB-AUTHOR records.
 void newChemComp(ChemComp c)
           
 void newChemCompDescriptor(ChemCompDescriptor ccd)
           
 void newDatabasePDBremark(DatabasePDBremark remark)
           
 void newDatabasePDBrev(DatabasePDBrev dbrev)
           
 void newEntity(Entity entity)
           
 void newEntityPolySeq(EntityPolySeq epolseq)
          The EntityPolySeq object provide the amino acid sequence objects for the Entities.
 void newExptl(Exptl exptl)
           
 void newGenericData(String category, List<String> loopFields, List<String> lineData)
          This method is called if no particular handler for the provided cif category has been implemented so far.
 void newPdbxEntityNonPoly(PdbxEntityNonPoly pen)
           
 void newPdbxNonPolyScheme(PdbxNonPolyScheme ppss)
           
 void newPdbxPolySeqScheme(PdbxPolySeqScheme ppss)
           
 void newRefine(Refine r)
           
 void newStructAsym(StructAsym sasym)
           
 void newStructKeywords(StructKeywords kw)
           
 void newStructRef(StructRef sref)
           
 void newStructRefSeq(StructRefSeq sref)
          create a DBRef record from the StrucRefSeq record:
 void setFileParsingParameters(FileParsingParameters params)
           
 void setStruct(Struct struct)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static Logger logger
Constructor Detail

SimpleMMcifConsumer

public SimpleMMcifConsumer()
Method Detail

newEntity

public void newEntity(Entity entity)
Specified by:
newEntity in interface MMcifConsumer

newStructAsym

public void newStructAsym(StructAsym sasym)
Specified by:
newStructAsym in interface MMcifConsumer

newStructKeywords

public void newStructKeywords(StructKeywords kw)
Specified by:
newStructKeywords in interface MMcifConsumer

setStruct

public void setStruct(Struct struct)
Specified by:
setStruct in interface MMcifConsumer

newAtomSite

public void newAtomSite(AtomSite atom)
Description copied from interface: MMcifConsumer
A new AtomSite record has been read. Contains the Atom data

Specified by:
newAtomSite in interface MMcifConsumer

documentStart

public void documentStart()
Start the parsing

Specified by:
documentStart in interface MMcifConsumer

documentEnd

public void documentEnd()
Description copied from interface: MMcifConsumer
called at end of document

Specified by:
documentEnd in interface MMcifConsumer

getStructure

public Structure getStructure()
This method will return the parsed protein structure, once the parsing has been finished

Returns:
a BioJava protein structure object

newDatabasePDBrev

public void newDatabasePDBrev(DatabasePDBrev dbrev)
Specified by:
newDatabasePDBrev in interface MMcifConsumer

newDatabasePDBremark

public void newDatabasePDBremark(DatabasePDBremark remark)
Specified by:
newDatabasePDBremark in interface MMcifConsumer

newRefine

public void newRefine(Refine r)
Specified by:
newRefine in interface MMcifConsumer

newAuditAuthor

public void newAuditAuthor(AuditAuthor aa)
Description copied from interface: MMcifConsumer
AuditAuthor contains the info from the PDB-AUTHOR records.

Specified by:
newAuditAuthor in interface MMcifConsumer

newExptl

public void newExptl(Exptl exptl)
Specified by:
newExptl in interface MMcifConsumer

newStructRef

public void newStructRef(StructRef sref)
Specified by:
newStructRef in interface MMcifConsumer

newStructRefSeq

public void newStructRefSeq(StructRefSeq sref)
create a DBRef record from the StrucRefSeq record:
  PDB record                                    DBREF
  Field Name                                    mmCIF Data Item
  Section                                       n.a.
  PDB_ID_Code                                   _struct_ref_seq.pdbx_PDB_id_code
  Strand_ID                                     _struct_ref_seq.pdbx_strand_id
  Begin_Residue_Number                  _struct_ref_seq.pdbx_auth_seq_align_beg
  Begin_Ins_Code                                _struct_ref_seq.pdbx_seq_align_beg_ins_code
  End_Residue_Number                    _struct_ref_seq.pdbx_auth_seq_align_end
  End_Ins_Code                                  _struct_ref_seq.pdbx_seq_align_end_ins_code
  Database                                      _struct_ref.db_name
  Database_Accession_No                 _struct_ref_seq.pdbx_db_accession
  Database_ID_Code                      _struct_ref.db_code
  Database_Begin_Residue_Number _struct_ref_seq.db_align_beg
  Databaes_Begin_Ins_Code       _struct_ref_seq.pdbx_db_align_beg_ins_code
  Database_End_Residue_Number   _struct_ref_seq.db_align_end
  Databaes_End_Ins_Code                 _struct_ref_seq.pdbx_db_align_end_ins_code
  

Specified by:
newStructRefSeq in interface MMcifConsumer

newEntityPolySeq

public void newEntityPolySeq(EntityPolySeq epolseq)
The EntityPolySeq object provide the amino acid sequence objects for the Entities. Later on the entities are mapped to the BioJava Chain and Compound objects.

Specified by:
newEntityPolySeq in interface MMcifConsumer
Parameters:
epolseq - the EntityPolySeq record for one amino acid

newPdbxPolySeqScheme

public void newPdbxPolySeqScheme(PdbxPolySeqScheme ppss)
Specified by:
newPdbxPolySeqScheme in interface MMcifConsumer

newPdbxNonPolyScheme

public void newPdbxNonPolyScheme(PdbxNonPolyScheme ppss)
Specified by:
newPdbxNonPolyScheme in interface MMcifConsumer

newPdbxEntityNonPoly

public void newPdbxEntityNonPoly(PdbxEntityNonPoly pen)
Specified by:
newPdbxEntityNonPoly in interface MMcifConsumer

newChemComp

public void newChemComp(ChemComp c)
Specified by:
newChemComp in interface MMcifConsumer

newGenericData

public void newGenericData(String category,
                           List<String> loopFields,
                           List<String> lineData)
Description copied from interface: MMcifConsumer
This method is called if no particular handler for the provided cif category has been implemented so far.

Specified by:
newGenericData in interface MMcifConsumer
Parameters:
category - The category that is being processed.
loopFields - the fields of this category.
lineData - the data that is being provided.

getFileParsingParameters

public FileParsingParameters getFileParsingParameters()
Specified by:
getFileParsingParameters in interface MMcifConsumer

setFileParsingParameters

public void setFileParsingParameters(FileParsingParameters params)
Specified by:
setFileParsingParameters in interface MMcifConsumer

newChemCompDescriptor

public void newChemCompDescriptor(ChemCompDescriptor ccd)
Specified by:
newChemCompDescriptor in interface MMcifConsumer