gov.usda.gdpc
Interface DBConnection

All Known Implementing Classes:
AbstractDBConnection, AbstractJDBCConnection, DBConnectionProxy

public interface DBConnection

Defines the low level interaction with a database.

Author:
terryc

Method Summary
 void close()
          This method is used to tell the connection to close or generally release any resources and shutdown.
 java.lang.String getDataSource()
          Returns the data source of this connection.
 java.lang.String getDescription()
          Returns a description of this connection.
 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.
 TaxonGroup getTaxonGroup(TaxonFilter filter)
          Gets a taxon group based on the given taxon filter.
 

Method Detail

getDataSource

public java.lang.String getDataSource()
Returns the data source of this connection. Typically, a URI.

Returns:
data source

getDescription

public java.lang.String getDescription()
Returns a description of this connection.

Returns:
description

getLocusGroup

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

Parameters:
filter - filter containing criteria to build locus group.
Returns:
the locus group

getGenotypeExperimentGroup

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

Parameters:
filter - filter containing criteria.
Returns:
the genotype experiment group

getTaxonGroup

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

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.

Parameters:
filter - phenotype ontology filter
Returns:
phenotype ontology 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.

Parameters:
experimentGroup - environment experiment group
taxonGroup - taxon group
ontologyGroup - phenotype ontology group
Returns:
phenotype group

getEnvironmentExperimentGroup

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

Parameters:
filter - filter containing criteria.
Returns:
the environment experiment group

getLocalityGroup

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

Parameters:
filter - filter containing criteria.
Returns:
the locality group

getGenotypeGroup

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

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.

Parameters:
experimentGroup - genotype experiment group
taxonGroup - taxon group
Returns:
generic table

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.

Parameters:
properties - list of properties
Returns:
list(s) of distinct property values

close

public void close()
This method is used to tell the connection to close or generally release any resources and shutdown. The connection may choice to not support this method if end users are not allowed to close the connection.