phenote.datamodel
Interface CharacterI

All Superinterfaces:
java.awt.datatransfer.Transferable
All Known Implementing Classes:
AbstractCharacter, AnnotationCharacter, Character

public interface CharacterI
extends java.awt.datatransfer.Transferable

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 For drag&drop Character extends Transferable


Field Summary
static java.awt.datatransfer.DataFlavor CHAR_FLAVOR
           
 
Method Summary
 CharacterI cloneCharacter()
           
 boolean equals(CharacterI c)
           
 boolean fieldEquals(CharacterI c, CharField cf)
           
 java.util.List<CharField> getAllCharFields()
          generic fields!!!
 java.lang.String getAnnotId()
          Returns auto generated annot id for character, returns null if dont have one
 CharField getCharFieldForName(java.lang.String fieldName)
           
 java.util.List<Comparison> getComparisons()
          Return Comparisons if char is subject of comparisons, not object.
 java.util.List<CharFieldValue> getComparisonValueKidList()
          CharFieldValue may hold a list of values, with char as subject
 org.obo.datamodel.OBOClass getEntity()
           
 org.obo.datamodel.OBOClass getGeneticContext()
           
 java.lang.String getGenotype()
           
 java.lang.String getIdOrValue(java.lang.String field)
          convenience function, if field is a term then return ID, otherwise return field value as String throws ex if field doesnt exist
 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 hasAnnotId()
          Returns true if there is auto generated annot ids for character/config
 boolean hasComparison()
          Returns true if character is a SUBJECT of a comparison, NOT object in otherwords returns false if getComparison is null
 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, this can return true even if hasComparison is false
 
Methods inherited from interface java.awt.datatransfer.Transferable
getTransferData, getTransferDataFlavors, isDataFlavorSupported
 

Field Detail

CHAR_FLAVOR

static final java.awt.datatransfer.DataFlavor CHAR_FLAVOR
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

getIdOrValue

java.lang.String getIdOrValue(java.lang.String field)
                              throws CharFieldException
convenience function, if field is a term then return ID, otherwise return field value as String throws ex if field doesnt exist

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)

hasAnnotId

boolean hasAnnotId()
Returns true if there is auto generated annot ids for character/config


getAnnotId

java.lang.String getAnnotId()
Returns auto generated annot id for character, returns null if dont have one


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, this can return true even if hasComparison is false


hasComparison

boolean hasComparison()
Returns true if character is a SUBJECT of a comparison, NOT object in otherwords returns false if getComparison is null


getComparisons

java.util.List<Comparison> getComparisons()
Return Comparisons if char is subject of comparisons, not object. returns null otherwise


getComparisonValueKidList

java.util.List<CharFieldValue> getComparisonValueKidList()
CharFieldValue may hold a list of values, with char as subject


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)