本文整理汇总了Java中com.hp.hpl.jena.sparql.algebra.op.OpTable类的典型用法代码示例。如果您正苦于以下问题:Java OpTable类的具体用法?Java OpTable怎么用?Java OpTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OpTable类属于com.hp.hpl.jena.sparql.algebra.op包,在下文中一共展示了OpTable类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: mergeToBGP
import com.hp.hpl.jena.sparql.algebra.op.OpTable; //导入依赖的package包/类
private Op mergeToBGP(Op left, Op right) {
BasicPattern bgp = new BasicPattern();
if (OpBGP.isBGP(left)) {
bgp.addAll(((OpBGP) left).getPattern());
} else {
if (!(left instanceof OpTable))
Log.warn(this, "mergeToBGP left not valid BGP " + left.toString());
}
if (OpBGP.isBGP(right)) {
bgp.addAll(((OpBGP) right).getPattern());
;
} else {
if (!(right instanceof OpTable))
Log.warn(this, "mergeToBGP right not valid BGP"+ right.toString());
}
return new OpBGP(bgp);
}
示例2: compileElementGroup
import com.hp.hpl.jena.sparql.algebra.op.OpTable; //导入依赖的package包/类
protected Op compileElementGroup(ElementGroup groupElt) {
Op current = OpTable.unit();
// First: get all filters, merge adjacent BGPs. This includes BGP-FILTER-BGP
// This is done in finalizeSyntax after which the new ElementGroup is in
// the right order w.r.t. BGPs and filters.
// This is a delay from parsing time so a printed query
// keeps filters where the query author put them.
List<Element> groupElts = finalizeSyntax(groupElt);
// Second: compile the consolidated group elements.
// Assumes that filters moved to end.
for (Iterator<Element> iter = groupElts.listIterator(); iter.hasNext(); ) {
Element elt = iter.next();
current = compileOneInGroup(elt, current);
}
return current;
}
示例3: compile
import com.hp.hpl.jena.sparql.algebra.op.OpTable; //导入依赖的package包/类
public Op compile(Query query) {
Op pattern = compile(query.getQueryPattern()); // Not compileElement - may need to apply simplification.
Op op = compileModifiers(query, pattern);
if (query.hasValues()) {
List<Binding> bindings = query.getValuesData();
Table table = TableFactory.create();
for ( Binding binding : bindings )
table.addBinding(binding);
OpTable opTable = OpTable.create(table);
op = OpJoin.create(op, opTable);
}
return op ;
}
示例4: compilePathBlock
import com.hp.hpl.jena.sparql.algebra.op.OpTable; //导入依赖的package包/类
protected Op compilePathBlock(PathBlock pathBlock) {
// Empty path block : the parser does not generate this case.
if ( pathBlock.isEmpty() ) {
return OpTable.unit();
}
// Always turns the most basic paths to triples.
return PathLib.pathToTriples(pathBlock);
}
示例5: visit
import com.hp.hpl.jena.sparql.algebra.op.OpTable; //导入依赖的package包/类
public void visit(OpTable opTable) {
wrapInCurrentFilter(opTable);
}
示例6: effectiveOp
import com.hp.hpl.jena.sparql.algebra.op.OpTable; //导入依赖的package包/类
@Override
public Op effectiveOp() {
return OpTable.unit();
}
示例7: OpUnionTableSQL
import com.hp.hpl.jena.sparql.algebra.op.OpTable; //导入依赖的package包/类
public OpUnionTableSQL(Collection<OpTableSQL> tableOps) {
this(tableOps, OpTable.unit());
}
示例8: visit
import com.hp.hpl.jena.sparql.algebra.op.OpTable; //导入依赖的package包/类
@Override
public void visit(OpTable opTable) {
variables.addAll(opTable.getTable().getVars());
}
示例9: transform
import com.hp.hpl.jena.sparql.algebra.op.OpTable; //导入依赖的package包/类
@Override
public Op transform(OpTable opTable) {
return substitute(opTable);
}
示例10: transform
import com.hp.hpl.jena.sparql.algebra.op.OpTable; //导入依赖的package包/类
@Override
public Op transform(OpTable opTable) {
return (opTable);
//return new OpBGP();
}