gov.nih.nci.caarray.services.vocab
Class VocabManagerDB

java.lang.Object
  extended by gov.nih.nci.caarray.services.util.db.ManagerDB
      extended by gov.nih.nci.caarray.services.vocab.VocabManagerDB

public class VocabManagerDB
extends ManagerDB

Author:
dickersc

Field Summary
 
Fields inherited from class gov.nih.nci.caarray.services.util.db.ManagerDB
CASCADE_LINK, CASCADE_NONE, CASCADE_OBJECT, ID_UNSET
 
Constructor Summary
VocabManagerDB()
           
 
Method Summary
 long addOntology(OntologyEntry entry)
           
 long addOntology(OntologyEntry entry, long parentOntologyEntryId)
           
 void addOrSyncAnnotations(Describable describable)
          Adds or synchronizes the vocabularies that represent the annotations of the specified Describable object.
 void addOrUpdateActionProtocolTypeMap(ActionProtocolTypeMap map)
          Adds or updates the association object between an action represented by an OntologyEntry and one or more protocol types represented by OntologyEntry's.
 int countOntologies(VocabSearchCriteria searchCriteria)
           
 boolean deleteOntology(long vocabId)
           
 ActionProtocolTypeMap[] getActionProtocolTypeMaps()
          Retrieves all available ActionProtocolTypeMap's.
 Database[] getDatabases()
           
 Database[] getDatabases(java.lang.String category, java.lang.Boolean userDefined)
           
 OntologyEntry[] getOntologies(long parentVocabId)
           
 OntologyEntry[] getOntologies(VocabSearchCriteria criteria)
           
 OntologyEntry getOntology(long id)
           
 OntologyEntry getOntology(java.lang.String category, java.lang.String value)
           
 OntologyEntry getOntologyEntryOrNull(java.lang.String category, java.lang.String value)
          Returns the requested OntologyEntry or null if not found.
 OntologyEntry[] getProtocolTypes(long actionId)
          Retrieves the list of protocol types that are mapped to the specified action.
 void syncExperimentDesignTypes(ExperimentDesign design)
          Add or synchronize the vocabularies that represent the annotations of the specified Describable object.
 void updateOntology(OntologyEntry entry)
           
 
Methods inherited from class gov.nih.nci.caarray.services.util.db.ManagerDB
clearCache, close, countObjects, countObjects, deleteByQuery, deleteMtoNRelation, deleteObject, deleteObject, deleteObject, deleteObjectByQuery, exists, getIdentifiable, getObject, getObject, getObject, getObject, getObject, getObject, getObjectIterator, getObjectIterator, getObjects, getObjects, getObjects, getPersistenceBroker, getSqlInLimit, insertMtoNRelation, insertMtoNRelation, insertObject, insertObject, link, link, removeFromCache, retrieveReference, retrieveReferences, setCascadeDelete, setCascadeRetrieve, setCascadeStore, storeObject, storeObject, unlink, unlink, updateObject, updateObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VocabManagerDB

public VocabManagerDB()
Method Detail

getOntology

public OntologyEntry getOntology(long id)
                          throws java.lang.Exception
Parameters:
category -
Returns:
Throws:
java.lang.Exception

getOntologies

public OntologyEntry[] getOntologies(VocabSearchCriteria criteria)
                              throws java.lang.Exception
Parameters:
ojbCriteria -
Returns:
Throws:
java.lang.Exception

getOntology

public OntologyEntry getOntology(java.lang.String category,
                                 java.lang.String value)
                          throws java.lang.Exception
Returns:
Throws:
java.lang.Exception

getOntologyEntryOrNull

public OntologyEntry getOntologyEntryOrNull(java.lang.String category,
                                            java.lang.String value)
                                     throws java.lang.Exception
Returns the requested OntologyEntry or null if not found.

Parameters:
category - category to find
value - value to find
Throws:
java.lang.Exception

getOntologies

public OntologyEntry[] getOntologies(long parentVocabId)
                              throws java.lang.Exception
Returns:
Throws:
java.lang.Exception

addOntology

public long addOntology(OntologyEntry entry)
                 throws java.lang.Exception
Parameters:
ontologyEntry -
Returns:
Throws:
java.lang.Exception

addOntology

public long addOntology(OntologyEntry entry,
                        long parentOntologyEntryId)
                 throws java.lang.Exception
Parameters:
ontologyEntry -
Returns:
Throws:
java.lang.Exception

deleteOntology

public boolean deleteOntology(long vocabId)
                       throws java.lang.Exception
Parameters:
vocabId -
Throws:
java.lang.Exception

updateOntology

public void updateOntology(OntologyEntry entry)
                    throws java.lang.Exception
Parameters:
entry -
Throws:
java.lang.Exception

addOrSyncAnnotations

public void addOrSyncAnnotations(Describable describable)
                          throws java.lang.Exception
Adds or synchronizes the vocabularies that represent the annotations of the specified Describable object. If a vocabulary already exists, this method attempts to synchronize it with the one from the persistence store. If it doesn't exist, it is inserted it contains the necessary data.

Parameters:
describable -
Throws:
InsertObjectException
java.lang.Exception

syncExperimentDesignTypes

public void syncExperimentDesignTypes(ExperimentDesign design)
                               throws java.lang.Exception
Add or synchronize the vocabularies that represent the annotations of the specified Describable object. If a vocabulary already exists, this method attempts to synchronize it with the one from the persistence store. If it doesn't exist, it is inserted it contains the necessary data.

Parameters:
describable -
Throws:
InsertObjectException
java.lang.Exception

countOntologies

public int countOntologies(VocabSearchCriteria searchCriteria)
                    throws java.lang.Exception
Throws:
java.lang.Exception

getProtocolTypes

public OntologyEntry[] getProtocolTypes(long actionId)
                                 throws java.lang.Exception
Retrieves the list of protocol types that are mapped to the specified action.

Parameters:
actionId -
Returns:
Throws:
java.lang.Exception

addOrUpdateActionProtocolTypeMap

public void addOrUpdateActionProtocolTypeMap(ActionProtocolTypeMap map)
                                      throws java.lang.Exception
Adds or updates the association object between an action represented by an OntologyEntry and one or more protocol types represented by OntologyEntry's.

Parameters:
map - - The association object describing which action maps to which protocol types.
Throws:
java.lang.Exception

getActionProtocolTypeMaps

public ActionProtocolTypeMap[] getActionProtocolTypeMaps()
                                                  throws java.lang.Exception
Retrieves all available ActionProtocolTypeMap's.

Returns:
Throws:
java.lang.Exception

getDatabases

public Database[] getDatabases(java.lang.String category,
                               java.lang.Boolean userDefined)
                        throws java.lang.Exception
Throws:
java.lang.Exception

getDatabases

public Database[] getDatabases()
                        throws java.lang.Exception
Throws:
java.lang.Exception