gov.usda.gdpc
Class PhenotypeOntology

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

public class PhenotypeOntology
extends AbstractDBElement

This is a database element representing a phenotype ontology.

Author:
terryc

Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
 
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 phenotype ontology based on the PhenotypeOntologyPropery.ID and PhenotypeOntologyProperty.DATA_SOURCE.
static java.lang.String buildKey(java.lang.String dataSource, Identifier id)
          This builds the unique key for this phenotype ontology based on the PhenotypeOntologyPropery.ID and PhenotypeOntologyProperty.DATA_SOURCE.
static PhenotypeOntology getCachedInstance(java.util.Map properties)
          This returns the phenotype ontology instance from the cache that matches the specified id and source.
 java.lang.String getDataSource()
          Returns the data source of this phenotype ontology.
 Identifier getID()
          Returns identifier of this phenotype ontology.
static PhenotypeOntology getInstance(java.util.Map properties)
          This returns the phenotype ontology instance given the specified list of properties.
 java.lang.String getName()
          Returns the name of this phenotype ontology.
 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
 

Method Detail

getInstance

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

Parameters:
properties - properties of this phenotype ontology. The keys are the properties (type: PhenotypeOntologyProperty) 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 PhenotypeOntologyProperty.ID, PhenotypeOntologyProperty.DATA_SOURCE, and PhenotypeOntologyProperty.NAME properties must be defined.
Returns:
phenotype ontology

getCachedInstance

public static PhenotypeOntology getCachedInstance(java.util.Map properties)
This returns the phenotype ontology instance from the cache that matches the specified id and source. Null will be returned if its not found in the cache.

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

buildKey

public static java.lang.String buildKey(java.util.Map properties)
This builds the unique key for this phenotype ontology based on the PhenotypeOntologyPropery.ID and PhenotypeOntologyProperty.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 phenotype ontology based on the PhenotypeOntologyPropery.ID and PhenotypeOntologyProperty.DATA_SOURCE.

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

getName

public java.lang.String getName()
Returns the name of this phenotype ontology.

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 phenotype ontology.

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

getID

public Identifier getID()
Returns identifier of this phenotype ontology.

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

getType

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

Returns:
type