Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.hp.hpl.jena.reasoner.rulesys.test
Class TestFBRules  view TestFBRules download TestFBRules.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bycom.hp.hpl.jena.reasoner.rulesys.test.TestFBRules
All Implemented Interfaces:
junit.framework.Test

public class TestFBRules
extends junit.framework.TestCase

Test suite for the hybrid forward/backward rule system.

Version:
$Revision: 1.40 $ on $Date: 2005/04/12 10:59:02 $

Field Summary
protected  com.hp.hpl.jena.graph.Node a
           
protected  com.hp.hpl.jena.graph.Node b
           
protected  com.hp.hpl.jena.graph.Node c
           
protected  com.hp.hpl.jena.graph.Node C1
           
protected  com.hp.hpl.jena.graph.Node C2
           
protected  com.hp.hpl.jena.graph.Node C3
           
protected  com.hp.hpl.jena.graph.Node d
           
protected static org.apache.commons.logging.Log logger
           
protected  com.hp.hpl.jena.graph.Node n1
           
protected  com.hp.hpl.jena.graph.Node n2
           
protected  com.hp.hpl.jena.graph.Node n3
           
protected  com.hp.hpl.jena.graph.Node n4
           
protected  com.hp.hpl.jena.graph.Node n5
           
protected  com.hp.hpl.jena.graph.Node p
           
protected  com.hp.hpl.jena.graph.Node q
           
protected  com.hp.hpl.jena.graph.Node r
           
protected  com.hp.hpl.jena.graph.Node res
           
protected  com.hp.hpl.jena.graph.Node s
           
protected  com.hp.hpl.jena.graph.Node sC
           
protected  com.hp.hpl.jena.graph.Node sP
           
protected  com.hp.hpl.jena.graph.Node t
           
protected  com.hp.hpl.jena.graph.Node ty
           
protected  com.hp.hpl.jena.graph.Node u
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
TestFBRules(java.lang.String name)
          Boilerplate for junit
 
Method Summary
 com.hp.hpl.jena.reasoner.Reasoner createReasoner(java.util.List rules)
          Override in subclasses to test other reasoners.
private  com.hp.hpl.jena.graph.Node getValue(com.hp.hpl.jena.graph.Graph g, com.hp.hpl.jena.graph.Node s, com.hp.hpl.jena.graph.Node p)
          Helper - returns the single object value for an s/p pair, asserts an error if there is more than one.
 void listFBGraph(java.lang.String message, com.hp.hpl.jena.reasoner.rulesys.FBRuleInfGraph graph)
          Helper function to list the interesting parts of an FBInfGraph.
 void listGraph(com.hp.hpl.jena.graph.Graph g)
          Helper function to list a graph out to logger.info
static junit.framework.TestSuite suite()
          Boilerplate for junit.
 void temp()
          Check cost of creating an empty OWL closure.
 void testBackchain1()
          Test example pure backchaining rules
 void testBackchain2()
          Test complex rule head unification
 void testBackchain3()
          Test restriction example
 void testBuiltins()
          The the minimal machinery for supporting builtins
 void testBuiltins2()
          Test the builtins themselves
 void testClose()
          Test the close operation.
 void testDuplicatesEC4()
          Investigate a suspicious case in the OWL ruleset, is the backchainer returning duplicate values?
 void testEmbeddedFunctors()
          Test functor handling
 void testHybrid1()
          Test example hybrid rule.
 void testHybrid2()
          Test example hybrid rule.
 void testHybridRDFS()
          Test example hybrid rules for rdfs.
 void testHybridRDFS2()
          Test example hybrid rules for rdfs.
 void testMakeInstance()
          Test access to makeInstance machinery from a Brule.
 void testMakeInstanceBug()
          Test case for makeInstance which failed during development.
 void testMakeInstances()
          Test access to makeInstance machinery from a Brule.
 void testNumericFunctors()
          Test numeric functors
 void testParser()
          Check parser extension for f/b distinction.
 void testRebind()
          Test the rebind operation.
 void testRemoveBuiltin()
          The the "remove" builtin
 void testRuleMatcher()
          Minimal rule tester to check basic pattern match, forward style.
 void testSchemaBinding()
          Test schmea partial binding machinery, forward subset.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected static org.apache.commons.logging.Log logger

