phenote.datamodel
Class CharFieldManager

java.lang.Object
  extended by phenote.datamodel.CharFieldManager

public class CharFieldManager
extends java.lang.Object

Manages all of the ontologies. Should there be an ontology package - whats funny is that ontologies have obo filenames that they parse so they are sort of data adapterish actually manages CharFields(which may have ontologies) - rename CharFieldManager? yes! gets initialized by OntologyDataAdapter which loops through FieldConfigs and passes CharFields to OntMan


Field Summary
static java.lang.String DEFAULT_GROUP
           
 
Method Summary
 void addField(CharField cf)
          OntologyDataAdapter adds fields from field configs
 java.util.List<Ontology> getAllOntologies()
           
 CharField getCharField(int i)
          get char field for int.
 CharField getCharField(int i, java.lang.String group)
           
 CharField getCharFieldForName(java.lang.String fieldName)
          Actually checks both name & tag of char fields for match - rename getCharField?
 java.util.List<CharField> getCharFieldList()
          This is where the ontologies are in a generic fashion.
 java.util.List<CharField> getCharFieldListForGroup(java.lang.String groupName)
          should this be stored as a data structure?
 Ontology getComparisonRelationOntology()
          Return ontology to use for statement comparisons this needs work.
 CharField getDateCreatedField()
          If date_created doesnt exist then create it - its a fundamental may want a configuration for this - presumptious?
static java.lang.String getDefaultGroup()
           
 int getNumberOfFields()
           
 org.obo.datamodel.OBOClass getOboClass(java.lang.String id)
          Searches all ontologies for id - this could be even more savvy and utilize the id prefix AO,GO,PATO...
 org.obo.datamodel.OBOClass getOboClassWithExcep(java.lang.String id)
           
 org.obo.datamodel.OBOSession getOboSession()
           
 Ontology getOntologyForName(java.lang.String ontologyName)
          Returns ontology with name, null if not found
 Ontology getOntologyForTerm(org.obo.datamodel.OBOClass term)
          Currently iterates through every ontology looking for term, if this proves too inefficient we could do something with ID prefixes
(package private)  org.obo.datamodel.OBOClass getPostComp(org.obo.datamodel.OBOSession os, java.lang.String id)
          parse string GO:123^part_of(AO:345) into post comp obo class This will be replaced with obo edits post comp parse utility
 java.util.List<CharField> getPostCompFields()
          return list of all char fields that allow post comps
 org.obo.datamodel.OBOProperty getRelation(java.lang.String id)
          returns relation of id from obo session, null if dont have
static CharFieldManager inst()
           
static boolean isDefaultGroup(java.lang.String s)
           
(package private)  boolean isPostComp(java.lang.String id)
          returns true if contains ^ - is this rather presumptious or is ^ reserved
static void reset()
           
 void setOboSession(org.obo.datamodel.OBOSession s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_GROUP

public static final java.lang.String DEFAULT_GROUP
See Also:
Constant Field Values
Method Detail

inst

public static CharFieldManager inst()

reset

public static void reset()

addField

public void addField(CharField cf)
OntologyDataAdapter adds fields from field configs


setOboSession

public void setOboSession(org.obo.datamodel.OBOSession s)

getOboSession

public org.obo.datamodel.OBOSession getOboSession()

getRelation

public org.obo.datamodel.OBOProperty getRelation(java.lang.String id)
returns relation of id from obo session, null if dont have


getCharField

public CharField getCharField(int i)
                       throws OntologyException
get char field for int. 0 based. based on order in config file CharacterTableModel relies on this order

Throws:
OntologyException

getCharField

public CharField getCharField(int i,
                              java.lang.String group)
                       throws OntologyException
Throws:
OntologyException

getCharFieldForName

public CharField getCharFieldForName(java.lang.String fieldName)
                              throws CharFieldException
Actually checks both name & tag of char fields for match - rename getCharField?

Throws:
CharFieldException

getPostCompFields

public java.util.List<CharField> getPostCompFields()
return list of all char fields that allow post comps


getComparisonRelationOntology

public Ontology getComparisonRelationOntology()
                                       throws CharFieldException
Return ontology to use for statement comparisons this needs work. nicole is adding separate declaration of ontols in config with that a rel ontol should have a flag if its to be used for comparisons currently relationship ontols come from post comp would we ever have separate relationship ontol for post comp than comparisons? probably not - probably both use RO - for now just grabbing rel ontol from post comp - also may want to have more than one obo file for Ontology/field throws exception if none

Throws:
CharFieldException

getDateCreatedField

public CharField getDateCreatedField()
If date_created doesnt exist then create it - its a fundamental may want a configuration for this - presumptious?


getCharFieldList

public java.util.List<CharField> getCharFieldList()
This is where the ontologies are in a generic fashion. A char field has one or more ontologies (entity char field often has more than ontology)


getNumberOfFields

public int getNumberOfFields()

getCharFieldListForGroup

public java.util.List<CharField> getCharFieldListForGroup(java.lang.String groupName)
should this be stored as a data structure?


getDefaultGroup

public static java.lang.String getDefaultGroup()

isDefaultGroup

public static boolean isDefaultGroup(java.lang.String s)

getAllOntologies

public java.util.List<Ontology> getAllOntologies()

getOntologyForName

public Ontology getOntologyForName(java.lang.String ontologyName)
Returns ontology with name, null if not found


getOboClass

public org.obo.datamodel.OBOClass getOboClass(java.lang.String id)
                                       throws TermNotFoundException
Searches all ontologies for id - this could be even more savvy and utilize the id prefix AO,GO,PATO... Should this deal with post comp? if ^ then create a post comp term on fly? im not sure if this is the right place for it, maybe method should be renamed but ill put it here for now merge this with getOboClassWithEx?

Throws:
TermNotFoundException

getOboClassWithExcep

public org.obo.datamodel.OBOClass getOboClassWithExcep(java.lang.String id)
                                                throws TermNotFoundException
Throws:
TermNotFoundException

isPostComp

boolean isPostComp(java.lang.String id)
returns true if contains ^ - is this rather presumptious or is ^ reserved


getPostComp

org.obo.datamodel.OBOClass getPostComp(org.obo.datamodel.OBOSession os,
                                       java.lang.String id)
                                 throws TermNotFoundException
parse string GO:123^part_of(AO:345) into post comp obo class This will be replaced with obo edits post comp parse utility

Throws:
TermNotFoundException

getOntologyForTerm

public Ontology getOntologyForTerm(org.obo.datamodel.OBOClass term)
                            throws OntologyException
Currently iterates through every ontology looking for term, if this proves too inefficient we could do something with ID prefixes

Throws:
OntologyException