gov.usda.gdpc
Class GenotypeExperiment

java.lang.Object
  extended bygov.usda.gdpc.AbstractDBElement
      extended bygov.usda.gdpc.GenotypeExperiment
All Implemented Interfaces:
java.lang.Comparable, DBElement, java.util.Map

public class GenotypeExperiment
extends AbstractDBElement

This is a database element representing a genotype experiment.

Author:
terryc

Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
static java.lang.String TYPE
           
 
Fields inherited from class gov.usda.gdpc.AbstractDBElement
myProperties
 
Method Summary
static java.lang.String buildKey(java.util.Map properties)
          This builds the unique key for this genotype experiment based on the GenotypeExperimentProperty.ID and GenotypeExperimentProperty.DATA_SOURCE.
static java.lang.String buildKey(java.lang.String dataSource, Identifier id)
          This builds the unique key for this environment experiment based on the GenotypeExperimentProperty.ID and GenotypeExperimentProperty.DATA_SOURCE.
static int cacheSize()
           
static GenotypeExperiment getCachedInstance(java.util.Map properties)
          This returns the genotype experiment instance given specified id and source.
 java.lang.String getDataSource()
          Returns the data source of this genotype experiment.
 Identifier getID()
          Returns identifier of this genotype experiment.
static GenotypeExperiment getInstance(java.util.Map properties)
          This returns the genotype experiment instance given specified list of properties.
 Locus getLocus()
          Returns the locus associated with this genotype experiment.
 java.lang.String getName()
          Returns the name of this genotype experiment.
 java.lang.String getType()
          Get type of this element.
 
Methods inherited from class gov.usda.gdpc.AbstractDBElement
clear, compareTo, containsKey, containsValue, entrySet, equals, get, getKey, getProperty, isEmpty, keySet, numProperties, properties, propsEqual, put, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
hashCode
 

Field Detail

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values
Method Detail

getInstance

public static GenotypeExperiment getInstance(java.util.Map properties)
This returns the genotype experiment instance given specified list of properties. A new genotype experiment will be created if its not found in the cache.

Parameters:
properties - properties of this genotype experiment. The keys are the properties (type: GenotypeExperimentProperty) and the values are the corresponding value. Properties can not have a value equal to null. It is not allowed to have two keys that are the same. The GenotypeExperimentProperty.ID, GenotypeExperimentProperty.DATA_SOURCE, and GenotypeExperimentProperty.NAME properties must be defined.
Returns:
genotype experiment

getCachedInstance

public static GenotypeExperiment getCachedInstance(java.util.Map properties)
This returns the genotype experiment instance given specified id and source. Null will be returned if its not found in the cache.

Parameters:
properties - properties of this genotype experiment. The keys are the properties (type: GenotypeExperimentProperty) and the values are the corresponding value. Properties can not have a value equal to null. Only the GenotypeExperimentProperty.ID and GenotypeExperimentProperty.DATA_SOURCE are used to find a matching genotype experiment in the cache.
Returns:
cached genotype experiment or null if not in cache.

buildKey

public static java.lang.String buildKey(java.util.Map properties)
This builds the unique key for this genotype experiment based on the GenotypeExperimentProperty.ID and GenotypeExperimentProperty.DATA_SOURCE.

Parameters:
properties - properties map
Returns:
key

buildKey

public static java.lang.String buildKey(java.lang.String dataSource,
                                        Identifier id)
This builds the unique key for this environment experiment based on the GenotypeExperimentProperty.ID and GenotypeExperimentProperty.DATA_SOURCE.

Parameters:
dataSource - data source
id - identifier
Returns:
key

getName

public java.lang.String getName()
Returns the name of this genotype experiment.

Specified by:
getName in interface DBElement
Overrides:
getName in class AbstractDBElement
Returns:
the name

getDataSource

public java.lang.String getDataSource()
Returns the data source of this genotype experiment.

Specified by:
getDataSource in interface DBElement
Overrides:
getDataSource in class AbstractDBElement
Returns:
data source

getID

public Identifier getID()
Returns identifier of this genotype experiment.

Specified by:
getID in interface DBElement
Overrides:
getID in class AbstractDBElement
Returns:
identifier

getLocus

public Locus getLocus()
Returns the locus associated with this genotype experiment.

Returns:
locus

cacheSize

public static int cacheSize()

getType

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

Returns:
type