|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hackystat.projectbrowser.page.projectportfolio.detailspanel.chart.StreamParticipationClassifier
public class StreamParticipationClassifier
Classify stream into 3 categories: GOOD, AVERAGE and POOR, according to the participation of members.
Field Summary | |
---|---|
static java.lang.String |
name
Name of this classifier. |
Constructor Summary | |
---|---|
StreamParticipationClassifier(double memberPercentage,
double thresholdValue,
double frequencyPercentage,
boolean scaleWithGranularity)
|
Method Summary | |
---|---|
org.apache.wicket.markup.html.panel.Panel |
getConfigurationPanel(java.lang.String id)
Return the panel for users to configure this stream trend classifer. |
double |
getFrequencyPercentage()
|
double |
getMemberPercentage()
|
java.lang.String |
getName()
|
PortfolioCategory |
getStreamCategory(MiniBarChart chart)
Parse the given MiniBarChart and produce a StreamCategory result. |
double |
getThresholdValue()
|
PortfolioCategory |
getValueCategory(double value)
Return the category of the given value. |
void |
saveSetting(Measures.Measure measure)
Save classifier's setting into the given Measures.Measure instance. |
void |
setFrequencyPercentage(double frequencyPercentage)
|
void |
setMemberPercentage(double memberPercentage)
|
void |
setThresholdValue(double thresholdValue)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String name
Constructor Detail |
---|
public StreamParticipationClassifier(double memberPercentage, double thresholdValue, double frequencyPercentage, boolean scaleWithGranularity)
memberPercentage
- the memberPercentage
to set.thresholdValue
- the thresholdValue
to set.frequencyPercentage
- the frequencyPercentage
to set.scaleWithGranularity
- the scaleWithGranularity to set.Method Detail |
---|
public PortfolioCategory getStreamCategory(MiniBarChart chart)
memberPercentage
members who contribute value higher
than thresholdValue
in more than frequencyPercentage
of time, the stream will
be consider as GOOD.
If there are not enough active members to get a GOOD, but the merged stream satisfies
the GOOD criteria except member percentage, the stream will be considered as AVERAGE.
Otherwise, it will consider as POOR.
getStreamCategory
in interface StreamClassifier
chart
- the input chart
public void setMemberPercentage(double memberPercentage)
memberPercentage
- the memberPercentage to setpublic double getMemberPercentage()
public void setThresholdValue(double thresholdValue)
thresholdValue
- the thresholdValue to setpublic double getThresholdValue()
public void setFrequencyPercentage(double frequencyPercentage)
frequencyPercentage
- the frequencyPercentage to setpublic double getFrequencyPercentage()
public org.apache.wicket.markup.html.panel.Panel getConfigurationPanel(java.lang.String id)
getConfigurationPanel
in interface StreamClassifier
id
- The Wicket component id.
public PortfolioCategory getValueCategory(double value)
getValueCategory
in interface StreamClassifier
value
- the given value.
PortfolioCategory
resultpublic java.lang.String getName()
getName
in interface StreamClassifier
public void saveSetting(Measures.Measure measure)
Measures.Measure
instance.
saveSetting
in interface StreamClassifier
measure
- the given Measures.Measure
instance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |