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


Java Expression.isFalse方法代码示例

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


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

示例1: selectNode

import de.fuberlin.wiwiss.d2rq.expr.Expression; //导入方法依赖的package包/类
public NodeMaker selectNode(Node node, RelationalOperators sideEffects) {
	if (node.equals(Node.ANY) || node.isVariable()) {
		return this;
	}
	if (!this.nodeType.matches(node)) {
		return NodeMaker.EMPTY;
	}
	String value = this.nodeType.extractValue(node);
	if (value == null) {
		return NodeMaker.EMPTY;
	}
	Expression expr = valueMaker.valueExpression(value);
	if (expr.isFalse()) {
		sideEffects.select(Expression.FALSE);
		return NodeMaker.EMPTY;
	}
	sideEffects.select(expr);
	return new FixedNodeMaker(node, isUnique());
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:20,代码来源:TypedNodeMaker.java

示例2: applyFilter

import de.fuberlin.wiwiss.d2rq.expr.Expression; //导入方法依赖的package包/类
private List<NodeRelation> applyFilter(
		List<NodeRelation> nodeRelations, Expr filter, ExprList allFilters) {
    List<NodeRelation> result = new ArrayList<NodeRelation>();
    boolean convertable = true;
    for (NodeRelation nodeRelation: nodeRelations) {
    	// TODO: The transformation from Expr to Expression should happen in NodeRelation.select()
        Expression expression = TransformExprToSQLApplyer.convert(filter, nodeRelation);
        if (expression == null) {
        	// the expression cannot be transformed to SQL
            convertable = false;
        } else if (expression.isTrue()) {
        	// keep as is
        } else if (expression.isFalse()) {
            continue;	// skip
        } else {
        	nodeRelation = nodeRelation.select(expression);
        	if (nodeRelation.baseRelation().condition().isFalse()) continue;
        }
        result.add(nodeRelation);
    }
    if (convertable) {
    	log.debug("Removing converted filter: " + filter);
        allFilters.getList().remove(filter);
    } else {
    	log.debug("Filter could not be fully converted and is kept: " + filter);
    }
    return result;
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:29,代码来源:TransformOpBGP.java

示例3: select

import de.fuberlin.wiwiss.d2rq.expr.Expression; //导入方法依赖的package包/类
public Relation select(Expression condition) {
	if (condition.isFalse()) return Relation.EMPTY;
	if (condition.isTrue()) return Relation.TRUE;
	// FIXME This is broken; we need to evaluate the expression, but we don't
	// have a ConnectedDB available here so we can't really do it
	return Relation.TRUE;
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:8,代码来源:Relation.java

示例4: select

import de.fuberlin.wiwiss.d2rq.expr.Expression; //导入方法依赖的package包/类
public Relation select(Expression selectCondition) {
	if (selectCondition.isTrue()) {
		return this;
	}
	if (selectCondition.isFalse()) {
		return Relation.EMPTY;
	}
	return new RelationImpl(database, aliases, 
			condition.and(selectCondition), softCondition, joinConditions, 
			projections, isUnique, orderSpecs, limit, limitInverse);
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:12,代码来源:RelationImpl.java

示例5: select

import de.fuberlin.wiwiss.d2rq.expr.Expression; //导入方法依赖的package包/类
public Relation select(Expression condition) {
	if (condition.isFalse()) {
		return empty();
	}
	return this.relation = this.relation.select(condition);
}
 
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:7,代码来源:MutableRelation.java


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