phenote.datamodel
Interface CharacterI

All Known Implementing Classes:
AbstractCharacter, AnnotationCharacter, Character

public interface CharacterI

CharacterIs are the building blocks of phenotypes. All the Characters for a genotype make up a Phenotype - at least thats my understanding. an alternate approach would be to just have a list of CharFields, it would certainly be more generic - hybrid approach would be to retain these fields but also have a CharField list that can just come from config (& take out enum in config xsd for field names) - downside: lose strong typing, and a config misspelling would end up in a char field


Method Summary
 void addComparison(org.obo.datamodel.OBOProperty relation, CharacterI relatedChar)
          make comparison statement using relation to relatedChar.
 CharacterI cloneCharacter()
           
 boolean equals(CharacterI c)
           
 boolean fieldEquals(CharacterI c, CharField cf)
           
 java.util.List<CharField> getAllCharFields()
          generic fields!!!
 CharField getCharFieldForName(java.lang.String fieldName)
           
 org.obo.datamodel.OBOClass getEntity()
           
 org.obo.datamodel.OBOClass getGeneticContext()
           
 java.lang.String getGenotype()
           
 org.obo.annotation.datamodel.Annotation getOboAnnotation()
          if hasOboAnnotation() this returns non null Annotation from obo model
 java.lang.String getPub()
          these methods are pase and need to be phased out!
 org.obo.datamodel.OBOClass getQuality()
           
 org.obo.datamodel.OBOClass getTerm(java.lang.String fieldName)
           
 CharFieldValue getValue(CharField cf)
           
 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)
          used in particular for lists of values
 java.lang.String getValueString(java.lang.String fieldName)
           
 boolean hasGeneticContext()
           
 boolean hasNoContent()
           
 boolean hasOboAnnotation()
          Returns true if in fact charI has OboAnnotation under the hood, and thus getOboAnnotation will have non null return.
 boolean hasPub()
           
 boolean hasValue(CharField cf)
           
 boolean hasValue(java.lang.String fieldName)
           
 void setEntity(org.obo.datamodel.OBOClass e)
           
 void setGeneticContext(org.obo.datamodel.OBOClass gc)
           
 void setGenotype(java.lang.String gt)
           
 void setPub(java.lang.String p)
          eventually have Genotype object? probably
 void setQuality(org.obo.datamodel.OBOClass p)
           
 void setValue(CharField cf, CharFieldValue cfv)
           
 CharFieldValue setValue(CharField cf, java.lang.String valueString)
           
 CharFieldValue setValue(CharField cf, java.lang.String s, java.lang.String danglerName)
          if term field, string should be id, obo class will be searched for, if class not found then dangler is created.
 CharFieldValue setValue(java.lang.String fieldString, java.lang.String valueString)
          Looks up CharField with fieldString using both field name & datatag, if CharField isnt found throws CharFieldException.
 boolean supportsComparisons()
          Returns true if charI implementation supports comparisons, eg Character doesnt AnnotChar does
 

Method Detail

getAllCharFields

java.util.List<CharField> getAllCharFields()
generic fields!!!


setValue

CharFieldValue setValue(java.lang.String fieldString,
                        java.lang.String valueString)
                        throws CharFieldException,
                               TermNotFoundException
Looks up CharField with fieldString using both field name & datatag, if CharField isnt found throws CharFieldException. Then creates CharFieldValue using valueString. If field is TERM then valueString is ID and is looked up, if not found then creates dangler. danglers actually make TermNotFoundEx irrelevant (take out?). CFV.isDangler() will indicate if you got a dangler

Throws:
CharFieldException
TermNotFoundException

setValue

void setValue(CharField cf,
              CharFieldValue cfv)

setValue

CharFieldValue setValue(CharField cf,
                        java.lang.String valueString)
                        throws CharFieldException
Throws:
CharFieldException

setValue

CharFieldValue setValue(CharField cf,
                        java.lang.String s,
                        java.lang.String danglerName)
                        throws CharFieldException
if term field, string should be id, obo class will be searched for, if class not found then dangler is created. if free text field just uses string of course. the dangler makes termNotFound Ex irrelevant - take out? or will there be a no dangler mode? probably not right? CharFieldEx thrown if improper date for date field if cf is a term, can optionally pass in non null danglerName, if term ends up being dangler (not found in ontology) will set dangler id to s and dangler name to danglerName

Throws:
CharFieldException

getCharFieldForName

CharField getCharFieldForName(java.lang.String fieldName)
                              throws CharFieldException
Throws:
CharFieldException

getValue

CharFieldValue getValue(CharField cf)

getValueList

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


fieldEquals

boolean fieldEquals(CharacterI c,
                    CharField cf)

getValueString

java.lang.String getValueString(CharField cf)
used in particular for lists of values


getValueString

java.lang.String getValueString(java.lang.String fieldName)
                                throws CharFieldException
Throws:
CharFieldException

getTerm

org.obo.datamodel.OBOClass getTerm(java.lang.String fieldName)
                                   throws CharFieldException
Throws:
CharFieldException

hasValue

boolean hasValue(CharField cf)

hasValue

boolean hasValue(java.lang.String fieldName)

cloneCharacter

CharacterI cloneCharacter()

equals

boolean equals(CharacterI c)

hasNoContent

boolean hasNoContent()

hasOboAnnotation

boolean hasOboAnnotation()
Returns true if in fact charI has OboAnnotation under the hood, and thus getOboAnnotation will have non null return. Char returns false


getOboAnnotation

org.obo.annotation.datamodel.Annotation getOboAnnotation()
if hasOboAnnotation() this returns non null Annotation from obo model


supportsComparisons

boolean supportsComparisons()
Returns true if charI implementation supports comparisons, eg Character doesnt AnnotChar does


addComparison

void addComparison(org.obo.datamodel.OBOProperty relation,
                   CharacterI relatedChar)
                   throws CharacterEx
make comparison statement using relation to relatedChar. throw exception if comparisons are not supported (Character doesnt support)

Throws:
CharacterEx

getPub

java.lang.String getPub()
these methods are pase and need to be phased out!


hasPub

boolean hasPub()

getGenotype

java.lang.String getGenotype()

getEntity

org.obo.datamodel.OBOClass getEntity()

getQuality

org.obo.datamodel.OBOClass getQuality()

hasGeneticContext

boolean hasGeneticContext()

getGeneticContext

org.obo.datamodel.OBOClass getGeneticContext()

setPub

void setPub(java.lang.String p)
eventually have Genotype object? probably


setGenotype

void setGenotype(java.lang.String gt)

setEntity

void setEntity(org.obo.datamodel.OBOClass e)

setQuality

void setQuality(org.obo.datamodel.OBOClass p)

setGeneticContext

void setGeneticContext(org.obo.datamodel.OBOClass gc)