當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。