gov.usda.gdpc.panzea
Class PanzeaDBConnection

java.lang.Object
  extended bygov.usda.gdpc.AbstractDBConnection
      extended bygov.usda.gdpc.database.AbstractJDBCConnection
          extended bygov.usda.gdpc.panzea.PanzeaDBConnection
All Implemented Interfaces:
DBConnection
Direct Known Subclasses:
GrameneConnection

public class PanzeaDBConnection
extends AbstractJDBCConnection

Author:
terryc

Field Summary
 
Fields inherited from class gov.usda.gdpc.database.AbstractJDBCConnection
myConnection, myDriver, myPassword, myUID, myURL
 
Fields inherited from class gov.usda.gdpc.AbstractDBConnection
myDataSource, myDescription
 
Constructor Summary
PanzeaDBConnection()
           
PanzeaDBConnection(java.lang.String dataSource, java.lang.String description, java.lang.String driver, java.lang.String url, java.lang.String uid, char[] passwd)
          PanzeaDBConnection Constructor.
PanzeaDBConnection(java.lang.String dataSource, java.lang.String description, java.lang.String driver, java.lang.String url, java.lang.String uid, java.lang.String passwd)
          PanzeaDBConnection Constructor.
 
Method Summary
 DistinctPropertyValues getDistinctProperties(java.util.List properties)
          Returns list(s) of distinct property values for the given properties.
 EnvironmentExperimentGroup getEnvironmentExperimentGroup(EnvironmentExperimentFilter filter)
          Gets an environment experiment group based on the given environment experiment filter.
 GenotypeExperimentGroup getGenotypeExperimentGroup(GenotypeExperimentFilter filter)
          Gets a genotype experiment group based on the given genotype experiment filter.
 GenericTable getGenotypeGenericTable(GenotypeExperimentGroup experimentGroup, TaxonGroup taxonGroup)
          Gets the genotypes for all combinations of genotype experiments and taxa defined by the respective groups.
 GenotypeGroup getGenotypeGroup(GenotypeExperimentGroup experimentGroup, TaxonGroup taxonGroup)
          Gets the genotypes for all combinations of genotype experiments and taxa defined by the respective groups.
 LocalityGroup getLocalityGroup(LocalityFilter filter)
          Gets a locality group based on the given locality filter.
 LocusGroup getLocusGroup(LocusFilter filter)
          Gets a locus group based on the given locus filter.
 PhenotypeGroup getPhenotypeGroup(EnvironmentExperimentGroup experimentGroup, TaxonGroup taxonGroup, PhenotypeOntologyGroup ontologyGroup)
          Gets the phenotypes for all combinations of environment experiments, taxa, and phenotype ontologys defined by the respective groups.
 PhenotypeOntologyGroup getPhenotypeOntologyGroup(PhenotypeOntologyFilter filter)
          Get a phenotype ontology group based on the given pheotype ontology filter.
 PhenotypeOntologyGroup getPhenotypeOntologyGroupFromDB(PhenotypeOntologyFilter filter)
           
 TaxonGroup getTaxonGroup(TaxonFilter filter)
          Gets a taxon group based on the given taxon filter.
 
Methods inherited from class gov.usda.gdpc.database.AbstractJDBCConnection
close, equals, executeQuery, executeQueryNoScroll, getDriver, getInString, getInString, getInStringWithQuotes, getMultiInStringWithQuotes, getUID, getURL, isClosed, makeConnection
 
Methods inherited from class gov.usda.gdpc.AbstractDBConnection
getDataSource, getDescription, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.usda.gdpc.DBConnection
getDataSource, getDescription
 

Constructor Detail

PanzeaDBConnection

public PanzeaDBConnection(java.lang.String dataSource,
                          java.lang.String description,
                          java.lang.String driver,
                          java.lang.String url,
                          java.lang.String uid,
                          java.lang.String passwd)
PanzeaDBConnection Constructor.

Parameters:
dataSource - the data source of this connection
description - description of the connection
driver - the jdbc driver
url - a database url of the form jdbc:subprotocol:subname
uid - the database user on whose behalf the connection is being made
passwd - the user's password

PanzeaDBConnection

public PanzeaDBConnection(java.lang.String dataSource,
                          java.lang.String description,
                          java.lang.String driver,
                          java.lang.String url,
                          java.lang.String uid,
                          char[] passwd)
PanzeaDBConnection Constructor.

Parameters:
dataSource - the data source of this connection
description - description of the connection
driver - the jdbc driver
url - a database url of the form jdbc:subprotocol:subname
uid - the database user on whose behalf the connection is being made
passwd - the user's password

PanzeaDBConnection

public PanzeaDBConnection()
Method Detail

