org.deri.iris.rules.stratification
Class LocalStratificationDecorator

java.lang.Object
  extended by org.deri.iris.rules.stratification.LocalStratificationDecorator

public class LocalStratificationDecorator
extends Object

A rule adaptor that decorates a rule with adornments for local stratification.


Nested Class Summary
static class LocalStratificationDecorator.Adornment
          An immutable adornment for a single term of a rule head.
static class LocalStratificationDecorator.MatchType
          Indication of how well a term (or rule head) matches another term (or rule head).
 
Constructor Summary
LocalStratificationDecorator(IRule rule, List<LocalStratificationDecorator.Adornment> adornments)
          Constructor.
 
Method Summary
 List<LocalStratificationDecorator.Adornment> getAdornments()
          Get the adornments for this rule.
 IRule getRule()
          Get the decorated rule.
 LocalStratificationDecorator.MatchType match(ITuple tuple)
          Indicate how well the given tuple (of constants and variables) matches the adornments for this rule.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalStratificationDecorator

public LocalStratificationDecorator(IRule rule,
                                    List<LocalStratificationDecorator.Adornment> adornments)
Constructor. For use when the adornment values are already calculated.

Parameters:
rule - The rule to decorate.
adornments - The list of adornments.
Method Detail

match

public LocalStratificationDecorator.MatchType match(ITuple tuple)
Indicate how well the given tuple (of constants and variables) matches the adornments for this rule.

Parameters:
tuple - The tuple to compare with.
Returns:
The match type.

getRule

public IRule getRule()
Get the decorated rule.

Returns:
The rule.

getAdornments

public List<LocalStratificationDecorator.Adornment> getAdornments()
Get the adornments for this rule.

Returns:
The list of adornments.

toString

public String toString()
Overrides:
toString in class Object