本文整理了Java中org.apache.jena.sparql.engine.binding.Binding.isEmpty()
方法的一些代码示例,展示了Binding.isEmpty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.isEmpty()
方法的具体详情如下:
包路径:org.apache.jena.sparql.engine.binding.Binding
类名称:Binding
方法名:isEmpty
[英]Is this an empty binding? No variables.
[中]这是空的装订吗?没有变量。
代码示例来源:origin: apache/jena
private static boolean isNotNeeded(Binding b) {
return b == null || b.isEmpty();
}
代码示例来源:origin: apache/jena
@Override
public boolean isJoinIdentity() { return binding.isEmpty(); }
}
代码示例来源:origin: apache/jena
@Override
public boolean isEmpty() { return binding.isEmpty() ; }
代码示例来源:origin: apache/jena
@Override
protected boolean isEmpty1() {
if ( binding.isEmpty() )
return true ;
if ( size1() == 0 )
return true ;
return false ;
}
}
代码示例来源:origin: apache/jena
@Override
public boolean isEmpty() {
if ( !isEmpty1() )
return false;
if ( parent == null )
return true;
return parent.isEmpty();
}
代码示例来源:origin: apache/jena
@Override
public Binding convert(Binding b)
{
if ( parentBinding == null || parentBinding.isEmpty() )
return b ;
// This is the result. Could have BindingBase.setParent etc.
BindingMap b2 = BindingFactory.create(parentBinding) ;
// Copy the resultSet bindings to the combined result binding with checking.
for ( Iterator<Var> iter = b.vars() ; iter.hasNext(); )
{
Var v = iter.next();
Node n = b.get(v) ;
if ( b2.contains(v) )
{
Node n2 = b2.get(v) ;
if ( n2.equals(n) )
Log.warn(this, "Binding already for "+v+" (same value)" ) ;
else
{
Log.error(this, "Binding already for "+v+" (different values)" ) ;
throw new ARQInternalErrorException("Incompatible bindings for "+v) ;
}
}
b2.add(v, n) ;
}
return b2 ;
}
}
代码示例来源:origin: apache/jena
protected Plan createPlan()
{
// Decide the algebra to actually execute.
Op op = queryOp ;
if ( ! startBinding.isEmpty() ) {
op = Substitute.substitute(op, startBinding) ;
context.put(ARQConstants.sysCurrentAlgebra, op) ;
// Don't reset the startBinding because it also is
// needed in the output.
}
op = modifyOp(op) ;
QueryIterator queryIterator = null ;
if ( dataset != null )
// Null means setting up but not executing a query.
queryIterator = evaluate(op, dataset, startBinding, context) ;
else
// Bypass management interface
queryIterator = evaluateNoMgt(op, dataset, startBinding, context) ;
// This could be an automagic iterator to catch close.
return new PlanOp(getOp(), this, queryIterator) ;
}
代码示例来源:origin: apache/jena
@Override
public QueryIterator eval(Op op, DatasetGraph dsg, Binding input, Context context)
{
ExecutionContext execCxt = new ExecutionContext(context, dsg.getDefaultGraph(), dsg, QC.getFactory(context)) ;
QueryIterator qIter1 =
( input.isEmpty() ) ? QueryIterRoot.create(execCxt)
: QueryIterRoot.create(input, execCxt);
QueryIterator qIter = QC.execute(op, qIter1, execCxt) ;
// Wrap with something to check for closed iterators.
qIter = QueryIteratorCheck.check(qIter, execCxt) ;
// Need call back.
if ( context.isTrue(ARQ.enableExecutionTimeLogging) )
qIter = QueryIteratorTiming.time(qIter) ;
return qIter ;
}
代码示例来源:origin: apache/jena
if ( lastBinding.isEmpty() )
return TableFactory.createUnit() ;
代码示例来源:origin: apache/jena
public static Op compile(Store store, Op op, Binding binding, Context context, SDBRequest request)
if ( binding != null && ! binding.isEmpty() )
op = Substitute.substitute(op, binding) ;
内容来源于网络,如有侵权,请联系作者删除!