owltools.gaf.godb
Class DatabaseDumper

java.lang.Object
  extended by owltools.gaf.godb.Dumper
      extended by owltools.gaf.godb.DatabaseDumper
Direct Known Subclasses:
GoMySQLDatabaseDumper

public abstract class DatabaseDumper
extends Dumper

Generates a relational database dump. Currently there is one subclass, for the GO MySQL "lead" database; in principle this is easily extended, e.g. for Chado Not intended for incremental updates; bulk loading only

Author:
cjm

Field Summary
protected  Set<String> incrementallyLoadedTables
           
protected  boolean isStrict
           
protected  Map<String,Integer> objLastIdMap
           
protected  Map<String,Map<Object,Integer>> tableObjIdMap
           
 
Fields inherited from class owltools.gaf.godb.Dumper
gafdocs, graph, problems, targetDirectory
 
Constructor Summary
DatabaseDumper()
           
 
Method Summary
protected  void cleanup()
           
protected  void closeAllPrintStreams()
           
protected  void closePrintStream(String t)
           
protected  void dumpRow(PrintStream termStream, Object... vals)
           
protected  Integer getId(String table, Object obj)
           
protected  Integer getId(String table, Object obj, boolean isForceExists)
           
protected  PrintStream getPrintStream(String t)
           
protected  PrintStream getPrintStream(String t, boolean isAppend)
           
protected  void showStats()
           
 
Methods inherited from class owltools.gaf.godb.Dumper
addGafDocument, addProblem, dump, getGafdocs, getTargetDirectory, reportProblems, setGafdocs, setTargetDirectory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tableObjIdMap

protected Map<String,Map<Object,Integer>> tableObjIdMap

objLastIdMap

protected Map<String,Integer> objLastIdMap

incrementallyLoadedTables

protected Set<String> incrementallyLoadedTables

isStrict

protected boolean isStrict
Constructor Detail

DatabaseDumper

public DatabaseDumper()
Method Detail

cleanup

protected void cleanup()

dumpRow

protected void dumpRow(PrintStream termStream,
                       Object... vals)

getId

protected Integer getId(String table,
                        Object obj)
                 throws ReferentialIntegrityException
Throws:
ReferentialIntegrityException

getId

protected Integer getId(String table,
                        Object obj,
                        boolean isForceExists)
                 throws ReferentialIntegrityException
Throws:
ReferentialIntegrityException

getPrintStream

protected PrintStream getPrintStream(String t)
                              throws IOException
Throws:
IOException

getPrintStream

protected PrintStream getPrintStream(String t,
                                     boolean isAppend)
                              throws IOException
Throws:
IOException

closeAllPrintStreams

protected void closeAllPrintStreams()

closePrintStream

protected void closePrintStream(String t)

showStats

protected void showStats()


Copyright © 2010-2014. All Rights Reserved.