gov.usda.gdpc
Class AbstractProperty

java.lang.Object
  extended bygov.usda.gdpc.AbstractProperty
All Implemented Interfaces:
java.lang.Comparable, Property
Direct Known Subclasses:
EnvironmentExperimentProperty, GenotypeExperimentProperty, GenotypeProperty, LocalityProperty, LocusProperty, PhenotypeOntologyProperty, PhenotypeProperty, TaxonProperty

public abstract class AbstractProperty
extends java.lang.Object
implements Property

Author:
terryc

Constructor Summary
AbstractProperty(java.lang.String name, java.lang.Class dataType, java.lang.String propertyType, java.lang.String propertySubType)
          AbstractProperty constructor.
AbstractProperty(java.lang.String name, java.lang.String dataType, java.lang.String propertyType, java.lang.String propertySubType)
          AbstractProperty constructor.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compares two properties to determine there order based on the alphabetical order of the property name.
 boolean equals(java.lang.Object obj)
          This method made final to prevent overriding Object.equals.
 java.lang.Class getDataType()
          Returns the data type of this property
 java.lang.String getName()
          Returns the name of this property
 java.lang.String getSubType()
          Get subtype of this property.
 java.lang.String getType()
          Get type of this property.
 int hashCode()
          This method made final to prevent overriding Object.hashCode.
 java.lang.String toString()
          Returns string representation of this property.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractProperty

public AbstractProperty(java.lang.String name,
                        java.lang.String dataType,
                        java.lang.String propertyType,
                        java.lang.String propertySubType)
AbstractProperty constructor.

Parameters:
name - property name
dataType - data type of this property (class name)
propertyType - property type
propertySubType - property subtype

AbstractProperty

public AbstractProperty(java.lang.String name,
                        java.lang.Class dataType,
                        java.lang.String propertyType,
                        java.lang.String propertySubType)
AbstractProperty constructor.

Parameters:
name - property name
dataType - data type of this property (class)
propertyType - property type
propertySubType - property subtype
Method Detail

toString

public java.lang.String toString()
Returns string representation of this property.

Returns:
string representation

getDataType

public java.lang.Class getDataType()
Returns the data type of this property

Specified by:
getDataType in interface Property
Returns:
data type (class name)

getName

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

Specified by:
getName in interface Property
Returns:
name

equals

public final boolean equals(java.lang.Object obj)
This method made final to prevent overriding Object.equals.


hashCode

public final int hashCode()
This method made final to prevent overriding Object.hashCode.


compareTo

public int compareTo(java.lang.Object o)
Compares two properties to determine there order based on the alphabetical order of the property name.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - the object to be compared
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this Object.

getType

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

Specified by:
getType in interface Property
Returns:
type

getSubType

public java.lang.String getSubType()
Get subtype of this property.

Specified by:
getSubType in interface Property
Returns:
subtype