/*
* Copyright Aduna (http://www.aduna-software.com/) (c) 2007-2008.
*
* Licensed under the Aduna BSD-style license.
*/
package org.openrdf.sail.nativerdf;
import java.io.File;
import java.io.IOException;
import info.aduna.io.FileUtil;
import org.openrdf.repository.RDFSchemaRepositoryConnectionTest;
import org.openrdf.repository.Repository;
import org.openrdf.repository.sail.SailRepository;
import org.openrdf.sail.inferencer.fc.ForwardChainingRDFSInferencer;
public class RDFSchemaNativeRepositoryConnectionTest extends RDFSchemaRepositoryConnectionTest {
private File dataDir;
public RDFSchemaNativeRepositoryConnectionTest(String name) {
super(name);
}
@Override
protected Repository createRepository()
throws IOException
{
dataDir = FileUtil.createTempDir("nativestore");
return new SailRepository(new ForwardChainingRDFSInferencer(new NativeStore(dataDir, "spoc")));
}
@Override
protected void tearDown()
throws Exception
{
try {
super.tearDown();
}
finally {
FileUtil.deleteDir(dataDir);
}
}
}