本文整理匯總了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();
}