edu.mssm.crover.webapps.dimlib.util
Class ImportXML

java.lang.Object
  |
  +--edu.mssm.crover.webapps.dimlib.util.ImportXML

public class ImportXML
extends java.lang.Object


Constructor Summary
ImportXML()
           
ImportXML(javax.jdo.PersistenceManager session_pm)
           
 
Method Summary
 void addAddedMutant(MutantProtein mp)
           
 void addAddedSNP(SNP snp)
           
 void addExistingMutant(java.lang.String id)
           
 void addExistingSNP(java.lang.String id)
           
 void addNewAc(AccessionCode ac)
           
 java.util.Collection getAddedMutants()
           
 java.util.Collection getAddedSNPs()
           
 java.util.Collection getExistingMutants()
           
 java.util.Collection getExistingSNPs()
           
 java.util.Vector getNewAcs()
           
 void importAcs(java.util.Vector acs, WildTypeProtein wtp, boolean wtp_exists)
          Updates accession codes for WildTypeProtein.
 void importMutants(java.util.Collection c)
          Submits MutantProteins to the database.
 void importProtein(WildTypeProtein wtp)
          Submits the WildTypeProtein to the database.
 void importSNP(SNP snp)
          Submit a single SNP to the database.
 void importSNPs(java.util.Collection c)
          Submits SNPs to the database.
static void main(java.lang.String[] args)
           
 java.util.Collection parseMutants(Protein protein, WildTypeProtein wtp)
          Parses the XML file for all information relating to MutantProteins from edu.mssm.crover.webapps.dimlib.parsers.xml.Protein.
 WildTypeProtein parseProtein(Protein protein, SubmitterInfo submitter)
          Parses the XML file for all WildTypeProtein information from edu.mssm.crover.webapps.dimlib.parsers.xml.Protein
 java.util.Collection parseSNPs(Protein protein, WildTypeProtein wtp)
          Parses any SNPs in the XML import file.
 void parseXML(java.io.File f)
          Unmarshals and parses the XML file containing the dimlib-submission, and imports the information into the database.
 boolean proteinExists()
           
 void setProteinExists(boolean new_prot)
           
 boolean validate(java.io.File f)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportXML

public ImportXML()

ImportXML

public ImportXML(javax.jdo.PersistenceManager session_pm)
Method Detail

parseXML

public void parseXML(java.io.File f)
              throws InvalidSubmissionException,
                     java.io.FileNotFoundException,
                     java.io.IOException
Unmarshals and parses the XML file containing the dimlib-submission, and imports the information into the database.

InvalidSubmissionException
java.io.FileNotFoundException
java.io.IOException

importProtein

public void importProtein(WildTypeProtein wtp)
Submits the WildTypeProtein to the database.

Parameters:
wtp - WildTypeProtein to be submitted

importAcs

public void importAcs(java.util.Vector acs,
                      WildTypeProtein wtp,
                      boolean wtp_exists)
Updates accession codes for WildTypeProtein.

Parameters:
acs - accession codes to be added
wtp - WildTypeProtein to be updated

importMutants

public void importMutants(java.util.Collection c)
Submits MutantProteins to the database. Any MutantProteins which already exist in the database are not resubmitted, and their IDs are noted.

Parameters:
c - Collection of MutantProteins to be imported

importSNPs

public void importSNPs(java.util.Collection c)
Submits SNPs to the database. Any SNPs which already exist in the database are not resubmitted, and their IDs are noted.

Parameters:
c - Collection of SNPs to be imported

importSNP

public void importSNP(SNP snp)
               throws InvalidSubmissionException
Submit a single SNP to the database.

Parameters:
snp - SNP to be submitted
InvalidSubmissionException

parseProtein

public WildTypeProtein parseProtein(Protein protein,
                                    SubmitterInfo submitter)
                             throws InvalidSubmissionException
Parses the XML file for all WildTypeProtein information from edu.mssm.crover.webapps.dimlib.parsers.xml.Protein

InvalidSubmissionException

parseMutants

public java.util.Collection parseMutants(Protein protein,
                                         WildTypeProtein wtp)
                                  throws InvalidSubmissionException
Parses the XML file for all information relating to MutantProteins from edu.mssm.crover.webapps.dimlib.parsers.xml.Protein.

InvalidSubmissionException

parseSNPs

public java.util.Collection parseSNPs(Protein protein,
                                      WildTypeProtein wtp)
                               throws InvalidSubmissionException
Parses any SNPs in the XML import file.

InvalidSubmissionException

validate

public boolean validate(java.io.File f)
                 throws java.io.FileNotFoundException,
                        java.io.IOException
java.io.FileNotFoundException
java.io.IOException

setProteinExists

public void setProteinExists(boolean new_prot)

proteinExists

public boolean proteinExists()

addNewAc

public void addNewAc(AccessionCode ac)

getNewAcs

public java.util.Vector getNewAcs()

getAddedMutants

public java.util.Collection getAddedMutants()

addAddedMutant

public void addAddedMutant(MutantProtein mp)

addExistingMutant

public void addExistingMutant(java.lang.String id)

getExistingMutants

public java.util.Collection getExistingMutants()

getAddedSNPs

public java.util.Collection getAddedSNPs()

addAddedSNP

public void addAddedSNP(SNP snp)

addExistingSNP

public void addExistingSNP(java.lang.String id)

getExistingSNPs

public java.util.Collection getExistingSNPs()

main

public static void main(java.lang.String[] args)


Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.