uk.ac.ebi.intact.model
Class CvDagObject

java.lang.Object
  |
  +--uk.ac.ebi.intact.model.IntactObjectImpl
        |
        +--uk.ac.ebi.intact.model.BasicObjectImpl
              |
              +--uk.ac.ebi.intact.model.AnnotatedObjectImpl
                    |
                    +--uk.ac.ebi.intact.model.CvObject
                          |
                          +--uk.ac.ebi.intact.model.CvDagObject
All Implemented Interfaces:
AnnotatedObject, BasicObject, IntactObject, java.io.Serializable
Direct Known Subclasses:
CvGoNode, CvIdentification, CvInteraction, CvInteractionType

public abstract class CvDagObject
extends CvObject

Controlled vocabulary class for CVs which are organised in a Directed Acyclic Graph (DAG). Each node many have multiple parents and multiple children.

Version:
$Id: CvDagObject.java,v 1.11 2004/01/04 19:45:29 hhe Exp $
Author:
hhe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class uk.ac.ebi.intact.model.AnnotatedObjectImpl
annotations, curator, curatorAc, fullName, references, shortLabel, xrefs
 
Fields inherited from class uk.ac.ebi.intact.model.IntactObjectImpl
ac, NEW_LINE
 
Constructor Summary
protected CvDagObject()
          no-arg constructor which will hopefully be removed later...
  CvDagObject(Institution owner, java.lang.String shortLabel)
          Creates a valid CvDagObject instance.
 
Method Summary
 void addChild(CvDagObject cvDagObject)
           
 void addParent(CvDagObject cvDagObject)
           
 java.util.Collection ancestors()
          TODO comments
 java.util.Collection getChildren()
           
 java.util.Collection getParents()
           
 CvDagObject getRoot()
          TODO coments
 void removeChild(CvDagObject cvDagObject)
           
 void removeParent(CvDagObject cvDagObject)
           
 java.lang.String toGoDag(int currentDepth, CvDagObject aParent, java.lang.String goidDatabase)
          TODO comments
 java.lang.String toGoDag(java.lang.String goidDatabase)
          Create the GO flat file representation of the current object and all its descendants.
 
Methods inherited from class uk.ac.ebi.intact.model.AnnotatedObjectImpl
addAlias, addAnnotation, addReference, addXref, equals, getAliases, getAnnotations, getCurator, getCuratorAc, getFullName, getReferences, getShortLabel, getXrefs, hashCode, removeAlias, removeAnnotation, removeReference, removeXref, setAliases, setAnnotation, setCurator, setCuratorAc, setFullName, setReferences, setShortLabel, setXrefs, toString, update, updateUniqueAnnotation
 
Methods inherited from class uk.ac.ebi.intact.model.BasicObjectImpl
addEvidence, getEvidences, getOwner, getOwnerAc, removeEvidence, setEvidences, setOwner, setOwnerAc
 
Methods inherited from class uk.ac.ebi.intact.model.IntactObjectImpl
getAc, getCreated, getUpdated, setAc, setCreated, setUpdated
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface uk.ac.ebi.intact.model.BasicObject
addEvidence, getEvidences, getOwner, getOwnerAc, removeEvidence, setEvidences, setOwner, setOwnerAc
 
Methods inherited from interface uk.ac.ebi.intact.model.IntactObject
getAc, getCreated, getUpdated, setAc, setCreated, setUpdated
 

Constructor Detail

CvDagObject

protected CvDagObject()
no-arg constructor which will hopefully be removed later...


CvDagObject

public CvDagObject(Institution owner,
                   java.lang.String shortLabel)
Creates a valid CvDagObject instance. Requires at least a shortLabel and an owner to be specified.

Parameters:
shortLabel - The memorable label to identify this CvDagObject
owner - The Institution which owns this CvDagObject
Throws:
java.lang.NullPointerException - thrown if either parameters are not specified
Method Detail

getChildren

public java.util.Collection getChildren()

addChild

public void addChild(CvDagObject cvDagObject)

removeChild

public void removeChild(CvDagObject cvDagObject)

getParents

public java.util.Collection getParents()

addParent

public void addParent(CvDagObject cvDagObject)

removeParent

public void removeParent(CvDagObject cvDagObject)

ancestors

public java.util.Collection ancestors()
TODO comments

Returns:
All ancestors of the current object. Each node is listed only once.

getRoot

public CvDagObject getRoot()
TODO coments

Returns:
the root node of the current term

toGoDag

public java.lang.String toGoDag(int currentDepth,
                                CvDagObject aParent,
                                java.lang.String goidDatabase)
TODO comments

Parameters:
currentDepth - The current depth in the DAG. Translated into leading blanks.
aParent - The current parents. All parents exept aParent are listed in the DAG line as additional parents.
goidDatabase - The database xref from which to generate the goid
Returns:
a single string containing the GO DAG flatfile representation of the current object and all its decendents.

toGoDag

public java.lang.String toGoDag(java.lang.String goidDatabase)
Create the GO flat file representation of the current object and all its descendants.

Returns:
a single string containing the GO DAG flatfile representation of the current object and all its descendants.


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