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


Java ProjectionElemList类代码示例

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


ProjectionElemList类属于org.eclipse.rdf4j.query.algebra包,在下文中一共展示了ProjectionElemList类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: selectQueryStringBoundCheck

import org.eclipse.rdf4j.query.algebra.ProjectionElemList; //导入依赖的package包/类
/**
 * Construct a SELECT query for a grouped bound check.
 * 
 * Pattern:
 * 
 * SELECT DISTINCT ?o_1 .. ?o_N WHERE { { s1 p1 ?o_1 FILTER ?o_1=o1 } UNION ... UNION { sN pN ?o_N FILTER ?o_N=oN }}
 * 
 * @param stmt
 * @param unionBindings
 * @return
 */
public static TupleExpr selectQueryStringBoundCheck(StatementPattern stmt, List<BindingSet> unionBindings) {
	
	Set<String> varNames = new HashSet<String>();
	
	Union union = new Union();
	union.setLeftArg(constructStatementCheckId(stmt, 0, varNames, unionBindings.get(0)) );
	Union tmp = union;
	int idx;
	for (idx=1; idx<unionBindings.size()-1; idx++) {
		Union _u = new Union();
		_u.setLeftArg( constructStatementCheckId(stmt, idx, varNames, unionBindings.get(idx)) );
		tmp.setRightArg(_u);
		tmp = _u;
	}
	tmp.setRightArg( constructStatementCheckId(stmt, idx, varNames, unionBindings.get(idx) ));
	
	ProjectionElemList projList = new ProjectionElemList();
	for (String var : varNames)
		projList.addElement( new ProjectionElem(var));
	
	Projection proj = new Projection(union, projList);

	return proj;
}
 
开发者ID:dice-group,项目名称:CostFed,代码行数:36,代码来源:QueryAlgebraUtil.java

示例2: selectQueryBoundUnion

import org.eclipse.rdf4j.query.algebra.ProjectionElemList; //导入依赖的package包/类
/**
 * Construct a SELECT query expression for a bound union.
 * 
 * Pattern:
 * 
 * SELECT ?v_1 ?v_2 ?v_N WHERE { { ?v_1 p o } UNION { ?v_2 p o } UNION ... } 
 * 
 * Note that the filterExpr is not evaluated at the moment.
 * 
 * @param stmt
 * @param unionBindings
 * @param filterExpr
 * @param evaluated
 * 			parameter can be used outside this method to check whether FILTER has been evaluated, false in beginning
 * 
 * @return
 */
public static TupleExpr selectQueryBoundUnion( StatementPattern stmt, List<BindingSet> unionBindings, FilterValueExpr filterExpr, Boolean evaluated) {
	
	// TODO add FILTER expressions
	
	Set<String> varNames = new HashSet<String>();
	
	Union union = new Union();
	union.setLeftArg(constructStatementId(stmt, Integer.toString(0), varNames, unionBindings.get(0)) );
	Union tmp = union;
	int idx;
	for (idx=1; idx<unionBindings.size()-1; idx++) {
		Union _u = new Union();
		_u.setLeftArg( constructStatementId(stmt, Integer.toString(idx), varNames, unionBindings.get(idx)) );
		tmp.setRightArg(_u);
		tmp = _u;
	}
	tmp.setRightArg( constructStatementId(stmt, Integer.toString(idx), varNames, unionBindings.get(idx) ));
			
	ProjectionElemList projList = new ProjectionElemList();
	for (String var : varNames)
		projList.addElement( new ProjectionElem(var));
	
	Projection proj = new Projection(union, projList);

	return proj;
}
 
开发者ID:dice-group,项目名称:CostFed,代码行数:44,代码来源:QueryAlgebraUtil.java

示例3: ProjectionWithBindings

import org.eclipse.rdf4j.query.algebra.ProjectionElemList; //导入依赖的package包/类
public ProjectionWithBindings(TupleExpr arg, ProjectionElemList elements, List<Binding> additionalBindings) {
	super(arg, elements);
	this.additionalBindings = additionalBindings;
}
 
开发者ID:dice-group,项目名称:CostFed,代码行数:5,代码来源:ProjectionWithBindings.java


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