gov.usda.gdpc
Class AbstractPhenotypeGroup

java.lang.Object
  extended bygov.usda.gdpc.AbstractGroup
      extended bygov.usda.gdpc.AbstractDBElementGroup
          extended bygov.usda.gdpc.AbstractPhenotypeGroup
All Implemented Interfaces:
java.util.Collection, DBElementGroup, Group, java.util.List, PhenotypeGroup
Direct Known Subclasses:
DefaultPhenotypeGroup

public abstract class AbstractPhenotypeGroup
extends AbstractDBElementGroup
implements PhenotypeGroup

This class provides a skeletal implementation of the PhenotypeGroup 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
AbstractPhenotypeGroup()
          AbstractPhenotypeGroup constructor.
AbstractPhenotypeGroup(java.util.List list)
          AbstractPhenotypeGroup constructor.
AbstractPhenotypeGroup(Phenotype[] phenotypes)
          AbstractPhenotypeGroup constructor.
AbstractPhenotypeGroup(PhenotypeGroup[] groups)
          AbstractPhenotypeGroup constructor.
 
Method Summary
 EnvironmentExperimentGroup getEnvironmentExperimentGroup()
          Returns the group of environment experiments associated with this group of phenotypes.
 Phenotype getPhenotype(java.lang.String dataSource, Taxon taxon, EnvironmentExperiment experiment, PhenotypeOntology ontology)
          Gets the phenotype having the given taxon, environment experiment, ontology, and data source.
 PhenotypeGroup getPhenotypeGroup(PhenotypeFilter filter)
          Get the phenotype group from this group which match the critera specified by the filter.
 TaxonGroup getTaxonGroup()
          Returns the group of taxon associated with this group of phenotypes.
 java.lang.String getType()
          Get type of this group.
 int numEnvironmentExperiments()
          Return the number of phenotype 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

AbstractPhenotypeGroup

public AbstractPhenotypeGroup(Phenotype[] phenotypes)
AbstractPhenotypeGroup constructor.

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

AbstractPhenotypeGroup

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


AbstractPhenotypeGroup

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

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

AbstractPhenotypeGroup

public AbstractPhenotypeGroup(PhenotypeGroup[] groups)
AbstractPhenotypeGroup 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 phenotypes.

Specified by:
getTaxonGroup in interface PhenotypeGroup
Returns:
taxon group

getEnvironmentExperimentGroup

public EnvironmentExperimentGroup getEnvironmentExperimentGroup()
Returns the group of environment experiments associated with this group of phenotypes.

Specified by:
getEnvironmentExperimentGroup in interface PhenotypeGroup
Returns:
environment experiment group

getPhenotype

public Phenotype getPhenotype(java.lang.String dataSource,
                              Taxon taxon,
                              EnvironmentExperiment experiment,
                              PhenotypeOntology ontology)
Gets the phenotype having the given taxon, environment experiment, ontology, and data source.

Specified by:
getPhenotype in interface PhenotypeGroup
Parameters:
dataSource - data source
taxon - taxon
experiment - environment experiment
ontology - phenotype ontology
Returns:
phenotype. null if no matching phenotype

getPhenotypeGroup

public PhenotypeGroup getPhenotypeGroup(PhenotypeFilter filter)
Get the phenotype group from this group which match the critera specified by the filter.

Specified by:
getPhenotypeGroup in interface PhenotypeGroup
Parameters:
filter - phenotype filter
Returns:
phenotype group

numEnvironmentExperiments

public int numEnvironmentExperiments()
Return the number of phenotype experiments.

Specified by:
numEnvironmentExperiments in interface PhenotypeGroup
Returns:
number of environment experiments.

numTaxa

public int numTaxa()
Return the number of taxa.

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

getType

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

Specified by:
getType in interface DBElementGroup
Returns:
type