org.eclipse.actf.visualization.eval.guideline
Class GuidelineHolder

java.lang.Object
  extended by org.eclipse.actf.visualization.eval.guideline.GuidelineHolder

public class GuidelineHolder
extends Object

Utility class to manage guideline, metrics, and evaluation items.


Method Summary
 void addGuidelineSelectionChangedListener(IGuidelineSlectionChangedListener listener)
          Add IGuidelineSlectionChangedListener to listen user change of a selection of target guidelines and/or metrics.
 boolean[][] getCorrespondingMetricsOfLeafGuideline()
           
 boolean[] getEnabledMetrics()
          Get enabled evaluation metrics
 IEvaluationItem getEvaluationItem(String id)
          Get evaluation item information
 IGuidelineData[] getGuidelineData()
          Get registered guideline information.
 IGuidelineItem getGuidelineItem(String guidelineName, String id)
          Get guideline item information
 String[] getGuidelineNames()
           
 String[] getGuidelineNamesWithLevels()
          Get all guideline name with it's level information.
static GuidelineHolder getInstance()
          Get instance of GuidelineHolder
 IGuidelineData[] getLeafGuidelineData()
          Get registered guideline information.
 String[] getLocalizedMetricsNames()
          Get registered evaluation metrics names (localized).
 Set<IEvaluationItem> getMatchedCheckitemSet()
          Get set of IEvaluationItem matched to current active content and user selection of guidelines/metrics.
 boolean[] getMatchedMetrics()
          Get evaluation metric matched to current environment (active content and user selection)
 String[] getMetricsNames()
          Get registered evaluation metrics names.
 String getTargetMimeType()
           
 SortedSet<ITechniquesItem> getTechniquesItemSet()
           
 Map<String,Set<IProblemItem>> getTechProbMap()
           
 boolean isEnabledMetric(String metricName)
          Check if the target evaluation metric is enabled
 boolean isMatchedCheckItem(IEvaluationItem target)
          Check if the target IEvaluationItem is enabled in current environment (active content and user selection)
 boolean isMatchedGuidelineItem(IGuidelineItem target)
          Deprecated.  
 boolean isMatchedInTopLevel(IGuidelineItem target)
          Deprecated.  
 boolean isMatchedMetric(String metricName)
          Check if the target evaluation metric is enabled in current environment (active content and user selection)
 void removeGuidelineSelectionChangedListener(IGuidelineSlectionChangedListener listener)
          Remove IGuidelineSlectionChangedListener
 void setEnabledGuidelines(String[] guidelineNameArray, String[] levelArray)
          Set enabled guideline items.
 boolean setEnabledGuidelineWithLevels(boolean[] enabledItems)
          Set enabled guideline items.
 boolean setEnabledMetrics(boolean[] enabledMetrics)
          Set enabled evaluation metrics
 void setEnabledMetrics(String[] enabledMetricsStringArray)
          Get enabled evaluation metrics.
 void setTargetMimeType(String currentMimeType)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static GuidelineHolder getInstance()
Get instance of GuidelineHolder

Returns:
instance of GuidelineHolder

getLeafGuidelineData

public IGuidelineData[] getLeafGuidelineData()
Get registered guideline information. If guideline has levels, this method returns all guideline items of each level.

Returns:
all leaf guideline information

getGuidelineData

public IGuidelineData[] getGuidelineData()
Get registered guideline information. This method returns all guideline items (excludes leaf items).

Returns:
all top guideline information

getGuidelineNamesWithLevels

public String[] getGuidelineNamesWithLevels()
Get all guideline name with it's level information.

Returns:
all guideline name with level

getGuidelineItem

public IGuidelineItem getGuidelineItem(String guidelineName,
                                       String id)
Get guideline item information

Parameters:
guidelineName - target guideline name
id - target guideline item ID
Returns:
guideline item information, or null if not available

getEvaluationItem

public IEvaluationItem getEvaluationItem(String id)
Get evaluation item information

Parameters:
id - target ID of evaluation item
Returns:
evaluation item information, or null if not available

setEnabledGuidelineWithLevels

public boolean setEnabledGuidelineWithLevels(boolean[] enabledItems)
Set enabled guideline items.

Parameters:
enabledItems - on/off parameters
Returns:
true (success), false (array size error)

setEnabledGuidelines

public void setEnabledGuidelines(String[] guidelineNameArray,
                                 String[] levelArray)
Set enabled guideline items.

Parameters:
guidelineNameArray - array of name of enabled guideline item
levelArray - array of level of enabled guideline item

setEnabledMetrics

public boolean setEnabledMetrics(boolean[] enabledMetrics)
Set enabled evaluation metrics

Parameters:
enabledMetrics - on/off parameters
Returns:
true (success), false (array size error)

setEnabledMetrics

public void setEnabledMetrics(String[] enabledMetricsStringArray)
Get enabled evaluation metrics.

Parameters:
enabledMetricsStringArray - array of enabled evaluation metrics

getMatchedCheckitemSet

public Set<IEvaluationItem> getMatchedCheckitemSet()
Get set of IEvaluationItem matched to current active content and user selection of guidelines/metrics.

Returns:
set of IEvaluationItem

getMetricsNames

public String[] getMetricsNames()
Get registered evaluation metrics names.

Returns:
evaluation metrics

getLocalizedMetricsNames

public String[] getLocalizedMetricsNames()
Get registered evaluation metrics names (localized).

Returns:
evaluation metrics (localized)

isMatchedCheckItem

public boolean isMatchedCheckItem(IEvaluationItem target)
Check if the target IEvaluationItem is enabled in current environment (active content and user selection)

Parameters:
target - target IEvaluationItem
Returns:
true if the target item is needed to evaluate

isMatchedGuidelineItem

public boolean isMatchedGuidelineItem(IGuidelineItem target)
Deprecated. 

Check if the target IGuidelineItem is enabled in current environment (active content and user selection)

Parameters:
target - target IGuidelineItem
Returns:
true if the target item is enabled

isMatchedInTopLevel

public boolean isMatchedInTopLevel(IGuidelineItem target)
Deprecated. 

Check if at least one of the child levels of target IGuidelineItem is enabled in current environment (active content and user selection)

Parameters:
target - target top level IGuidelineItem
Returns:
true if at least one of the child levels of the target is enabled

isEnabledMetric

public boolean isEnabledMetric(String metricName)
Check if the target evaluation metric is enabled

Parameters:
metricName - target metric
Returns:
true if the target item is needed to evaluate

isMatchedMetric

public boolean isMatchedMetric(String metricName)
Check if the target evaluation metric is enabled in current environment (active content and user selection)

Parameters:
metricName - target metric
Returns:
true if the target item is needed to evaluate

getEnabledMetrics

public boolean[] getEnabledMetrics()
Get enabled evaluation metrics

Returns:
array of enabled evaluation metrics

getMatchedMetrics

public boolean[] getMatchedMetrics()
Get evaluation metric matched to current environment (active content and user selection)

Returns:
array of enabled evaluation metrics

addGuidelineSelectionChangedListener

public void addGuidelineSelectionChangedListener(IGuidelineSlectionChangedListener listener)
Add IGuidelineSlectionChangedListener to listen user change of a selection of target guidelines and/or metrics.

Parameters:
listener - target IGuidelineSlectionChangedListener

removeGuidelineSelectionChangedListener

public void removeGuidelineSelectionChangedListener(IGuidelineSlectionChangedListener listener)
Remove IGuidelineSlectionChangedListener

Parameters:
listener - target IGuidelineSlectionChangedListener

getTargetMimeType

public String getTargetMimeType()
Returns:

setTargetMimeType

public void setTargetMimeType(String currentMimeType)
Parameters:
currentMimeType -

getCorrespondingMetricsOfLeafGuideline

public boolean[][] getCorrespondingMetricsOfLeafGuideline()
Returns:

getGuidelineNames

public String[] getGuidelineNames()
Returns:

toString

public String toString()
Overrides:
toString in class Object

getTechniquesItemSet

public SortedSet<ITechniquesItem> getTechniquesItemSet()

getTechProbMap

public Map<String,Set<IProblemItem>> getTechProbMap()