本文整理匯總了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());
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}