p

protected com.hp.hpl.jena.graph.Node p

q

protected com.hp.hpl.jena.graph.Node q

n1

protected com.hp.hpl.jena.graph.Node n1

n2

protected com.hp.hpl.jena.graph.Node n2

n3

protected com.hp.hpl.jena.graph.Node n3

n4

protected com.hp.hpl.jena.graph.Node n4

n5

protected com.hp.hpl.jena.graph.Node n5

res

protected com.hp.hpl.jena.graph.Node res

r

protected com.hp.hpl.jena.graph.Node r

s

protected com.hp.hpl.jena.graph.Node s

t

protected com.hp.hpl.jena.graph.Node t

u

protected com.hp.hpl.jena.graph.Node u

a

protected com.hp.hpl.jena.graph.Node a

b

protected com.hp.hpl.jena.graph.Node b

c

protected com.hp.hpl.jena.graph.Node c

d

protected com.hp.hpl.jena.graph.Node d

C1

protected com.hp.hpl.jena.graph.Node C1

C2

protected com.hp.hpl.jena.graph.Node C2

C3

protected com.hp.hpl.jena.graph.Node C3

sP

protected com.hp.hpl.jena.graph.Node sP

sC

protected com.hp.hpl.jena.graph.Node sC

ty

protected com.hp.hpl.jena.graph.Node ty
Constructor Detail

TestFBRules

public TestFBRules(java.lang.String name)
Boilerplate for junit

Method Detail

suite

public static junit.framework.TestSuite suite()
Boilerplate for junit. This is its own test suite


createReasoner

public com.hp.hpl.jena.reasoner.Reasoner createReasoner(java.util.List rules)
Override in subclasses to test other reasoners.


testParser

public void testParser()
Check parser extension for f/b distinction.


testRuleMatcher

public void testRuleMatcher()
Minimal rule tester to check basic pattern match, forward style.


testEmbeddedFunctors

public void testEmbeddedFunctors()
Test functor handling


testBuiltins

public void testBuiltins()
The the minimal machinery for supporting builtins


testSchemaBinding

public void testSchemaBinding()
Test schmea partial binding machinery, forward subset.


testRemoveBuiltin

public void testRemoveBuiltin()
The the "remove" builtin


testRebind

public void testRebind()
Test the rebind operation.


testClose

public void testClose()
Test the close operation.


testBackchain1

public void testBackchain1()
Test example pure backchaining rules


testBackchain2

public void testBackchain2()
Test complex rule head unification


testBackchain3

public void testBackchain3()
Test restriction example


testHybrid1

public void testHybrid1()
Test example hybrid rule.


testHybrid2

public void testHybrid2()
Test example hybrid rule.


testHybridRDFS

public void testHybridRDFS()
Test example hybrid rules for rdfs.


testHybridRDFS2

public void testHybridRDFS2()
Test example hybrid rules for rdfs.


testMakeInstance

public void testMakeInstance()
Test access to makeInstance machinery from a Brule.


testMakeInstances

public void testMakeInstances()
Test access to makeInstance machinery from a Brule.


testMakeInstanceBug

public void testMakeInstanceBug()
Test case for makeInstance which failed during development.


testNumericFunctors

public void testNumericFunctors()
Test numeric functors


testBuiltins2

public void testBuiltins2()
Test the builtins themselves


getValue

private com.hp.hpl.jena.graph.Node getValue(com.hp.hpl.jena.graph.Graph g,
                                            com.hp.hpl.jena.graph.Node s,
                                            com.hp.hpl.jena.graph.Node p)
Helper - returns the single object value for an s/p pair, asserts an error if there is more than one.


testDuplicatesEC4

public void testDuplicatesEC4()
                       throws java.io.IOException
Investigate a suspicious case in the OWL ruleset, is the backchainer returning duplicate values?


temp

public void temp()
Check cost of creating an empty OWL closure.


listGraph

public void listGraph(com.hp.hpl.jena.graph.Graph g)
Helper function to list a graph out to logger.info


listFBGraph

public void listFBGraph(java.lang.String message,
                        com.hp.hpl.jena.reasoner.rulesys.FBRuleInfGraph graph)
Helper function to list the interesting parts of an FBInfGraph.