phenote.config
Class FieldConfig

java.lang.Object
  extended by phenote.config.FieldConfig

public class FieldConfig
extends java.lang.Object


Constructor Summary
FieldConfig(CharFieldEnum fieldEnum, CharField cf)
          for auto fields like date_created
FieldConfig(phenote.config.xml.FieldDocument.Field fieldBean, Config cfg)
          construct from xml bean field - READ
FieldConfig(java.lang.String label, java.lang.String displayName, Config cfg)
           
 
Method Summary
(package private)  void addOntologyConfig(OntologyConfig o)
           
 boolean copies()
          specifies whether to copy field to new character when char is duplicated default is true, db ids generally shouldnt copy
 CharField getCharField()
          Actually creates char field if null, as char fields utimately come from field configs - so this is funny but its actually not funny
 int getColwidth()
           
(package private)  Config getConfig()
           
 java.lang.String getDataTag()
          First tries to return explicitly set datatag, 2nd syn abbrev, 3rd label w _
 java.lang.String getDesc()
           
 phenote.config.xml.FieldDocument.Field getFieldBean()
          return xml bean for field -always non null
 java.lang.String getLabel()
           
 int getMinCompletionChars()
          Return the amount of letters/chars a user has to type before completion kicks in - this helps with slow completion with many ontologies on a slow computer
(package private)  int getOntCfgIndex(OntologyConfig oc)
           
(package private)  OntologyConfig getOntConfig(java.lang.String name)
          return OC with name - null if none
 java.util.List<OntologyConfig> getOntologyConfigList()
           
 java.lang.String getPickSourceFieldName()
           
(package private)  java.lang.String getSyntaxAbbrev()
          gets from datatag then label if no syntax abbrev explicitly set, replaces spaces with underscores in label as pheno syntax is sensitive to spaces (in theory at least)
 phenote.config.xml.FieldDocument.Field.Type.Enum getType()
           
(package private)  boolean hasCharField(CharField cf)
           
(package private)  boolean hasDesc(java.lang.String desc)
           
(package private)  boolean hasLabel(java.lang.String label)
           
(package private)  boolean hasOntConfig(OntologyConfig oc)
           
 boolean hasOntologies()
           
 boolean hasOntology()
           
(package private)  boolean hasSyntaxAbbrev(java.lang.String abb)
          Test both syntaxAbbrev & label - also test for replacing spaces with underscores
(package private)  boolean inGroup(java.lang.String group)
           
(package private)  void insertOntologyConfig(int index, OntologyConfig o)
           
 boolean isComparison()
           
 boolean isEnabled()
           
 boolean isID()
           
 boolean isVisible()
           
(package private)  void makeConstraint()
          if required then make RequiredConstraint if warnIfNull make RequiredConstraint with warning
(package private)  void mergeWithOldConfig(Config oldConfig, Config thisCfg)
           
 void setCharField(CharField cf)
           
 void setColwidth(int w)
           
(package private)  void setDataTag(java.lang.String dt)
          DataTag should replace syntax abbrev has a handle to the field, used by DataInputServlet (and should be used by syn adapter)
 void setEnabled(boolean e)
           
 void setIsVisible(boolean vis)
           
 void setLabel(java.lang.String label)
           
(package private)  void setOntologyConfigList(java.util.List<OntologyConfig> configs)
           
(package private)  void setSyntaxAbbrev(java.lang.String syn)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldConfig

FieldConfig(phenote.config.xml.FieldDocument.Field fieldBean,
            Config cfg)
construct from xml bean field - READ


FieldConfig

public FieldConfig(java.lang.String label,
                   java.lang.String displayName,
                   Config cfg)

FieldConfig

public FieldConfig(CharFieldEnum fieldEnum,
                   CharField cf)
for auto fields like date_created

Method Detail

getConfig

Config getConfig()

getFieldBean

public phenote.config.xml.FieldDocument.Field getFieldBean()
return xml bean for field -always non null


makeConstraint

void makeConstraint()
if required then make RequiredConstraint if warnIfNull make RequiredConstraint with warning


getLabel

public java.lang.String getLabel()

hasLabel

boolean hasLabel(java.lang.String label)

setLabel

public void setLabel(java.lang.String label)

toString

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

getType

public phenote.config.xml.FieldDocument.Field.Type.Enum getType()

isID

public boolean isID()

isComparison

public boolean isComparison()

getDesc

public java.lang.String getDesc()

getColwidth

public int getColwidth()

setColwidth

public void setColwidth(int w)

getMinCompletionChars

public int getMinCompletionChars()
Return the amount of letters/chars a user has to type before completion kicks in - this helps with slow completion with many ontologies on a slow computer


hasDesc

boolean hasDesc(java.lang.String desc)

hasOntologies

public boolean hasOntologies()

hasOntology

public boolean hasOntology()

getPickSourceFieldName

public java.lang.String getPickSourceFieldName()

addOntologyConfig

void addOntologyConfig(OntologyConfig o)

insertOntologyConfig

void insertOntologyConfig(int index,
                          OntologyConfig o)

hasOntConfig

boolean hasOntConfig(OntologyConfig oc)

getOntConfig

OntologyConfig getOntConfig(java.lang.String name)
return OC with name - null if none


setOntologyConfigList

void setOntologyConfigList(java.util.List<OntologyConfig> configs)

getOntologyConfigList

public java.util.List<OntologyConfig> getOntologyConfigList()

getOntCfgIndex

int getOntCfgIndex(OntologyConfig oc)

setSyntaxAbbrev

void setSyntaxAbbrev(java.lang.String syn)

getSyntaxAbbrev

java.lang.String getSyntaxAbbrev()
gets from datatag then label if no syntax abbrev explicitly set, replaces spaces with underscores in label as pheno syntax is sensitive to spaces (in theory at least)


setDataTag

void setDataTag(java.lang.String dt)
DataTag should replace syntax abbrev has a handle to the field, used by DataInputServlet (and should be used by syn adapter)


getDataTag

public java.lang.String getDataTag()
First tries to return explicitly set datatag, 2nd syn abbrev, 3rd label w _


hasSyntaxAbbrev

boolean hasSyntaxAbbrev(java.lang.String abb)
Test both syntaxAbbrev & label - also test for replacing spaces with underscores


isVisible

public boolean isVisible()

setIsVisible

public void setIsVisible(boolean vis)

isEnabled

public boolean isEnabled()

setEnabled

public void setEnabled(boolean e)

copies

public boolean copies()
specifies whether to copy field to new character when char is duplicated default is true, db ids generally shouldnt copy


setCharField

public void setCharField(CharField cf)

getCharField

public CharField getCharField()
Actually creates char field if null, as char fields utimately come from field configs - so this is funny but its actually not funny


hasCharField

boolean hasCharField(CharField cf)

inGroup

boolean inGroup(java.lang.String group)

mergeWithOldConfig

void mergeWithOldConfig(Config oldConfig,
                        Config thisCfg)