owltools.gaf.rules
Class AnnotationRulesEngine.AnnotationRulesEngineResult

java.lang.Object
  extended by owltools.gaf.rules.AnnotationRulesEngine.AnnotationRulesEngineResult
Enclosing class:
AnnotationRulesEngine

public static class AnnotationRulesEngine.AnnotationRulesEngineResult
extends Object

Results for a run of the AnnotationRulesEngine.


Method Summary
 int countViolations(AnnotationRuleViolation.ViolationType type)
           
 int getErrorCount()
           
 int getRecommendationCount()
           
 List<String> getRules()
           
 List<AnnotationRuleViolation.ViolationType> getTypes()
           
 Map<String,List<AnnotationRuleViolation>> getViolations(AnnotationRuleViolation.ViolationType type)
          Retrieve all violations for a given AnnotationRuleViolation.ViolationType.
 int getWarningCount()
           
 boolean hasErrors()
           
 boolean hasRecommendations()
           
 boolean hasType(AnnotationRuleViolation.ViolationType type)
           
 boolean hasWarnings()
           
 boolean isEmpty()
           
static void renderViolations(AnnotationRulesEngine.AnnotationRulesEngineResult result, PrintWriter writer)
          A simple tab delimited print-out of the result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasErrors

public boolean hasErrors()
Returns:
true, if there is at least one violation with AnnotationRuleViolation.ViolationType.Error.

hasWarnings

public boolean hasWarnings()
Returns:
true, if there is at least one violation with AnnotationRuleViolation.ViolationType.Warning.

hasRecommendations

public boolean hasRecommendations()
Returns:
true, if there is at least one violation with AnnotationRuleViolation.ViolationType.Recommendation.

hasType

public boolean hasType(AnnotationRuleViolation.ViolationType type)
Parameters:
type -
Returns:
true, if there is at least one violation with given type

getTypes

public List<AnnotationRuleViolation.ViolationType> getTypes()
Returns:
list of used AnnotationRuleViolation.ViolationType in this result.

getErrorCount

public int getErrorCount()
Returns:
number of errors

getWarningCount

public int getWarningCount()
Returns:
number of warnings

getRecommendationCount

public int getRecommendationCount()
Returns:
number of recommendations

countViolations

public int countViolations(AnnotationRuleViolation.ViolationType type)
Parameters:
type -
Returns:
number of violations of given type.

isEmpty

public boolean isEmpty()
Returns:
true, if there is no AnnotationRuleViolation in this result.

getRules

public List<String> getRules()
Returns:
a sorted list of all rule IDs for which there are reports.

getViolations

public Map<String,List<AnnotationRuleViolation>> getViolations(AnnotationRuleViolation.ViolationType type)
Retrieve all violations for a given AnnotationRuleViolation.ViolationType.

Parameters:
type -
Returns:
map or null

renderViolations

public static void renderViolations(AnnotationRulesEngine.AnnotationRulesEngineResult result,
                                    PrintWriter writer)
A simple tab delimited print-out of the result.

Parameters:
result -
writer -


Copyright © 2010-2012. All Rights Reserved.