com.rubecula.darwin.domain.helper
Interface Trait

All Superinterfaces:
Censusible, Expression, net.sf.tostring0.Identifiable, net.sf.tostring0.IToString
All Known Implementing Classes:
Trait_, Trait_Discrete, Trait_Variable

public interface Trait
extends net.sf.tostring0.IToString, Expression, Censusible, net.sf.tostring0.Identifiable

A Trait is the phenotypic analog to a (genotypic) Gene. A trait has no intrinsic value -- its information content is derived via lookup. The two significant properties of a trait are:

phenotypic character
a reference to a Pharacter which defines what sort of trait this is, for example, flower color;
variant
a reference key to a specific Variant of the phenotypic character, for example, purple or white. The key is used to look up the variant from among those variants which make up the phenotypic character.

Author:
Robin Hillyard

Field Summary
 
Fields inherited from interface net.sf.tostring0.IToString
ANGBR_OPEN, ANGBRA_CLSE, BRA_CLSE, BRA_OPEN, BRCE_OPEN, BRCS_CLSE, COLON, LIST_SEPARATOR, MAX_ELEMENTS_DEFAULT, S_MT, S_PERCENT, SEPARATOR, SPACE
 
Method Summary
 Pharacter getCharacter()
           
 java.lang.String getCharacterKey()
          TODO consider eliminating this method.
 java.lang.Object getKey()
           
 Phenotype getPhenotype()
          TODO consider renaming this method as getParent().
 java.lang.Object getValue()
          TODO consider eliminating this method.
 Variant getVariant()
          TODO consider eliminating this method.
 java.lang.String getVariantKey()
           
 void setPhenotype(Phenotype traits)
           
 
Methods inherited from interface net.sf.tostring0.IToString
toString, toStringBrief, toStringId
 
Methods inherited from interface com.rubecula.darwin.domain.helper.Censusible
censusMe, getCensusibleChildren
 
Methods inherited from interface net.sf.tostring0.Identifiable
getIdentifier
 

Method Detail

getCharacter

Pharacter getCharacter()
Returns:
the Phenotypic character of which this Trait is a specific value.

getCharacterKey

java.lang.String getCharacterKey()
TODO consider eliminating this method.

Returns:
this trait's character key

getKey

java.lang.Object getKey()
Returns:
the object for this Trait which should be able to distinguish it from other traits. For a variable trait, return the result of getValue(). For other traits, return this.

getPhenotype

Phenotype getPhenotype()
TODO consider renaming this method as getParent().

Returns:
the phenotype to which this trait belongs.

getValue

java.lang.Object getValue()
TODO consider eliminating this method.

Returns:
the value of the underlying variant.

getVariant

Variant getVariant()
TODO consider eliminating this method.

Returns:
the variant for this trait.

getVariantKey

java.lang.String getVariantKey()
Returns:
the key to the variant in the context of the character.

setPhenotype

void setPhenotype(Phenotype traits)
Parameters:
traits -


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.