本文整理汇总了Java中com.hp.hpl.jena.sparql.engine.binding.BindingMap类的典型用法代码示例。如果您正苦于以下问题:Java BindingMap类的具体用法?Java BindingMap怎么用?Java BindingMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BindingMap类属于com.hp.hpl.jena.sparql.engine.binding包,在下文中一共展示了BindingMap类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: makeBinding
import com.hp.hpl.jena.sparql.engine.binding.BindingMap; //导入依赖的package包/类
public Binding makeBinding(ResultRow row) {
if (conditionColumn != null) {
String value = row.get(conditionColumn);
if (value == null || "false".equals(value) || "0".equals(value) || "".equals(value)) {
return null;
}
}
BindingMap result = new BindingHashMap();
for (Var variableName: nodeMakers.keySet()) {
Node node = nodeMakers.get(variableName).makeNode(row);
if (node == null) {
return null;
}
result.add(Var.alloc(variableName), node);
}
return result;
}
开发者ID:d2rq,项目名称:r2rml-kit,代码行数:18,代码来源:BindingMaker.java
示例2: makeBinding
import com.hp.hpl.jena.sparql.engine.binding.BindingMap; //导入依赖的package包/类
public Binding makeBinding(ResultRow row) {
if (condition != null) {
String value = row.get(condition);
if (value == null || "false".equals(value) || "0".equals(value) || "".equals(value)) {
return null;
}
}
BindingMap result = new BindingHashMap();
for (Var variableName: nodeMakers.keySet()) {
Node node = nodeMakers.get(variableName).makeNode(row);
if (node == null) {
return null;
}
result.add(Var.alloc(variableName), node);
}
return result;
}
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:18,代码来源:BindingMaker.java
示例3: convertToBindings
import com.hp.hpl.jena.sparql.engine.binding.BindingMap; //导入依赖的package包/类
/** Convert rows to bindings for a give parent, that may, or may not,
* have equivalent bindings of variables in the rows */
private static Iterator<Binding> convertToBindings(Iterator<Row<NodeId>> iter, final Binding parent, final NodeTable nodeTable) {
Transform<Row<NodeId>, Binding> conv = new Transform<Row<NodeId>, Binding>() {
@Override
public Binding convert(Row<NodeId> row) {
if ( parent.isEmpty() )
return new BindingRow(row, nodeTable) ;
// Temporary fix. Proper fix is to change BindingBase to allow multiple occurrences in a controlled way.
BindingMap b = BindingFactory.create() ;
if ( ! parent.isEmpty() ) {
for ( Iterator<Var> vars = parent.vars() ; vars.hasNext() ; ) {
Var v = vars.next() ;
if ( ! row.contains(v) )
b.add(v, parent.get(v)) ;
}
}
return new BindingRow(b, row, nodeTable) ;
}
} ;
return Iter.map(iter, conv) ;
}
开发者ID:afs,项目名称:quack,代码行数:24,代码来源:OpExecutorQuackTDB.java
示例4: toBinding
import com.hp.hpl.jena.sparql.engine.binding.BindingMap; //导入依赖的package包/类
private Binding toBinding(String[] vars, String string, String separator) {
String[] values = string.split(separator);
final BindingMap binding = BindingFactory.create();
for (int i = 0; i < vars.length; i++) {
binding.add(Var.alloc(vars[i]), toNode(values[i]));
}
return binding;
}
开发者ID:semiotproject,项目名称:semiot-platform,代码行数:9,代码来源:CSPARQL.java
注:本文中的com.hp.hpl.jena.sparql.engine.binding.BindingMap类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论