phenote.datamodel
Class BasicAnnotationMappingDriver

java.lang.Object
  extended by phenote.datamodel.BasicAnnotationMappingDriver
All Implemented Interfaces:
AnnotationMappingDriver
Direct Known Subclasses:
DefaultMappingDriver, PhenotypeAssociationMappingDriver

public class BasicAnnotationMappingDriver
extends java.lang.Object
implements AnnotationMappingDriver

Maps ENTITY to subject and QUALITY to object but is this proper? shouldnt genotype be subject?


Field Summary
protected  boolean auditHistoryMode
           
protected  boolean changeObjectsMode
           
protected static org.obo.datamodel.OBOProperty GENOTYPE_REL
          We probably want to create a special static ontology that extends AnnotationOntology to contain these properties.
protected static org.obo.datamodel.OBOProperty HAS_QUALITY_REL
           
protected  java.util.List<org.obo.history.HistoryItem> historyItems
           
 
Constructor Summary
BasicAnnotationMappingDriver()
           
 
Method Summary
 void addHistoryItem(org.obo.history.HistoryItem item)
           
 void clearProperty(org.obo.annotation.datamodel.Annotation annotation, org.obo.datamodel.OBOProperty property)
           
 boolean getAuditHistoryMode()
           
 boolean getChangeObjectsMode()
           
 CharFieldValue getCharFieldValue(org.obo.datamodel.Instance oboInst, CharacterI character, CharField field)
           
 CharFieldValue getCharFieldValue(org.obo.datamodel.OBOClass oboclass, CharacterI character, CharField field)
           
 CharFieldValue getCharFieldValue(java.lang.String s, CharacterI character, CharField field)
           
 org.obo.datamodel.OBOProperty getDefaultRelationship()
           
 org.obo.datamodel.OBOProperty getPropertyForField(CharField cf)
           
protected  org.obo.datamodel.OBOProperty getRelation(java.lang.String id, java.lang.String name)
          retrieves prop from obo session by id, if not there then creates one
 boolean isObjectDifferentiaField(CharField cf)
           
 boolean isObjectField(CharField cf)
           
 boolean isObjectGenusField(CharField cf)
           
 boolean isSubjectField(CharField cf)
           
 java.util.List<org.obo.history.HistoryItem> popHistoryList()
           
 void setAuditHistoryMode(boolean auditHistoryMode)
           
 void setChangeObjectsMode(boolean changeObjectsMode)
           
 void setPropertyValue(org.obo.annotation.datamodel.Annotation annotation, org.obo.datamodel.OBOProperty property, org.obo.datamodel.OBOClass value)
           
 void setPropertyValue(org.obo.annotation.datamodel.Annotation annotation, org.obo.datamodel.OBOProperty property, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

auditHistoryMode

protected boolean auditHistoryMode

changeObjectsMode

protected boolean changeObjectsMode

historyItems

protected java.util.List<org.obo.history.HistoryItem> historyItems

GENOTYPE_REL

protected static final org.obo.datamodel.OBOProperty GENOTYPE_REL
We probably want to create a special static ontology that extends AnnotationOntology to contain these properties. This is here just to keep the example simple


HAS_QUALITY_REL

protected static final org.obo.datamodel.OBOProperty HAS_QUALITY_REL
Constructor Detail

BasicAnnotationMappingDriver

public BasicAnnotationMappingDriver()
Method Detail

getPropertyForField

public org.obo.datamodel.OBOProperty getPropertyForField(CharField cf)
Specified by:
getPropertyForField in interface AnnotationMappingDriver

getRelation

protected org.obo.datamodel.OBOProperty getRelation(java.lang.String id,
                                                    java.lang.String name)
retrieves prop from obo session by id, if not there then creates one


popHistoryList

public java.util.List<org.obo.history.HistoryItem> popHistoryList()
Specified by:
popHistoryList in interface AnnotationMappingDriver

getCharFieldValue

public CharFieldValue getCharFieldValue(org.obo.datamodel.OBOClass oboclass,
                                        CharacterI character,
                                        CharField field)
Specified by:
getCharFieldValue in interface AnnotationMappingDriver

getCharFieldValue

public CharFieldValue getCharFieldValue(org.obo.datamodel.Instance oboInst,
                                        CharacterI character,
                                        CharField field)

getCharFieldValue

public CharFieldValue getCharFieldValue(java.lang.String s,
                                        CharacterI character,
                                        CharField field)
Specified by:
getCharFieldValue in interface AnnotationMappingDriver

setPropertyValue

public void setPropertyValue(org.obo.annotation.datamodel.Annotation annotation,
                             org.obo.datamodel.OBOProperty property,
                             org.obo.datamodel.OBOClass value)
Specified by:
setPropertyValue in interface AnnotationMappingDriver

setPropertyValue

public void setPropertyValue(org.obo.annotation.datamodel.Annotation annotation,
                             org.obo.datamodel.OBOProperty property,
                             java.lang.String value)
Specified by:
setPropertyValue in interface AnnotationMappingDriver

clearProperty

public void clearProperty(org.obo.annotation.datamodel.Annotation annotation,
                          org.obo.datamodel.OBOProperty property)
Specified by:
clearProperty in interface AnnotationMappingDriver

getDefaultRelationship

public org.obo.datamodel.OBOProperty getDefaultRelationship()
Specified by:
getDefaultRelationship in interface AnnotationMappingDriver

isSubjectField

public boolean isSubjectField(CharField cf)
Specified by:
isSubjectField in interface AnnotationMappingDriver

isObjectField

public boolean isObjectField(CharField cf)
Specified by:
isObjectField in interface AnnotationMappingDriver

isObjectGenusField

public boolean isObjectGenusField(CharField cf)
Specified by:
isObjectGenusField in interface AnnotationMappingDriver

isObjectDifferentiaField

public boolean isObjectDifferentiaField(CharField cf)
Specified by:
isObjectDifferentiaField in interface AnnotationMappingDriver

getAuditHistoryMode

public boolean getAuditHistoryMode()
Specified by:
getAuditHistoryMode in interface AnnotationMappingDriver

setAuditHistoryMode

public void setAuditHistoryMode(boolean auditHistoryMode)

getChangeObjectsMode

public boolean getChangeObjectsMode()
Specified by:
getChangeObjectsMode in interface AnnotationMappingDriver

setChangeObjectsMode

public void setChangeObjectsMode(boolean changeObjectsMode)

addHistoryItem

public void addHistoryItem(org.obo.history.HistoryItem item)
Specified by:
addHistoryItem in interface AnnotationMappingDriver