phenote.dataadapter
Class OntologyDataAdapter2

java.lang.Object
  extended by phenote.dataadapter.OntologyDataAdapter2

public class OntologyDataAdapter2
extends java.lang.Object

is this really a data adapter? - OntologyLoader? this isnt a data adapter it doesnt load & commit character data - just loads ontologies. rename OntologyLoader for now can stay in dataadapter package this is specifically a OboFileLoader - other kinds of ontology loading may com along i'm working on refactoring this to work with the new terminology definitions


Method Summary
 boolean checkForLocalFileExists(phenote.config.xml.OntologyFileDocument.OntologyFile ontology)
           
 boolean checkForLocalFileExists(java.lang.String filename)
           
 boolean checkForUpdate(phenote.config.xml.OntologyFileDocument.OntologyFile ontologyFile)
           
 boolean copyOntologyToDotPhenote(java.net.URL localUrl, java.lang.String filename)
           
 void downloadUpdate(java.lang.String ontology)
           
static OntologyDataAdapter2 getInstance()
          synchronized so cant reload an ontology while ontologies are being initialized getInstance calls initOntologies - in other words you have to call getInstance to initialize the ontologies
 java.net.URL getLocalFile(java.lang.String handle)
           
 long getOboDate(java.net.URL oboUrl)
           
static void initialize()
          just calls getInstance - but more intuitive for initialization
 void initOntologies()
           
 void initOntologies(boolean updateAll)
           
 void reloadOntologies()
          The ontology has been determined to be out of date (by quartz) and thus directed to reload itself from its file - in other words there is a new obo file to load in place of old one
static void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static OntologyDataAdapter2 getInstance()
synchronized so cant reload an ontology while ontologies are being initialized getInstance calls initOntologies - in other words you have to call getInstance to initialize the ontologies


reset

public static void reset()

initialize

public static void initialize()
just calls getInstance - but more intuitive for initialization


initOntologies

public void initOntologies()

initOntologies

public void initOntologies(boolean updateAll)

getOboDate

public long getOboDate(java.net.URL oboUrl)
                throws OntologyException
Throws:
OntologyException

reloadOntologies

public void reloadOntologies()
                      throws OntologyException
The ontology has been determined to be out of date (by quartz) and thus directed to reload itself from its file - in other words there is a new obo file to load in place of old one

Throws:
OntologyException

checkForUpdate

public boolean checkForUpdate(phenote.config.xml.OntologyFileDocument.OntologyFile ontologyFile)
                       throws OntologyException
Returns:
A flag indicating if the given ontology has an update available
Throws:
OntologyException

downloadUpdate

public void downloadUpdate(java.lang.String ontology)
                    throws OntologyException
Throws:
OntologyException

getLocalFile

public java.net.URL getLocalFile(java.lang.String handle)
                          throws OntologyException
Throws:
OntologyException

checkForLocalFileExists

public boolean checkForLocalFileExists(phenote.config.xml.OntologyFileDocument.OntologyFile ontology)

checkForLocalFileExists

public boolean checkForLocalFileExists(java.lang.String filename)

copyOntologyToDotPhenote

public boolean copyOntologyToDotPhenote(java.net.URL localUrl,
                                        java.lang.String filename)