phenote.datamodel
Class Ontology

java.lang.Object
  extended by phenote.datamodel.Ontology

public class Ontology
extends java.lang.Object

Ontology represents at this point the contents of a single obo file (which can be more than one ontology) an ontology wraps an obo edit OBOSession - at this point there is one OBOSession per obo file - that may change in the future


Constructor Summary
Ontology(java.util.Collection<org.obo.datamodel.Namespace> spaces, OntologyConfig oc, org.obo.datamodel.OBOSession os)
          is it funny to pass in a config object to datamodel - given that config dictates the model i actually think its ok
Ontology(java.lang.String name)
           
 
Method Summary
 java.lang.String getName()
           
 org.obo.datamodel.OBOSession getOboSession()
           
 OntologyConfig getOntologyConfig()
           
 java.util.Date getOntologyDate()
           
 java.util.List<org.obo.datamodel.Instance> getSortedInstances(java.util.Collection instances)
           
 java.util.Collection<org.obo.datamodel.OBOObject> getSortedObsoleteTerms()
           
 java.util.List<org.obo.datamodel.OBOObject> getSortedRelations()
          gets relations, OBOProperties as OBOObjects
 java.util.Collection<org.obo.datamodel.OBOObject> getSortedTerms()
          non obsolete terms - sorted
 java.lang.String getSource()
           
 org.obo.datamodel.OBOClass getTerm(java.lang.String id)
          throws TermNotFoundException if id is not found searches non-obsolete & obsoletes
 long getTimestamp()
           
 java.lang.String getVersion()
           
(package private)  boolean hasTerm(org.obo.datamodel.OBOClass term)
          Returns true if ontology holds term/oboClass
 void setHasInstances(boolean hasInst)
           
 void setOboSession(org.obo.datamodel.OBOSession os)
           
 void setSlim(java.lang.String slim)
          should be smarter about slims - currently has Ontology & obo session for each field that wants is using a slim of the same ontology - really should be one ontology & 1 obo session with multiple slims - and even gather all the slims in 1 pass - would need to query all ontology configs ahead of time to gather all slims being queried by phenote - no need to build slim data structure if not being used
 void setSource(java.lang.String s)
          for obo files this is the filename
 void setTimestamp(long t)
          might move this elsewhere - subclass? data adap specific wrapper?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ontology

public Ontology(java.lang.String name)

Ontology

public Ontology(java.util.Collection<org.obo.datamodel.Namespace> spaces,
                OntologyConfig oc,
                org.obo.datamodel.OBOSession os)
is it funny to pass in a config object to datamodel - given that config dictates the model i actually think its ok

Method Detail

setHasInstances

public void setHasInstances(boolean hasInst)

setOboSession

public void setOboSession(org.obo.datamodel.OBOSession os)

getOntologyDate

public java.util.Date getOntologyDate()

getVersion

public java.lang.String getVersion()

getName

public java.lang.String getName()

getTerm

public org.obo.datamodel.OBOClass getTerm(java.lang.String id)
                                   throws TermNotFoundException
throws TermNotFoundException if id is not found searches non-obsolete & obsoletes

Throws:
TermNotFoundException

hasTerm

boolean hasTerm(org.obo.datamodel.OBOClass term)
Returns true if ontology holds term/oboClass


getSortedRelations

public java.util.List<org.obo.datamodel.OBOObject> getSortedRelations()
gets relations, OBOProperties as OBOObjects


getSortedTerms

public java.util.Collection<org.obo.datamodel.OBOObject> getSortedTerms()
non obsolete terms - sorted


getSortedObsoleteTerms

public java.util.Collection<org.obo.datamodel.OBOObject> getSortedObsoleteTerms()

getOboSession

public org.obo.datamodel.OBOSession getOboSession()

getSortedInstances

public java.util.List<org.obo.datamodel.Instance> getSortedInstances(java.util.Collection instances)

setTimestamp

public void setTimestamp(long t)
might move this elsewhere - subclass? data adap specific wrapper?


getTimestamp

public long getTimestamp()

setSource

public void setSource(java.lang.String s)
for obo files this is the filename


getSource

public java.lang.String getSource()

setSlim

public void setSlim(java.lang.String slim)
should be smarter about slims - currently has Ontology & obo session for each field that wants is using a slim of the same ontology - really should be one ontology & 1 obo session with multiple slims - and even gather all the slims in 1 pass - would need to query all ontology configs ahead of time to gather all slims being queried by phenote - no need to build slim data structure if not being used


getOntologyConfig

public OntologyConfig getOntologyConfig()