getEnvironmentExperimentGroup

public EnvironmentExperimentGroup getEnvironmentExperimentGroup(EnvironmentExperimentFilter filter)
Gets an environment experiment group based on the given environment experiment filter.

Specified by:
getEnvironmentExperimentGroup in interface DBConnection
Overrides:
getEnvironmentExperimentGroup in class AbstractDBConnection
Parameters:
filter - filter containing criteria.
Returns:
the environment experiment group

getGenotypeExperimentGroup

public GenotypeExperimentGroup getGenotypeExperimentGroup(GenotypeExperimentFilter filter)
Gets a genotype experiment group based on the given genotype experiment filter.

Specified by:
getGenotypeExperimentGroup in interface DBConnection
Overrides:
getGenotypeExperimentGroup in class AbstractDBConnection
Parameters:
filter - filter containing criteria.
Returns:
the genotype experiment group

getPhenotypeGroup

public PhenotypeGroup getPhenotypeGroup(EnvironmentExperimentGroup experimentGroup,
                                        TaxonGroup taxonGroup,
                                        PhenotypeOntologyGroup ontologyGroup)
Gets the phenotypes for all combinations of environment experiments, taxa, and phenotype ontologys defined by the respective groups.

Specified by:
getPhenotypeGroup in interface DBConnection
Overrides:
getPhenotypeGroup in class AbstractDBConnection
Parameters:
experimentGroup - environment experiment group
taxonGroup - taxon group
ontologyGroup - phenotype ontology group
Returns:
phenotype group

getLocusGroup

public LocusGroup getLocusGroup(LocusFilter filter)
Gets a locus group based on the given locus filter.

Specified by:
getLocusGroup in interface DBConnection
Overrides:
getLocusGroup in class AbstractDBConnection
Parameters:
filter - filter containing criteria to build locus group.
Returns:
the locus group

getLocalityGroup

public LocalityGroup getLocalityGroup(LocalityFilter filter)
Gets a locality group based on the given locality filter.

Specified by:
getLocalityGroup in interface DBConnection
Overrides:
getLocalityGroup in class AbstractDBConnection
Parameters:
filter - filter containing criteria.
Returns:
the locality group

getTaxonGroup

public TaxonGroup getTaxonGroup(TaxonFilter filter)
Gets a taxon group based on the given taxon filter.

Specified by:
getTaxonGroup in interface DBConnection
Overrides:
getTaxonGroup in class AbstractDBConnection
Parameters:
filter - filter containing criteria.
Returns:
the taxon group

getPhenotypeOntologyGroup

public PhenotypeOntologyGroup getPhenotypeOntologyGroup(PhenotypeOntologyFilter filter)
Get a phenotype ontology group based on the given pheotype ontology filter.

Specified by:
getPhenotypeOntologyGroup in interface DBConnection
Overrides:
getPhenotypeOntologyGroup in class AbstractDBConnection
Parameters:
filter - phenotype ontology filter
Returns:
phenotype ontology group

getPhenotypeOntologyGroupFromDB

public PhenotypeOntologyGroup getPhenotypeOntologyGroupFromDB(PhenotypeOntologyFilter filter)

getDistinctProperties

public DistinctPropertyValues getDistinctProperties(java.util.List properties)
Returns list(s) of distinct property values for the given properties. The list(s) are values retrieved from this database connection. If null returned, this connection does not support the properties or the values could not be retrieved.

Specified by:
getDistinctProperties in interface DBConnection
Overrides:
getDistinctProperties in class AbstractDBConnection
Parameters:
properties - list of properties
Returns:
list(s) of distinct property values

getGenotypeGroup

public GenotypeGroup getGenotypeGroup(GenotypeExperimentGroup experimentGroup,
                                      TaxonGroup taxonGroup)
Gets the genotypes for all combinations of genotype experiments and taxa defined by the respective groups.

Specified by:
getGenotypeGroup in interface DBConnection
Overrides:
getGenotypeGroup in class AbstractDBConnection
Parameters:
experimentGroup - genotype experiment group
taxonGroup - taxon group
Returns:
genotype group

getGenotypeGenericTable

public GenericTable getGenotypeGenericTable(GenotypeExperimentGroup experimentGroup,
                                            TaxonGroup taxonGroup)
Gets the genotypes for all combinations of genotype experiments and taxa defined by the respective groups. Since the return type of this method does not include experiment or taxon information, neither input parameter can be empty or null. This method returns an empty table in that event.

Specified by:
getGenotypeGenericTable in interface DBConnection
Overrides:
getGenotypeGenericTable in class AbstractDBConnection
Parameters:
experimentGroup - genotype experiment group
taxonGroup - taxon group
Returns:
generic table