phenote.datamodel
Class Character

java.lang.Object
  extended by phenote.datamodel.AbstractCharacter
      extended by phenote.datamodel.Character
All Implemented Interfaces:
CharacterI

public class Character
extends AbstractCharacter
implements CharacterI

The Character datamodel is a generic hash of CharField-CharFieldValues CharFieldValues are free text or from ontologies This is the straightontabular implementation of CharacterI In the table view a character represents a row


Constructor Summary
Character()
          should only be constrcuted from factory
 
Method Summary
 void addComparison(org.obo.datamodel.OBOProperty rel, CharacterI relChar)
          throws CharacterEx if not implemented (Character doesnt implement) OBOAnnotation implements
 CharacterI cloneCharacter()
           
 java.util.List<CharField> getAllCharFields()
          return all char fields configured, both currently used or null in char
 CharField getCharFieldForName(java.lang.String fieldName)
           
 CharFieldValue getValue(CharField cf)
          generic getter - getting single value or 1st item of list
 java.util.List<CharFieldValue> getValueList(CharField cf)
          im wondering if a better way is to make CFVs recursive, so a CFV can be a list of CFV's - that might be easier - not sure
 java.lang.String getValueString(CharField cf)
          returns string for charfield value of char field, no matter what type, return "" if null value?? throw ex? used for sorting CharList
 java.lang.String getValueString(java.lang.String field)
           
 boolean hasNoContent()
           
 boolean hasValue(CharField cf)
          return false if getValue is null or isEmpty
 boolean hasValue(java.lang.String fieldName)
           
 void setValue(CharField cf, CharFieldValue cfv)
          for generic fields its just a map from char field to char field value
 boolean supportsComparisons()
          Returns true if charI implementation supports comparisons, eg Character doesnt AnnotChar does
 java.lang.String toString()
           
 
Methods inherited from class phenote.datamodel.AbstractCharacter
eq, equals, fieldEquals, getEntity, getEntityField, getGenConField, getGeneticContext, getGenotype, getGenotypeField, getOboAnnotation, getPub, getPubField, getQualField, getQuality, getTerm, getTerm, hasGeneticContext, hasOboAnnotation, hasPub, setEntity, setGeneticContext, setGenotype, setPub, setQuality, setValue, setValue, setValue, setValue, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface phenote.datamodel.CharacterI
equals, fieldEquals, getEntity, getGeneticContext, getGenotype, getOboAnnotation, getPub, getQuality, getTerm, hasGeneticContext, hasOboAnnotation, hasPub, setEntity, setGeneticContext, setGenotype, setPub, setQuality, setValue, setValue, setValue
 

Constructor Detail

Character

Character()
should only be constrcuted from factory

Method Detail

setValue

public void setValue(CharField cf,
                     CharFieldValue cfv)
for generic fields its just a map from char field to char field value

Specified by:
setValue in interface CharacterI

getValue

public CharFieldValue getValue(CharField cf)
generic getter - getting single value or 1st item of list

Specified by:
getValue in interface CharacterI

getValueList

public java.util.List<CharFieldValue> getValueList(CharField cf)
Description copied from interface: CharacterI
im wondering if a better way is to make CFVs recursive, so a CFV can be a list of CFV's - that might be easier - not sure

Specified by:
getValueList in interface CharacterI

getValueString

public java.lang.String getValueString(CharField cf)
returns string for charfield value of char field, no matter what type, return "" if null value?? throw ex? used for sorting CharList

Specified by:
getValueString in interface CharacterI
Overrides:
getValueString in class AbstractCharacter

getValueString

public java.lang.String getValueString(java.lang.String field)
                                throws CharFieldException
Specified by:
getValueString in interface CharacterI
Overrides:
getValueString in class AbstractCharacter
Throws:
CharFieldException

hasValue

public boolean hasValue(CharField cf)
return false if getValue is null or isEmpty

Specified by:
hasValue in interface CharacterI
Overrides:
hasValue in class AbstractCharacter

hasValue

public boolean hasValue(java.lang.String fieldName)
Specified by:
hasValue in interface CharacterI
Overrides:
hasValue in class AbstractCharacter

getCharFieldForName

public CharField getCharFieldForName(java.lang.String fieldName)
                              throws CharFieldException
Specified by:
getCharFieldForName in interface CharacterI
Overrides:
getCharFieldForName in class AbstractCharacter
Throws:
CharFieldException

getAllCharFields

public java.util.List<CharField> getAllCharFields()
return all char fields configured, both currently used or null in char

Specified by:
getAllCharFields in interface CharacterI
Overrides:
getAllCharFields in class AbstractCharacter

cloneCharacter

public CharacterI cloneCharacter()
Specified by:
cloneCharacter in interface CharacterI

hasNoContent

public boolean hasNoContent()
Specified by:
hasNoContent in interface CharacterI
Overrides:
hasNoContent in class AbstractCharacter

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

supportsComparisons

public boolean supportsComparisons()
Description copied from interface: CharacterI
Returns true if charI implementation supports comparisons, eg Character doesnt AnnotChar does

Specified by:
supportsComparisons in interface CharacterI

addComparison

public void addComparison(org.obo.datamodel.OBOProperty rel,
                          CharacterI relChar)
                   throws CharacterEx
Description copied from class: AbstractCharacter
throws CharacterEx if not implemented (Character doesnt implement) OBOAnnotation implements

Specified by:
addComparison in interface CharacterI
Specified by:
addComparison in class AbstractCharacter
Throws:
CharacterEx