本文整理汇总了Java中org.apache.jena.sparql.engine.binding.BindingFactory类的典型用法代码示例。如果您正苦于以下问题:Java BindingFactory类的具体用法?Java BindingFactory怎么用?Java BindingFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BindingFactory类属于org.apache.jena.sparql.engine.binding包,在下文中一共展示了BindingFactory类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: moveToNextBinding
import org.apache.jena.sparql.engine.binding.BindingFactory; //导入依赖的package包/类
@Override
protected Binding moveToNextBinding() {
// we need a binding that's ?s ?p ?o
try {
Triple triple = triples.next();
BindingMap binding = BindingFactory.create();
binding.add(Var.alloc("s"), triple.getSubject());
binding.add(Var.alloc("p"), triple.getPredicate());
binding.add(Var.alloc("o"), triple.getObject());
return binding;
} catch (RiotException e) {
// bug in empty results for describe. this is
// a workaround. TODO
}
return BindingFactory.binding();
}
开发者ID:marklogic,项目名称:marklogic-jena,代码行数:17,代码来源:MarkLogicQueryEngine.java
示例2: createBinding
import org.apache.jena.sparql.engine.binding.BindingFactory; //导入依赖的package包/类
@SafeVarargs
private final Binding createBinding(Pair<Var, Node>... bindings) {
BindingMap map = BindingFactory.create();
for (Pair<Var, Node> binding : bindings) {
map.add(binding.getLeft(), binding.getRight());
}
return map;
}
开发者ID:geneontology,项目名称:minerva,代码行数:9,代码来源:GPADSPARQLExport.java
示例3: match
import org.apache.jena.sparql.engine.binding.BindingFactory; //导入依赖的package包/类
/** Evaluate a BGP : encapsulate for a better/different version */
private static QueryIterator match(Graph source, BasicPattern pattern) {
ExecutionContext execContext = new ExecutionContext(ARQ.getContext(), source, null, null) ;
// Create a chain of triple iterators.
QueryIterator chain = QueryIterSingleton.create(BindingFactory.root(), execContext) ;
for (Triple triple : pattern)
chain = new QueryIterTriplePattern(chain, triple, execContext) ;
return chain ;
}
开发者ID:afs,项目名称:jena-inf-engine,代码行数:10,代码来源:Forwards.java
示例4: moveToNextBinding
import org.apache.jena.sparql.engine.binding.BindingFactory; //导入依赖的package包/类
@Override
protected Binding moveToNextBinding() {
Entry<Node, Node> e = entries.next();
BindingMap b = BindingFactory.create(binding) ;
b.add(var1, e.getKey()) ;
b.add(var2, e.getValue()) ;
return b;
}
开发者ID:afs,项目名称:jena-inf-engine,代码行数:9,代码来源:PFbyTable.java
示例5: addBinding
import org.apache.jena.sparql.engine.binding.BindingFactory; //导入依赖的package包/类
public ValuesClauseBuilder addBinding() {
elm.getRows().add(BindingFactory.create());
return this;
}
开发者ID:IBCNServices,项目名称:OBEP,代码行数:5,代码来源:ValuesClauseBuilder.java
示例6: eval
import org.apache.jena.sparql.engine.binding.BindingFactory; //导入依赖的package包/类
protected Node eval(String expression) {
Expr expr = ExprUtils.parse(expression, prefixes);
return expr.eval(BindingFactory.root(), env).asNode();
}
开发者ID:tarql,项目名称:tarql,代码行数:5,代码来源:FunctionTest.java
注:本文中的org.apache.jena.sparql.engine.binding.BindingFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论