本文整理汇总了Java中org.openrdf.query.algebra.Slice类的典型用法代码示例。如果您正苦于以下问题:Java Slice类的具体用法?Java Slice怎么用?Java Slice使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Slice类属于org.openrdf.query.algebra包,在下文中一共展示了Slice类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: evaluate
import org.openrdf.query.algebra.Slice; //导入依赖的package包/类
public CloseableIteration evaluate(Slice slice, BindingSet bindings)
throws QueryEvaluationException {
CloseableIteration result = evaluate(slice.getArg(), bindings);
if (slice.hasOffset()) {
result = new OffsetIteration(result, slice.getOffset());
}
if (slice.hasLimit()) {
result = new LimitIteration(result, slice.getLimit());
}
return result;
}
开发者ID:apache,项目名称:incubator-rya,代码行数:12,代码来源:ParallelEvaluationStrategyImpl.java
示例2: meet
import org.openrdf.query.algebra.Slice; //导入依赖的package包/类
@Override
public void meet(Slice arg0) throws SparqlParserException
{
/*
* Basically this method does nothing. It just passes the next TupleExpr
* to the next handler. Query modifiers have been handled when constructing
* the SelectQuery object initially.
*/
arg0.getArg().visit(this);
}
开发者ID:obidea,项目名称:semantika,代码行数:11,代码来源:SparqlQueryHandler.java
示例3: addModifiersIfExist
import org.openrdf.query.algebra.Slice; //导入依赖的package包/类
private void addModifiersIfExist(ParsedQuery query)
{
TupleExpr expr = query.getTupleExpr();
if (expr instanceof Slice) {
Slice sliceExpr = (Slice) expr;
mQueryModifiers.setLimit((int) sliceExpr.getLimit());
mQueryModifiers.setOffset((int) sliceExpr.getOffset());
}
}
开发者ID:obidea,项目名称:semantika,代码行数:10,代码来源:SelectQuery.java
示例4: meet
import org.openrdf.query.algebra.Slice; //导入依赖的package包/类
@Override
public void meet(Slice node) throws RuntimeException {
if(node.hasLimit())
limit = node.getLimit();
if(node.hasOffset())
offset = node.getOffset();
}
开发者ID:apache,项目名称:marmotta,代码行数:8,代码来源:LimitFinder.java
示例5: meet
import org.openrdf.query.algebra.Slice; //导入依赖的package包/类
@Override
public void meet(Slice node) throws RuntimeException {
setSeen(node);
super.meet(node);
}
开发者ID:lszeremeta,项目名称:neo4j-sparql-extension-yars,代码行数:6,代码来源:SeenVisitor.java
示例6: meet
import org.openrdf.query.algebra.Slice; //导入依赖的package包/类
@Override
public void meet(Slice node) throws RuntimeException {
check(node);
super.meet(node);
}
开发者ID:lszeremeta,项目名称:neo4j-sparql-extension-yars,代码行数:6,代码来源:ConsistencyVisitor.java
示例7: meet
import org.openrdf.query.algebra.Slice; //导入依赖的package包/类
@Override
public void meet(final Slice node) {
cardinality = node.getLimit();
}
开发者ID:apache,项目名称:incubator-rya,代码行数:5,代码来源:RdfCloudTripleStoreEvaluationStatistics.java
示例8: evaluate
import org.openrdf.query.algebra.Slice; //导入依赖的package包/类
@Override
public CloseableIteration<BindingSet, QueryEvaluationException> evaluate(final Slice expr,
final BindingSet bindings) throws QueryEvaluationException {
return delegate(expr, bindings);
}
开发者ID:dkmfbk,项目名称:knowledgestore,代码行数:6,代码来源:SparqlHelper.java
示例9: meet
import org.openrdf.query.algebra.Slice; //导入依赖的package包/类
@Override
public void meet(final Slice n) {
emit(Query.create(n, null, SPARQLRenderer.this.forceSelect));
}
开发者ID:dkmfbk,项目名称:knowledgestore,代码行数:5,代码来源:SPARQLRenderer.java
示例10: extractQueryNodes
import org.openrdf.query.algebra.Slice; //导入依赖的package包/类
private static List<UnaryTupleOperator> extractQueryNodes(final TupleExpr rootNode,
final boolean haltOnGroup) {
final List<UnaryTupleOperator> nodes = Lists.newArrayList();
TupleExpr queryNode = rootNode;
while (queryNode instanceof UnaryTupleOperator) {
nodes.add((UnaryTupleOperator) queryNode);
queryNode = ((UnaryTupleOperator) queryNode).getArg();
}
boolean describeFound = false;
boolean modifierFound = false;
boolean projectionFound = false;
boolean groupFound = false;
boolean orderFound = false;
boolean sliceFound = false;
boolean extensionFound = false;
int index = 0;
while (index < nodes.size()) {
final UnaryTupleOperator node = nodes.get(index);
if (node instanceof DescribeOperator && !describeFound) {
describeFound = true;
} else if ((node instanceof Distinct || node instanceof Reduced) && !modifierFound
&& !projectionFound) {
modifierFound = true;
} else if ((node instanceof Projection || node instanceof MultiProjection)
&& !projectionFound) {
projectionFound = true;
} else if (node instanceof Group && !groupFound && !haltOnGroup) {
groupFound = true;
} else if (node instanceof Order && !orderFound) {
orderFound = true;
} else if (node instanceof Slice && !sliceFound) {
sliceFound = true;
} else if (node instanceof Filter && !groupFound && !haltOnGroup) {
int i = index + 1;
for (; i < nodes.size() && nodes.get(i) instanceof Extension;) {
++i;
}
if (i < nodes.size() && nodes.get(i) instanceof Group) {
groupFound = true;
index = i;
} else {
break;
}
} else if (node instanceof Extension && !extensionFound) {
extensionFound = true;
} else if (!(node instanceof QueryRoot) || index > 0) {
break;
}
++index;
}
return nodes.subList(0, index);
}
开发者ID:dkmfbk,项目名称:knowledgestore,代码行数:65,代码来源:SPARQLRenderer.java
示例11: meet
import org.openrdf.query.algebra.Slice; //导入依赖的package包/类
@Override
public void meet(Slice arg0) throws Exception {
arg0.visitChildren(this);
}
开发者ID:markusstocker,项目名称:emrooz,代码行数:5,代码来源:SparqlQueryModelVisitor.java
注:本文中的org.openrdf.query.algebra.Slice类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论