当前位置: 首页>>代码示例>>Java>>正文


Java SimpleValueFactory类代码示例

本文整理汇总了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());
}
 
开发者ID:JervenBolleman,项目名称:sparql-bed,代码行数:22,代码来源:BEDRepositoryTest.java

示例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());
}
 
开发者ID:JervenBolleman,项目名称:sparql-bed,代码行数:22,代码来源:BEDRepositoryTest.java

示例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());
}
 
开发者ID:JervenBolleman,项目名称:sparql-bed,代码行数:24,代码来源:BEDRepositoryTest.java

示例4: getValueFactory

import org.openrdf.model.impl.SimpleValueFactory; //导入依赖的package包/类
public ValueFactory getValueFactory() {

        return SimpleValueFactory.getInstance();
    }
 
开发者ID:hmottestad,项目名称:FastRdfsForwardChainingSail,代码行数:5,代码来源:FastRdfsForwardChainingSail.java


注:本文中的org.openrdf.model.impl.SimpleValueFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。