uk.ac.ebi.intact.application.goDensity.business.dag
Class CvGoDag

java.lang.Object
  |
  +--uk.ac.ebi.intact.application.goDensity.business.dag.CvGoDag

public class CvGoDag
extends java.lang.Object

CvGoDag represents a GO graph within IntAct.
Furthermore, the method todb():void can be used, to store the GO-graph in an external table, which can be used for fast & direct access (FastGoDag.java). Before you can use this class, GO has to be imported (InsertGoFromFlatfile.java)

Version:
$Id: CvGoDag.java,v 1.4 2004/01/31 11:37:16 skerrien Exp $
Author:
Markus Brosch (markus @ brosch.cc)

Constructor Summary
CvGoDag()
          Constructor retrieve the root element of GO hierarchy (of typ CvGoNode) from the database.
 
Method Summary
 java.util.Collection getAllChilds(java.lang.String goId)
           
 java.util.Collection getChilds(java.lang.String goId)
           
 CvGoNode getCvGoNode(java.lang.String goId)
          get a single CvGoNode by a GoId String
 java.util.Collection getInteractors(java.lang.String goId)
           
 void toDb()
          stores the GO dag to a external table, which only stores the go hierarchy, which is used by FastGoDag
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CvGoDag

public CvGoDag()
        throws DatabaseEmptyException,
               IntactException,
               java.sql.SQLException,
               KeyNotFoundException
Constructor retrieve the root element of GO hierarchy (of typ CvGoNode) from the database.

Throws:
DatabaseEmptyException - if no go-dag-file is jet imported into db.
IntactException
java.sql.SQLException
KeyNotFoundException
Method Detail

toDb

public void toDb()
stores the GO dag to a external table, which only stores the go hierarchy, which is used by FastGoDag


getCvGoNode

public CvGoNode getCvGoNode(java.lang.String goId)
                     throws KeyNotFoundException
get a single CvGoNode by a GoId String

Parameters:
goId -
Returns:
a CvGoNode for the related GoId
Throws:
KeyNotFoundException - if no CvGoNode is present for this GoId request Could happen, if e.g. only a part of the go-dag.ontology is imported ...

getChilds

public java.util.Collection getChilds(java.lang.String goId)
                               throws KeyNotFoundException
Parameters:
goId - for which the children want to be known
Returns:
children of an specific GoId are returned as a Collection of CvGoNodes.
Throws:
KeyNotFoundException - if goId doesn't exist as an CvGoNode Object

getAllChilds

public java.util.Collection getAllChilds(java.lang.String goId)
                                  throws KeyNotFoundException
Parameters:
goId - for which all children and subchildren want to be known
Returns:
ALL children of the goId - but be aware: only the goId Strings of the children (primaryId) will be returned as a Collection
Throws:
KeyNotFoundException - if goId doesn't exist

getInteractors

public java.util.Collection getInteractors(java.lang.String goId)
Parameters:
goId - for which all associated Interactors want to be known
Returns:
a Collection of Interactors which are associated with this node

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk