apollo.config
Class FeatureProperty

java.lang.Object
  extended by apollo.config.FeatureProperty
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class FeatureProperty
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

FeatureProperty comes from "Types" in the tiers file. All the configurations of Types in the tiers file are reflected here (color, score threshold, glyph...). FeatureProperties are grouped into TierProperties, which are for expanding and hiding and such In the types panel Types/FeatureProperties of the displayed tiers can be seen by right clicking on the tier. When something changes tell TierProperty to fire PropSchemeChangeEvent (TP then tells PropScheme to fire PSCE). This replaces Observable which ended up firing a PSCE after doing a bunch of notifyObservers.

See Also:
Serialized Form

Field Summary
protected  java.util.Vector analysis_types
           
static java.awt.Color blueGreen
           
static java.awt.Color brown
           
protected  java.awt.Color colour
           
static java.util.Hashtable colourHash
           
protected  java.util.Vector columns
           
protected  java.util.Vector comments
           
static java.awt.Color DEFAULT_COLOR
           
static java.util.Vector default_columns
           
static java.lang.String DEFAULT_STYLE
           
protected  java.lang.Integer groupFlag
           
protected  boolean groupFlagSet
           
static java.util.Hashtable groupTypes
           
static java.lang.Integer GRP_GENE
           
static java.lang.Integer GRP_HOMOLOGY
           
static java.lang.Integer GRP_SINGLE
           
protected static org.apache.log4j.Logger logger
           
protected  float maxScore
           
static java.awt.Color midBlue
           
static java.awt.Color midRed
           
protected  float minScore
           
protected  int minWidth
           
protected  java.util.Date recentDate
           
protected  boolean reverseSort
           
protected  java.lang.String sortProperty
           
protected  java.lang.String style
           
protected  float thresholdScore
           
protected  TierProperty tier
           
protected  java.lang.String tiername
           
protected  java.lang.String type
           
protected  java.lang.String URLString
           
protected  boolean usescore
           
 
Constructor Summary
FeatureProperty()
           
FeatureProperty(FeatureProperty from)
           
FeatureProperty(FeatureProperty from, boolean cloneTier)
           
FeatureProperty(TierProperty tier, java.lang.String type, java.util.Vector anal_types)
           
FeatureProperty(TierProperty tier, java.lang.String type, java.util.Vector anal_types, java.awt.Color colour)
           
FeatureProperty(TierProperty tier, java.lang.String type, java.util.Vector anal_types, java.awt.Color colour, java.lang.String style)
           
FeatureProperty(TierProperty tier, java.lang.String type, java.util.Vector anal_types, java.awt.Color colour, java.lang.String style, boolean usescore, float min, float max)
           
 
Method Summary
 void addAnalysisType(java.lang.String analysis)
           
 void addColumn(ColumnProperty column)
           
protected  void addComment(java.lang.String comment)
           
 java.lang.Object clone()
          this needs to be a deep clone not a shallow one
protected  java.lang.Object createClassFromName(java.lang.String str)
           
 ApolloNameAdapterI createNameAdapter()
           
 java.lang.String createNameFromClass(java.lang.Object cl)
          Given a class, e.g.
 java.lang.String getAnalysisType(int i)
           
 java.util.Vector getAnalysisTypes()
          An analysis type is what comes from "datatype" in the tiers file.
 int getAnalysisTypesSize()
           
 java.lang.String getAnnotType()
          Type of annotation this result creates, by default
 java.lang.String getChromosomeFormat()
          Get chromosome Prefix
 java.awt.Color getColour()
           
 java.lang.String getColourAsString()
           
 java.lang.String getColourAsString(java.awt.Color colour)
           
 java.util.Vector getColumns()
           
 java.util.Vector getColumns(boolean use_default)
           
protected  java.util.Vector getComments()
           
static java.lang.String getDefaultAnnotType()
          Making default annotType "gene".
 java.lang.String getDisplayType()
           
 java.awt.Color getFinishedColor()
           
 java.lang.Integer getGroupFlag()
           
 java.lang.String getGroupFlagAsString()
           
 java.lang.String getIdFormat()
          Regular expression that describes format for ID, null if not set
 java.lang.String getIdPrefix()
          Get the id prefix
 java.lang.String getKeyFromValue(java.util.Hashtable table, java.lang.Object value)
           
 java.lang.String getLinkSpecies1()
           
 java.lang.String getLinkSpecies2()
           
 LinkType getLinkType()
          Return LinkType - default LinkType.NO_LINK (not linked) LinkType describes how FeatureProperty links to other species
 float getMaxScore()
           
 float getMinScore()
           
 int getMinWidth()
           
 java.lang.String getNameAdapterString()
           
 int getNumberOfLevels()
           
 OverlapI getOverlapper()
           
 java.awt.Color getProblematicColor()
           
 java.util.Date getRecentDate()
           
 boolean getReverseSort()
           
 boolean getSizeByScore()
           
 java.lang.String getSortProperty()
           
 java.lang.String getStyle()
           
 float getThreshold()
           
 TierProperty getTier()
           
protected  java.lang.String getTierName()
           
 java.lang.String getURLString()
           
 java.awt.Color getUtrColor()
          For DrawableGeneSeqFeature that colors utrs
 boolean hasNonDefaultNameAdapter()
          Has nameadapter if this is an annotation tier
 boolean hasOverlapper()
          Has overlapper if this is an annotation tier
 void inheritWarnOnEdit(boolean warn)
          Initially, the value of warnonedit is inherited from the parent tier--may later be overridden.
 boolean isAnnotationType()
           
 boolean isOneLevel()
           
 boolean isSyntenyLinked()
          Return true if feat prop is a synteny link to another species
static java.awt.Color parseColour(java.lang.String colourStr)
           
protected  java.lang.String quoteIfSpace(java.lang.String str)
           
protected  void setAnalysisTypes(java.util.Vector anal_types)
           
 void setAnnotType(java.lang.String annot_type)
          Type of annotation this result creates, by default
 void setChromosomeFormat(java.lang.String chromosomeFormat)
          Set chromosome Format This is a regular expression to get the chromosome number.
 void setColour(java.awt.Color colour)
           
 void setColour(java.awt.Color colour, boolean temporary)
           
 void setColumns(java.util.Vector columns)
           
 void setDisplayType(java.lang.String type)
           
 void setDisplayType(java.lang.String type, boolean temporary)
           
 void setGroupFlag(java.lang.String grpStr)
           
 void setIdFormat(java.lang.String idFormat)
          Set regular expression String that describes id format for type
 void setIdPrefix(java.lang.String idPrefix)
          id prefix is not a regular expression Set String which describe id prefix for the type used by ChadoJdbcNameAdapter
 void setMaxScore(float max)
           
 void setMaxScore(float max, boolean isTemporary)
           
 void setMinScore(float min)
           
 void setMinScore(float min, boolean isTemporary)
           
 void setMinWidth(int min)
           
 void setOverlapper(java.lang.String str)
          Return null if no tiername or tiername is not "annotation"
 void setOverlapperIfNotSet(java.lang.String str)
           
 void setRecentDate(java.lang.String dateString)
           
 void setReverseSort(boolean reverse)
           
 void setSizeByScore(boolean usescore)
           
 void setSizeByScore(boolean usescore, boolean isTemporary)
           
 void setSortProperty(java.lang.String sort_by)
           
 void setStyle(java.lang.String style)
           
 void setStyle(java.lang.String style, boolean isTemporary)
           
 void setThreshold(float thresh)
           
protected  void setTier(TierProperty tier)
           
protected  void setTierName(java.lang.String tier)
           
 void setURLString(java.lang.String str)
           
 void setUtrColor(java.awt.Color color)
           
 void setWarnOnEdit(boolean warn)
           
static java.awt.Color toColour(java.lang.String colourStr)
           
static java.awt.Color toColour(java.lang.String colourStr, java.awt.Color defaultColour)
           
 java.lang.String toString()
           
 boolean typeEquals(java.lang.String typeName)
           
 boolean warnOnEdit()
           
 void write(java.io.PrintWriter out)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static final org.apache.log4j.Logger logger

DEFAULT_COLOR

public static java.awt.Color DEFAULT_COLOR

DEFAULT_STYLE

public static java.lang.String DEFAULT_STYLE

midBlue

public static java.awt.Color midBlue

midRed

public static java.awt.Color midRed

blueGreen

public static java.awt.Color blueGreen

brown

public static java.awt.Color brown

GRP_GENE

public static final java.lang.Integer GRP_GENE

GRP_HOMOLOGY

public static final java.lang.Integer GRP_HOMOLOGY

GRP_SINGLE

public static final java.lang.Integer GRP_SINGLE

groupTypes

public static java.util.Hashtable groupTypes

columns

protected java.util.Vector columns

default_columns

public static java.util.Vector default_columns

sortProperty

protected java.lang.String sortProperty

reverseSort

protected boolean reverseSort

colourHash

public static java.util.Hashtable colourHash

type

protected java.lang.String type

tiername

protected java.lang.String tiername

tier

protected TierProperty tier

analysis_types

protected java.util.Vector analysis_types

style

protected java.lang.String style

colour

protected java.awt.Color colour

usescore

protected boolean usescore

minScore

protected float minScore

maxScore

protected float maxScore

minWidth

protected int minWidth

thresholdScore

protected float thresholdScore

URLString

protected java.lang.String URLString

groupFlag

protected java.lang.Integer groupFlag

recentDate

protected java.util.Date recentDate

comments

protected java.util.Vector comments

groupFlagSet

protected boolean groupFlagSet
Constructor Detail

FeatureProperty

public FeatureProperty(TierProperty tier,
                       java.lang.String type,
                       java.util.Vector anal_types,
                       java.awt.Color colour,
                       java.lang.String style,
                       boolean usescore,
                       float min,
                       float max)

FeatureProperty

public FeatureProperty(TierProperty tier,
                       java.lang.String type,
                       java.util.Vector anal_types)

FeatureProperty

public FeatureProperty(FeatureProperty from)

FeatureProperty

public FeatureProperty(FeatureProperty from,
                       boolean cloneTier)
                throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException

FeatureProperty

public FeatureProperty(TierProperty tier,
                       java.lang.String type,
                       java.util.Vector anal_types,
                       java.awt.Color colour,
                       java.lang.String style)

FeatureProperty

public FeatureProperty(TierProperty tier,
                       java.lang.String type,
                       java.util.Vector anal_types,
                       java.awt.Color colour)

FeatureProperty

public FeatureProperty()
Method Detail

setTierName

protected void setTierName(java.lang.String tier)

getTierName

protected java.lang.String getTierName()

setTier

protected void setTier(TierProperty tier)

getTier

public TierProperty getTier()

isAnnotationType

public boolean isAnnotationType()

getSizeByScore

public boolean getSizeByScore()

setSizeByScore

public void setSizeByScore(boolean usescore,
                           boolean isTemporary)

setSizeByScore

public void setSizeByScore(boolean usescore)

getThreshold

public float getThreshold()

setThreshold

public void setThreshold(float thresh)

setDisplayType

public void setDisplayType(java.lang.String type)

setDisplayType

public void setDisplayType(java.lang.String type,
                           boolean temporary)

getDisplayType

public java.lang.String getDisplayType()

getRecentDate

public java.util.Date getRecentDate()

setRecentDate

public void setRecentDate(java.lang.String dateString)

inheritWarnOnEdit

public void inheritWarnOnEdit(boolean warn)
Initially, the value of warnonedit is inherited from the parent tier--may later be overridden.


warnOnEdit

public boolean warnOnEdit()

setWarnOnEdit

public void setWarnOnEdit(boolean warn)

setIdFormat

public void setIdFormat(java.lang.String idFormat)
Set regular expression String that describes id format for type


getIdFormat

public java.lang.String getIdFormat()
Regular expression that describes format for ID, null if not set


setIdPrefix

public void setIdPrefix(java.lang.String idPrefix)
id prefix is not a regular expression Set String which describe id prefix for the type used by ChadoJdbcNameAdapter


getIdPrefix

public java.lang.String getIdPrefix()
Get the id prefix


setChromosomeFormat

public void setChromosomeFormat(java.lang.String chromosomeFormat)
Set chromosome Format This is a regular expression to get the chromosome number. used by ChadoJdbcNameAdapter


getChromosomeFormat

public java.lang.String getChromosomeFormat()
Get chromosome Prefix


setAnnotType

public void setAnnotType(java.lang.String annot_type)
Type of annotation this result creates, by default


getAnnotType

public java.lang.String getAnnotType()
Type of annotation this result creates, by default


getDefaultAnnotType

public static java.lang.String getDefaultAnnotType()
Making default annotType "gene". It actually already sort of is in that feats with null annotTypes end up as genes (due to a default in AnnotatedFeature). And null makes no sense as an annotType unless tiers io requires an annot type or annot editor disallows making an annot with no annot type, neither of which are the case MG 9.19.05 - this could be configurable?


setAnalysisTypes

protected void setAnalysisTypes(java.util.Vector anal_types)

addAnalysisType

public void addAnalysisType(java.lang.String analysis)

getAnalysisTypes

public java.util.Vector getAnalysisTypes()
An analysis type is what comes from "datatype" in the tiers file. There can be more than one data/analysis type per FeatProp. These map to SeqFeatures feature types. perhaps this should be renamed getFeatureTypes?


getAnalysisTypesSize

public int getAnalysisTypesSize()

getAnalysisType

public java.lang.String getAnalysisType(int i)

setStyle

public void setStyle(java.lang.String style,
                     boolean isTemporary)

setStyle

public void setStyle(java.lang.String style)

getStyle

public java.lang.String getStyle()

setColour

public void setColour(java.awt.Color colour,
                      boolean temporary)

setColour

public void setColour(java.awt.Color colour)

setUtrColor

public void setUtrColor(java.awt.Color color)

toColour

public static java.awt.Color toColour(java.lang.String colourStr)

toColour

public static java.awt.Color toColour(java.lang.String colourStr,
                                      java.awt.Color defaultColour)

parseColour

public static java.awt.Color parseColour(java.lang.String colourStr)
                                  throws java.lang.NumberFormatException
Throws:
java.lang.NumberFormatException

getGroupFlagAsString

public java.lang.String getGroupFlagAsString()

getColourAsString

public java.lang.String getColourAsString()

getColourAsString

public java.lang.String getColourAsString(java.awt.Color colour)

getKeyFromValue

public java.lang.String getKeyFromValue(java.util.Hashtable table,
                                        java.lang.Object value)

getColour

public java.awt.Color getColour()

getUtrColor

public java.awt.Color getUtrColor()
For DrawableGeneSeqFeature that colors utrs


getProblematicColor

public java.awt.Color getProblematicColor()

getFinishedColor

public java.awt.Color getFinishedColor()

getColumns

public java.util.Vector getColumns()

getColumns

public java.util.Vector getColumns(boolean use_default)

setColumns

public void setColumns(java.util.Vector columns)

addColumn

public void addColumn(ColumnProperty column)

getSortProperty

public java.lang.String getSortProperty()

setSortProperty

public void setSortProperty(java.lang.String sort_by)

getReverseSort

public boolean getReverseSort()

setReverseSort

public void setReverseSort(boolean reverse)

setMaxScore

public void setMaxScore(float max,
                        boolean isTemporary)

setMaxScore

public void setMaxScore(float max)

setMinScore

public void setMinScore(float min,
                        boolean isTemporary)

setMinScore

public void setMinScore(float min)

setMinWidth

public void setMinWidth(int min)

setURLString

public void setURLString(java.lang.String str)

setGroupFlag

public void setGroupFlag(java.lang.String grpStr)

getGroupFlag

public java.lang.Integer getGroupFlag()

getURLString

public java.lang.String getURLString()

getMaxScore

public float getMaxScore()

getMinScore

public float getMinScore()

getMinWidth

public int getMinWidth()

write

public void write(java.io.PrintWriter out)
           throws java.io.IOException
Throws:
java.io.IOException

quoteIfSpace

protected java.lang.String quoteIfSpace(java.lang.String str)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
this needs to be a deep clone not a shallow one

Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

typeEquals

public boolean typeEquals(java.lang.String typeName)

addComment

protected void addComment(java.lang.String comment)

getComments

protected java.util.Vector getComments()

getNameAdapterString

public java.lang.String getNameAdapterString()

createNameAdapter

public ApolloNameAdapterI createNameAdapter()

hasNonDefaultNameAdapter

public boolean hasNonDefaultNameAdapter()
Has nameadapter if this is an annotation tier


setOverlapper

public void setOverlapper(java.lang.String str)
Return null if no tiername or tiername is not "annotation"


setOverlapperIfNotSet

public void setOverlapperIfNotSet(java.lang.String str)

hasOverlapper

public boolean hasOverlapper()
Has overlapper if this is an annotation tier


getOverlapper

public OverlapI getOverlapper()

createClassFromName

protected java.lang.Object createClassFromName(java.lang.String str)

createNameFromClass

public java.lang.String createNameFromClass(java.lang.Object cl)
Given a class, e.g. apollo.config.FlyNameAdapter@1b5a5cf, return the simple string that names that class (FlyNameAdapter)


isSyntenyLinked

public boolean isSyntenyLinked()
Return true if feat prop is a synteny link to another species


getLinkType

public LinkType getLinkType()
Return LinkType - default LinkType.NO_LINK (not linked) LinkType describes how FeatureProperty links to other species


getLinkSpecies1

public java.lang.String getLinkSpecies1()

getLinkSpecies2

public java.lang.String getLinkSpecies2()

getNumberOfLevels

public int getNumberOfLevels()

isOneLevel

public boolean isOneLevel()

toString

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