gov.usda.gdpc
Class AbstractTaxonGroup

java.lang.Object
  extended bygov.usda.gdpc.AbstractGroup
      extended bygov.usda.gdpc.AbstractDBElementGroup
          extended bygov.usda.gdpc.AbstractTaxonGroup
All Implemented Interfaces:
java.util.Collection, DBElementGroup, Group, java.util.List, TaxonGroup
Direct Known Subclasses:
DefaultTaxonGroup

public abstract class AbstractTaxonGroup
extends AbstractDBElementGroup
implements TaxonGroup

This class provides a skeletal implementation of the TaxonGroup 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
AbstractTaxonGroup()
          AbstractTaxonGroup constructor.
AbstractTaxonGroup(java.util.List list)
          AbstractTaxonGroup constructor.
AbstractTaxonGroup(Taxon[] taxa)
          AbstractTaxonGroup constructor.
AbstractTaxonGroup(TaxonGroup[] groups)
          AbstractTaxonGroup constructor.
 
Method Summary
 Taxon getTaxon(java.lang.String dataSource, Identifier id)
          This returns the taxon instance from this group that matches the specified id and source.
 TaxonGroup getTaxonGroup(TaxonFilter filter)
          Get the taxon group matching the given filter from this taxon group.
 java.lang.String getType()
          Get type of this group.
 
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

AbstractTaxonGroup

public AbstractTaxonGroup(Taxon[] taxa)
AbstractTaxonGroup constructor.

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

AbstractTaxonGroup

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


AbstractTaxonGroup

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

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

AbstractTaxonGroup

public AbstractTaxonGroup(TaxonGroup[] groups)
AbstractTaxonGroup constructor.

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

getTaxonGroup

public TaxonGroup getTaxonGroup(TaxonFilter filter)
Get the taxon group matching the given filter from this taxon group.

Specified by:
getTaxonGroup in interface TaxonGroup
Parameters:
filter - filter
Returns:
taxon group

getTaxon

public Taxon getTaxon(java.lang.String dataSource,
                      Identifier id)
This returns the taxon instance from this group that matches the specified id and source. Null will be returned if its not in this group.

Specified by:
getTaxon in interface TaxonGroup
Parameters:
dataSource - data source
id - identifier
Returns:
taxon or null if not in this group.

getType

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

Specified by:
getType in interface DBElementGroup
Returns:
type