owltools.gaf.rules
Class AbstractAnnotationRule

java.lang.Object
  extended by owltools.gaf.rules.AbstractAnnotationRule
All Implemented Interfaces:
AnnotationRule
Direct Known Subclasses:
AnnotationRegularExpressionFromXMLRule, AnnotationTaxonRule, BasicChecksRule, GenericReasonerValidationCheck, GoBindingCheckWithFieldRule, GoClassReferenceAnnotationRule, GoICAnnotationRule, GoIDAAnnotationRule, GoIEPRestrictionsRule, GoIPIAnnotationRule, GoIPICatalyticActivityRestrictionsRule, GoMultipleTaxonRule, GoNDAnnotationRule, GoNoHighLevelTermAnnotationRule, GoNoISSProteinBindingRule, GOReciprocalAnnotationRule

public abstract class AbstractAnnotationRule
extends Object
implements AnnotationRule


Constructor Summary
AbstractAnnotationRule()
           
 
Method Summary
 Date getDate()
          Get the status date of this rule.
 String getDescription()
          Get the description for a rule.
 Date getGrandFatheringDate()
          Return the cut-off date for grand fathering the rule.
 String getName()
          Return the name of the rule.
 String getRuleId()
          Get the ruleId.
 Set<AnnotationRuleViolation> getRuleViolations(GafDocument gafDoc)
          Given a whole GafDocument , find the set of violations using the rule
abstract  Set<AnnotationRuleViolation> getRuleViolations(GeneAnnotation a)
          Given an annotation, find the set of violations using the rule
 Set<AnnotationRuleViolation> getRuleViolations(OWLGraphWrapper graph)
          Given a whole GafDocument in OWL, find the set of violations using the rule
 String getStatus()
          Get the status of this rule.
 boolean hasGrandFathering()
          Indicate the use of grand fathering, meaning do not report violations for this rule for annotations older than the given grand fathering date cut-off.
 boolean isAnnotationLevel()
           
 boolean isDocumentLevel()
           
 boolean isOwlDocumentLevel()
           
 void setDate(Date date)
          Set the status date for this rule.
 void setDescription(String description)
          Set the description for this rule.
 void setGrandFatheringDate(Date date)
          Set the cut-off date for grand fathering the rule.
 void setName(String name)
          Set the name for the rule.
 void setRuleId(String ruleId)
          Set the rule id
 void setStatus(String status)
          Set the status for this rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAnnotationRule

public AbstractAnnotationRule()
Method Detail

getRuleViolations

public abstract Set<AnnotationRuleViolation> getRuleViolations(GeneAnnotation a)
Description copied from interface: AnnotationRule
Given an annotation, find the set of violations using the rule

Specified by:
getRuleViolations in interface AnnotationRule
Parameters:
a - annotation
Returns:
set of violations
See Also:
AnnotationRule.isAnnotationLevel()

getRuleViolations

public Set<AnnotationRuleViolation> getRuleViolations(GafDocument gafDoc)
Description copied from interface: AnnotationRule
Given a whole GafDocument , find the set of violations using the rule

Specified by:
getRuleViolations in interface AnnotationRule
Returns:
set of violations
See Also:
AnnotationRule.isDocumentLevel()

getRuleViolations

public Set<AnnotationRuleViolation> getRuleViolations(OWLGraphWrapper graph)
Description copied from interface: AnnotationRule
Given a whole GafDocument in OWL, find the set of violations using the rule

Specified by:
getRuleViolations in interface AnnotationRule
Returns:
set of violations
See Also:
AnnotationRule.isOwlDocumentLevel()

setRuleId

public void setRuleId(String ruleId)
Description copied from interface: AnnotationRule
Set the rule id

Specified by:
setRuleId in interface AnnotationRule

getRuleId

public String getRuleId()
Description copied from interface: AnnotationRule
Get the ruleId.

Specified by:
getRuleId in interface AnnotationRule
Returns:
ruleId

getName

public String getName()
Description copied from interface: AnnotationRule
Return the name of the rule.

Specified by:
getName in interface AnnotationRule
Returns:
name

setName

public void setName(String name)
Description copied from interface: AnnotationRule
Set the name for the rule.

Specified by:
setName in interface AnnotationRule

getDate

public Date getDate()
Description copied from interface: AnnotationRule
Get the status date of this rule.

Specified by:
getDate in interface AnnotationRule
Returns:
status date or null

setDate

public void setDate(Date date)
Description copied from interface: AnnotationRule
Set the status date for this rule.

Specified by:
setDate in interface AnnotationRule

getStatus

public String getStatus()
Description copied from interface: AnnotationRule
Get the status of this rule.

Specified by:
getStatus in interface AnnotationRule
Returns:
status

setStatus

public void setStatus(String status)
Description copied from interface: AnnotationRule
Set the status for this rule.

Specified by:
setStatus in interface AnnotationRule

getDescription

public String getDescription()
Description copied from interface: AnnotationRule
Get the description for a rule. May be null.

Specified by:
getDescription in interface AnnotationRule
Returns:
string or null

setDescription

public void setDescription(String description)
Description copied from interface: AnnotationRule
Set the description for this rule.

Specified by:
setDescription in interface AnnotationRule

isAnnotationLevel

public boolean isAnnotationLevel()
Specified by:
isAnnotationLevel in interface AnnotationRule
Returns:
true if the rule has to be applied to a GeneAnnotation.
See Also:
AnnotationRule.getRuleViolations(GeneAnnotation)

isDocumentLevel

public boolean isDocumentLevel()
Specified by:
isDocumentLevel in interface AnnotationRule
Returns:
true if the rule has to be applied to the whole GA document.
See Also:
AnnotationRule.getRuleViolations(GafDocument)

isOwlDocumentLevel

public boolean isOwlDocumentLevel()
Specified by:
isOwlDocumentLevel in interface AnnotationRule
Returns:
true if the rule has to be applied to the whole OWL document.
See Also:
AnnotationRule.getRuleViolations(OWLGraphWrapper)

hasGrandFathering

public boolean hasGrandFathering()
Description copied from interface: AnnotationRule
Indicate the use of grand fathering, meaning do not report violations for this rule for annotations older than the given grand fathering date cut-off.

Specified by:
hasGrandFathering in interface AnnotationRule
Returns:
true, if the rule requires grand fathering
See Also:
AnnotationRule.getGrandFatheringDate()

getGrandFatheringDate

public Date getGrandFatheringDate()
Description copied from interface: AnnotationRule
Return the cut-off date for grand fathering the rule. Has only a valid value if AnnotationRule.hasGrandFathering() is true.

Specified by:
getGrandFatheringDate in interface AnnotationRule
Returns:
date
See Also:
AnnotationRule.hasGrandFathering()

setGrandFatheringDate

public void setGrandFatheringDate(Date date)
Description copied from interface: AnnotationRule
Set the cut-off date for grand fathering the rule. A null value deactivates the grand fathering.

Specified by:
setGrandFatheringDate in interface AnnotationRule
See Also:
AnnotationRule.hasGrandFathering()


Copyright © 2010-2013. All Rights Reserved.