com.hp.hpl.jena.reasoner.rdfsReasoner1
Class BaseFRule

java.lang.Object
  extended bycom.hp.hpl.jena.reasoner.rdfsReasoner1.BaseFRule
Direct Known Subclasses:
AssertFRule, BackchainFRule

public class BaseFRule
extends java.lang.Object

Base class for forward rules. Holds a head pattern (which will be matched against the triple store) and an array of body patterns. The body patterns can be instantiated following a successful head match and then processed be descendant class.

Version:
$Revision: 1.4 $ on $Date: 2003/04/15 21:22:35 $
Author:
Dave Reynolds

Constructor Summary
BaseFRule(java.lang.String spec)
          Constructor
BaseFRule(TriplePattern head, TriplePattern[] body)
          Constructor
 
Method Summary
 void bindAndFire(Triple value, RDFSInfGraph reasoner)
          Match the rule against a single triple.
 TriplePattern getHead()
          Returns the head.
static Triple parseTriple(java.lang.String spec)
          Assistant method to parse a string into a triple
static java.util.List parseTripleSequence(java.lang.String spec)
          Assistant method to parse a string into a sequence oftriple patterns.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseFRule

public BaseFRule(TriplePattern head,
                 TriplePattern[] body)
Constructor


BaseFRule

public BaseFRule(java.lang.String spec)
Constructor

Method Detail

bindAndFire

public void bindAndFire(Triple value,
                        RDFSInfGraph reasoner)
Match the rule against a single triple. Instantiating the variables then firing the consequent action.


parseTriple

public static Triple parseTriple(java.lang.String spec)
Assistant method to parse a string into a triple


parseTripleSequence

public static java.util.List parseTripleSequence(java.lang.String spec)
Assistant method to parse a string into a sequence oftriple patterns. The patterns may be separated by "<-", "->" or "|" strings.

Returns:
a list of TriplePatterns

getHead

public TriplePattern getHead()
Returns the head.

Returns:
TriplePattern


Copyright © 2001-2003 Hewlett-Packard. All Rights Reserved.