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


Java BindingSet.getBinding方法代码示例

本文整理汇总了Java中org.eclipse.rdf4j.query.BindingSet.getBinding方法的典型用法代码示例。如果您正苦于以下问题:Java BindingSet.getBinding方法的具体用法?Java BindingSet.getBinding怎么用?Java BindingSet.getBinding使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.rdf4j.query.BindingSet的用法示例。


在下文中一共展示了BindingSet.getBinding方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: removeStatement

import org.eclipse.rdf4j.query.BindingSet; //导入方法依赖的package包/类
@Override
public void removeStatement(UpdateContext op, Resource subj, IRI pred, Value obj, Resource... contexts) throws SailException {
    BindingSet bs;
    Binding b;
    Value v;
    long timestamp = (op != null && (bs = op.getBindingSet()) != null && (b = bs.getBinding(TIMESTAMP_CALLBACK_BINDING_NAME)) != null) ? ((Literal) b.getValue()).longValue() : System.currentTimeMillis();
    try {
        for (Resource ctx : normalizeContexts(contexts)) {
            for (KeyValue kv : HalyardTableUtils.toKeyValues(subj, pred, obj, ctx, true, timestamp)) { //calculate the kv's corresponding to the quad (or triple)
                delete(kv);
            }
        }
    } catch (IOException e) {
        throw new SailException(e);
    }
}
 
开发者ID:Merck,项目名称:Halyard,代码行数:17,代码来源:TimeAwareHBaseSail.java

示例2: evaluate

import org.eclipse.rdf4j.query.BindingSet; //导入方法依赖的package包/类
@Override
public CloseableIteration<? extends BindingSet, QueryEvaluationException> evaluate(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings, boolean includeInferred) throws SailException {
    Binding b = bindings.getBinding(TIMESTAMP_CALLBACK_BINDING_NAME);
    final TimestampCallbackBinding timestampBinding = (b instanceof TimestampCallbackBinding) ? (TimestampCallbackBinding) b : null;
    CloseableIteration<? extends BindingSet, QueryEvaluationException> iter = super.evaluate(tupleExpr, dataset, bindings, includeInferred);
    //push back the actual timestamp binding to the callback binding if requested
    if (timestampBinding != null) {
        iter = new FilterIteration<BindingSet, QueryEvaluationException>(iter) {
            @Override
            protected boolean accept(BindingSet bindings) throws QueryEvaluationException {
                Binding b = bindings.getBinding(TIMESTAMP_BINDING_NAME);
                //push back actual time if the timestamp binding is not provided
                timestampBinding.v = b == null ? SimpleValueFactory.getInstance().createLiteral(System.currentTimeMillis()) : b.getValue();
                return true;
            }
        };
    }
    return iter;
}
 
开发者ID:Merck,项目名称:Halyard,代码行数:20,代码来源:TimeAwareHBaseSail.java

示例3: calcKey

import org.eclipse.rdf4j.query.BindingSet; //导入方法依赖的package包/类
private BindingSet calcKey(BindingSet bindings, Set<String> commonVars) {
    QueryBindingSet q = new QueryBindingSet();
    for (String varName : commonVars) {
        Binding b = bindings.getBinding(varName);
        if (b != null) {
            q.addBinding(b);
        }
    }
    return q;
}
 
开发者ID:dice-group,项目名称:CostFed,代码行数:11,代码来源:HashJoinImpl.java

示例4: addStatement

import org.eclipse.rdf4j.query.BindingSet; //导入方法依赖的package包/类
@Override
public void addStatement(UpdateContext op, Resource subj, IRI pred, Value obj, Resource... contexts) throws SailException {
    BindingSet bs;
    Binding b;
    Value v;
    long timestamp = (op != null && (bs = op.getBindingSet()) != null && (b = bs.getBinding(TIMESTAMP_CALLBACK_BINDING_NAME)) != null) ? ((Literal) b.getValue()).longValue() : System.currentTimeMillis();
    for (Resource ctx : normalizeContexts(contexts)) {
        addStatementInternal(subj, pred, obj, ctx, timestamp);
    }
}
 
开发者ID:Merck,项目名称:Halyard,代码行数:11,代码来源:TimeAwareHBaseSail.java


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