1 6 7 package com.hp.hpl.jena.db.test; 8 9 import com.hp.hpl.jena.db.*; 10 import com.hp.hpl.jena.graph.*; 11 import com.hp.hpl.jena.graph.test.*; 12 import com.hp.hpl.jena.shared.*; 13 14 import junit.framework.*; 15 16 21 22 public class TestReifier extends AbstractTestReifier { 23 24 private int count; 25 private Graph properties; 26 private IDBConnection con; 27 28 public TestReifier( String name ) 29 { super(name); } 30 31 34 public TestReifier( Class graphClass, String name, ReificationStyle style ) 35 { super( name ); } 36 37 public static TestSuite suite() { 38 return MetaTestGraph.suite( TestReifier.class, LocalGraphRDB.class ); 39 } 40 41 49 public class LocalGraphRDB extends GraphRDB 50 { 51 public LocalGraphRDB( ReificationStyle style ) 52 { super( con, "testGraph-" + count ++, properties, styleRDB( style ), true ); } 53 } 54 55 public void setUp() 56 { con = TestConnection.makeAndCleanTestConnection(); 57 properties = con.getDefaultModelProperties().getGraph(); } 58 59 public void tearDown() throws Exception 60 { con.close(); } 61 62 public Graph getGraph( ReificationStyle style ) 63 { return new LocalGraphRDB( style ); } 64 65 } 66 67 96 | Popular Tags |