gov.usda.gdpc
Class AbstractGenotypeGroup

java.lang.Object
  extended bygov.usda.gdpc.AbstractGroup
      extended bygov.usda.gdpc.AbstractDBElementGroup
          extended bygov.usda.gdpc.AbstractGenotypeGroup
All Implemented Interfaces:
java.util.Collection, DBElementGroup, GenotypeGroup, Group, java.util.List
Direct Known Subclasses:
DefaultGenotypeGroup

public abstract class AbstractGenotypeGroup
extends AbstractDBElementGroup
implements GenotypeGroup

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

Author:
terryc

Field Summary
 
Fields inherited from class gov.usda.gdpc.AbstractDBElementGroup
myIndex
 
Constructor Summary
AbstractGenotypeGroup()
          AbstractGenotypeGroup constructor.
AbstractGenotypeGroup(Genotype[] genotypes)
          AbstractGenotypeGroup constructor.
AbstractGenotypeGroup(GenotypeGroup[] groups)
          AbstractGenotypeGroup constructor.
AbstractGenotypeGroup(java.util.List list)
          AbstractGenotypeGroup constructor.
 
Method Summary
 Genotype getGenotype(java.lang.String dataSource, Taxon taxon, GenotypeExperiment experiment)
          Gets the genotype having the given taxon, genotype experiment, number, and data source.
 GenotypeExperimentGroup getGenotypeExperimentGroup()
          Returns the group of genotype experiments associated with this group of genotypes.
 GenotypeGroup getGenotypeGroup(GenotypeFilter filter)
          Get the genotype group from this group which match the critera specified by the filter.
 TaxonGroup getTaxonGroup()
          Returns the group of taxon associated with this group of genotypes.
 java.lang.String getType()
          Get type of this group.
 int numGenotypeExperiments()
          Return the number of genotype experiments.
 int numTaxa()
          Return the number of taxa.
 
Methods inherited from class gov.usda.gdpc.AbstractDBElementGroup
getDBElementGroup, getDBElements, getDefinedProperties, getDistinctProperties, index, toString
 
Methods inherited from class gov.usda.gdpc.AbstractGroup
add, add, addAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.usda.gdpc.DBElementGroup
getDBElements, getDefinedProperties, getDistinctProperties, index
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Constructor Detail

AbstractGenotypeGroup

public AbstractGenotypeGroup(Genotype[] genotypes)
AbstractGenotypeGroup constructor.

Parameters:
genotypes - list of genotypes to be a part of this group.

AbstractGenotypeGroup

public AbstractGenotypeGroup()
AbstractGenotypeGroup constructor. Creates an empty group.


AbstractGenotypeGroup

public AbstractGenotypeGroup(java.util.List list)
AbstractGenotypeGroup constructor.

Parameters:
list - list of objects to be a part of this group. Any null in the list will be discarded.

AbstractGenotypeGroup

public AbstractGenotypeGroup(GenotypeGroup[] groups)
AbstractGenotypeGroup constructor.

Parameters:
groups - groups to include in this new group.
Method Detail

getTaxonGroup

public TaxonGroup getTaxonGroup()
Returns the group of taxon associated with this group of genotypes.

Specified by:
getTaxonGroup in interface GenotypeGroup
Returns:
taxon group

getGenotypeExperimentGroup

public GenotypeExperimentGroup getGenotypeExperimentGroup()
Returns the group of genotype experiments associated with this group of genotypes.

Specified by:
getGenotypeExperimentGroup in interface GenotypeGroup
Returns:
genotype experiment group

getGenotype

public Genotype getGenotype(java.lang.String dataSource,
                            Taxon taxon,
                            GenotypeExperiment experiment)
Gets the genotype having the given taxon, genotype experiment, number, and data source.

Specified by:
getGenotype in interface GenotypeGroup
Parameters:
dataSource - data source
taxon - taxon
experiment - genotype experiment
Returns:
genotype. null if no matching genotype

getGenotypeGroup

public GenotypeGroup getGenotypeGroup(GenotypeFilter filter)
Get the genotype group from this group which match the critera specified by the filter.

Specified by:
getGenotypeGroup in interface GenotypeGroup
Parameters:
filter - genotype filter
Returns:
genotype group

numGenotypeExperiments

public int numGenotypeExperiments()
Return the number of genotype experiments.

Specified by:
numGenotypeExperiments in interface GenotypeGroup
Returns:
number of genotype experiments.

numTaxa

public int numTaxa()
Return the number of taxa.

Specified by:
numTaxa in interface GenotypeGroup
Returns:
number of taxa.

getType

public java.lang.String getType()
Get type of this group.

Specified by:
getType in interface DBElementGroup
Returns:
type