本文整理汇总了Java中com.hp.hpl.jena.sparql.expr.ExprFunction2类的典型用法代码示例。如果您正苦于以下问题:Java ExprFunction2类的具体用法?Java ExprFunction2怎么用?Java ExprFunction2使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ExprFunction2类属于com.hp.hpl.jena.sparql.expr包,在下文中一共展示了ExprFunction2类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: visit
import com.hp.hpl.jena.sparql.expr.ExprFunction2; //导入依赖的package包/类
public void visit(ExprFunction func) {
if (func instanceof ExprFunction0) {
visit((ExprFunction0) func);
}
else if (func instanceof ExprFunction1) {
visit((ExprFunction1) func);
}
else if (func instanceof ExprFunction2) {
visit((ExprFunction2) func);
}
else if (func instanceof ExprFunction3) {
visit((ExprFunction3) func);
}
else if (func instanceof ExprFunctionN) {
visit((ExprFunctionN) func);
}
else if (func instanceof ExprFunctionOp) {
visit((ExprFunctionOp) func);
}
}
开发者ID:aschaetzle,项目名称:S2RDF,代码行数:21,代码来源:ExprTranslator.java
示例2: visit
import com.hp.hpl.jena.sparql.expr.ExprFunction2; //导入依赖的package包/类
public void visit(ExprFunction func) {
if (func instanceof ExprFunction0) {
visit((ExprFunction0) func);
}
else if (func instanceof ExprFunction1) {
visit((ExprFunction1) func);
}
else if (func instanceof ExprFunction2) {
visit((ExprFunction2) func);
}
else if (func instanceof ExprFunction3) {
visit((ExprFunction3) func);
}
else if (func instanceof ExprFunctionN) {
visit((ExprFunctionN) func);
}
else if (func instanceof ExprFunctionOp) {
visit((ExprFunctionOp) func);
}
}
开发者ID:aschaetzle,项目名称:Sempala,代码行数:21,代码来源:ExprTranslator.java
示例3: processFilterWorker
import com.hp.hpl.jena.sparql.expr.ExprFunction2; //导入依赖的package包/类
private Op processFilterWorker(Expr e, Op subOp, Set<Var> patternVars) {
if ( patternVars == null )
patternVars = OpVars.visibleVars(subOp);
// Rewrites:
// FILTER ( ?x = ?y )
if ( !(e instanceof E_Equals) )
return null;
// Corner case: sameTerm is false for string/plain literal,
// but true in the graph for graphs with
ExprFunction2 eq = (ExprFunction2)e;
Expr left = eq.getArg1();
Expr right = eq.getArg2();
if ( left.isVariable() && right.isVariable() ) {
// Both must be used or else.
if ( patternVars.contains(left.asVar()) &&
patternVars.contains(right.asVar()) ) {
if (visitor.projectVars != null && !visitor.projectVars.contains(right.asVar()))
return subst(subOp, left.getExprVar(), right.getExprVar());
if (visitor.projectVars != null && !visitor.projectVars.contains(left.asVar()))
return subst(subOp, right.getExprVar(), left.getExprVar());
}
}
return null;
}
开发者ID:aschaetzle,项目名称:S2RDF,代码行数:30,代码来源:TransformFilterVarEquality.java
示例4: processFilterWorker
import com.hp.hpl.jena.sparql.expr.ExprFunction2; //导入依赖的package包/类
private Op processFilterWorker(Expr e, Op subOp, Set<Var> patternVars) {
if ( patternVars == null )
patternVars = OpVars.visibleVars(subOp);
// Rewrites:
// FILTER ( ?x = ?y )
if ( !(e instanceof E_Equals) )
return null;
// Corner case: sameTerm is false for string/plain literal,
// but true in the graph for graphs with
ExprFunction2 eq = (ExprFunction2)e;
Expr left = eq.getArg1();
Expr right = eq.getArg2();
if ( left.isVariable() && right.isVariable() ) {
// Both must be used or else.
if ( patternVars.contains(left.asVar()) &&
patternVars.contains(right.asVar()) ) {
if (visitor.projectVars != null && !visitor.projectVars.contains(right.asVar()))
return subst(subOp, left.getExprVar(), right.getExprVar());
if (visitor.projectVars != null && !visitor.projectVars.contains(left.asVar()))
return subst(subOp, right.getExprVar(), left.getExprVar());
}
}
return null;
}
开发者ID:aschaetzle,项目名称:Sempala,代码行数:30,代码来源:TransformFilterVarEquality.java
示例5: visit
import com.hp.hpl.jena.sparql.expr.ExprFunction2; //导入依赖的package包/类
public void visit(ExprFunction2 curExpr) {
Expr leftExpr, rightExpr;
if (curExpr instanceof E_LogicalOr || curExpr instanceof E_LogicalAnd)
{
// step down
leftExpr = ((ExprFunction2)curExpr).getArg1();
leftExpr.visit(this);
leftExpr = this.resultExpr;
// step down
rightExpr = ((ExprFunction2)curExpr).getArg2();
rightExpr.visit(this);
rightExpr = this.resultExpr;
// create new And/Or with resultExpr
if (curExpr instanceof E_LogicalOr)
{
this.resultExpr = new E_LogicalOr(leftExpr, rightExpr);
}else if (curExpr instanceof E_LogicalAnd)
{
this.resultExpr = new E_LogicalAnd(leftExpr, rightExpr);
}
}else
{
this.resultExpr = curExpr;
}
}
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:30,代码来源:TransformFilterCNF.java
示例6: visit
import com.hp.hpl.jena.sparql.expr.ExprFunction2; //导入依赖的package包/类
public void visit(ExprFunction2 function) {
logger.debug("visit ExprFunction " + function);
if (!convertable) {
expression.push(Expression.FALSE); // prevent stack empty exceptions when conversion
return; // fails in the middle of a multi-arg operator conversion
}
convertFunction(function);
}
开发者ID:aitoralmeida,项目名称:c4a_data_repository,代码行数:10,代码来源:TransformExprToSQLApplyer.java
示例7: visit
import com.hp.hpl.jena.sparql.expr.ExprFunction2; //导入依赖的package包/类
@Override
public void visit(ExprFunction2 func) {
log(func);
}
开发者ID:ldp4j,项目名称:ldp4j,代码行数:5,代码来源:QueryTest.java
注:本文中的com.hp.hpl.jena.sparql.expr.ExprFunction2类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论