gov.usda.gdpc
Class AbstractDBConnection

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

public abstract class AbstractDBConnection
extends java.lang.Object
implements DBConnection

This class provides a skeletal implementation of the DBConnection interface, to minimize the effort required to implement this interface.

To implement a database connection, the programmer needs to extend this class and provide implementations for the following methods defined in the DBConnection interface:



Author:
terryc

Field Summary
protected  java.lang.String myDataSource
           
protected  java.lang.String myDescription
           
 
Constructor Summary
AbstractDBConnection(java.lang.String dataSource, java.lang.String description)
          AbstractDBConnection Constructor.
 
Method Summary
 void close()
          This method is unsupported by this class.
 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)
          This method is unsupported by this class.
 EnvironmentExperimentGroup getEnvironmentExperimentGroup(EnvironmentExperimentFilter filter)
          This method is unsupported by this class.
 GenotypeExperimentGroup getGenotypeExperimentGroup(GenotypeExperimentFilter filter)
          This method is unsupported by this class.
 GenericTable getGenotypeGenericTable(GenotypeExperimentGroup experimentGroup, TaxonGroup taxonGroup)
          This method is unsupported by this class.
 GenotypeGroup getGenotypeGroup(GenotypeExperimentGroup experimentGroup, TaxonGroup taxonGroup)
          This method is unsupported by this class.
 LocalityGroup getLocalityGroup(LocalityFilter filter)
          This method is unsupported by this class.
 LocusGroup getLocusGroup(LocusFilter filter)
          This method is unsupported by this class.
 PhenotypeGroup getPhenotypeGroup(EnvironmentExperimentGroup experimentGroup, TaxonGroup taxonGroup, PhenotypeOntologyGroup ontologyGroup)
          This method is unsupported by this class.
 PhenotypeOntologyGroup getPhenotypeOntologyGroup(PhenotypeOntologyFilter filter)
          This method is unsupported by this class.
 TaxonGroup getTaxonGroup(TaxonFilter filter)
          This method is unsupported by this class.
 java.lang.String toString()
          Returns the String representation of this connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myDataSource

protected final java.lang.String myDataSource

myDescription

protected final java.lang.String myDescription
Constructor Detail

AbstractDBConnection

public AbstractDBConnection(java.lang.String dataSource,
                            java.lang.String description)
AbstractDBConnection Constructor.

Parameters:
dataSource - the data source of this connection
description - description of this connection
Method Detail

getDataSource

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

Specified by:
getDataSource in interface DBConnection
Returns:
data source

getDescription

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

Specified by:
getDescription in interface DBConnection
Returns:
description

getLocusGroup

public LocusGroup getLocusGroup(LocusFilter filter)
This method is unsupported by this class. It should be implemented by its subclasses.

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

getGenotypeExperimentGroup

public GenotypeExperimentGroup getGenotypeExperimentGroup(GenotypeExperimentFilter filter)
This method is unsupported by this class. It should be implemented by its subclasses.

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

getTaxonGroup

public TaxonGroup getTaxonGroup(TaxonFilter filter)
This method is unsupported by this class. It should be implemented by its subclasses.

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

getPhenotypeOntologyGroup

public PhenotypeOntologyGroup getPhenotypeOntologyGroup(PhenotypeOntologyFilter filter)
This method is unsupported by this class. It should be implemented by its subclasses.

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

getEnvironmentExperimentGroup

public EnvironmentExperimentGroup getEnvironmentExperimentGroup(EnvironmentExperimentFilter filter)
This method is unsupported by this class. It should be implemented by its subclasses.

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

getLocalityGroup

public LocalityGroup getLocalityGroup(LocalityFilter filter)
This method is unsupported by this class. It should be implemented by its subclasses.

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

getPhenotypeGroup

public PhenotypeGroup getPhenotypeGroup(EnvironmentExperimentGroup experimentGroup,
                                        TaxonGroup taxonGroup,
                                        PhenotypeOntologyGroup ontologyGroup)
This method is unsupported by this class. It should be implemented by its subclasses.

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

getDistinctProperties

public DistinctPropertyValues getDistinctProperties(java.util.List properties)
This method is unsupported by this class. It should be implemented by its subclasses.

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

toString

public java.lang.String toString()
Returns the String representation of this connection. More specifically, it returns the data source of this connection.

Returns:
uri

getGenotypeGroup

public GenotypeGroup getGenotypeGroup(GenotypeExperimentGroup experimentGroup,
                                      TaxonGroup taxonGroup)
This method is unsupported by this class. It should be implemented by its subclasses.

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

getGenotypeGenericTable

public GenericTable getGenotypeGenericTable(GenotypeExperimentGroup experimentGroup,
                                            TaxonGroup taxonGroup)
This method is unsupported by this class. It should be implemented by its subclasses.

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

close

public void close()
This method is unsupported by this class. It should be implemented by its subclasses.

Specified by:
close in interface DBConnection