本文整理汇总了Java中org.openrdf.model.impl.SimpleValueFactory类的典型用法代码示例。如果您正苦于以下问题:Java SimpleValueFactory类的具体用法?Java SimpleValueFactory怎么用?Java SimpleValueFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SimpleValueFactory类属于org.openrdf.model.impl包,在下文中一共展示了SimpleValueFactory类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testRecordNumber
import org.openrdf.model.impl.SimpleValueFactory; //导入依赖的package包/类
@Test
public void testRecordNumber() throws IOException,
QueryEvaluationException, MalformedQueryException,
RepositoryException, SailException {
assertTrue(newFile.exists());
BEDFileStore rep = new BEDFileStore();
rep.setDataDir(dataDir);
rep.setBedFile(newFile);
rep.setValueFactory(new SimpleValueFactory());
SailRepository sr = new SailRepository(rep);
rep.initialize();
TupleQuery pTQ = sr.getConnection().prepareTupleQuery(
QueryLanguage.SPARQL, query1);
TupleQueryResult eval = pTQ.evaluate();
for (int i = 0; i < 1; i++) {
assertTrue(eval.hasNext());
assertNotNull(eval.next());
}
assertFalse(eval.hasNext());
}
示例2: testRecordNumberViaCount
import org.openrdf.model.impl.SimpleValueFactory; //导入依赖的package包/类
@Test
public void testRecordNumberViaCount() throws IOException,
QueryEvaluationException, MalformedQueryException,
RepositoryException, SailException {
assertTrue(newFile.exists());
BEDFileStore rep = new BEDFileStore();
rep.setDataDir(dataDir);
rep.setBedFile(newFile);
rep.setValueFactory(new SimpleValueFactory());
SailRepository sr = new SailRepository(rep);
rep.initialize();
TupleQuery pTQ = sr.getConnection().prepareTupleQuery(
QueryLanguage.SPARQL, query2);
TupleQueryResult eval = pTQ.evaluate();
assertTrue(eval.hasNext());
BindingSet next = eval.next();
assertNotNull(next);
assertEquals("9", next.getBinding("countScore").getValue().stringValue());
}
示例3: testAverageReadLengthNumber
import org.openrdf.model.impl.SimpleValueFactory; //导入依赖的package包/类
@Test
public void testAverageReadLengthNumber() throws IOException,
QueryEvaluationException, MalformedQueryException,
RepositoryException, SailException {
assertTrue(newFile.exists());
BEDFileStore rep = new BEDFileStore();
rep.setDataDir(dataDir);
rep.setBedFile(newFile);
rep.setValueFactory(new SimpleValueFactory());
SailRepository sr = new SailRepository(rep);
rep.initialize();
TupleQuery pTQ = sr.getConnection().prepareTupleQuery(
QueryLanguage.SPARQL, query3);
TupleQueryResult eval = pTQ.evaluate();
assertTrue(eval.hasNext());
BindingSet next = eval.next();
assertNotNull(next);
Binding lb = next.getBinding("avgLength");
assertEquals("1166", lb.getValue()
.stringValue());
}
示例4: getValueFactory
import org.openrdf.model.impl.SimpleValueFactory; //导入依赖的package包/类
public ValueFactory getValueFactory() {
return SimpleValueFactory.getInstance();
}