• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ExprList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: makeIteratorPlan

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
/**
 * Makes the plan for a SPARQL SELECTOR clause.
 *
 * @param elementIterator the SPARQL SELECTOR
 * @return -
 */
static IteratorPlan makeIteratorPlan(
        final ElementIterator elementIterator)
        throws SPARQLGenerateException {
    Objects.requireNonNull(elementIterator, "The Iterator must not be null");

    Var var = elementIterator.getVar();
    Expr expr = elementIterator.getExpr();

    Objects.requireNonNull(var, "The variable of the Iterator must not be null");
    Objects.requireNonNull(expr, "The Expr in the iterator must not be null");
    checkIsTrue(expr.isFunction(), "Iterator should be a function:"
            + " <iri>(...) AS ?var");

    ExprFunction function = expr.getFunction();
    String iri = function.getFunctionIRI();

    IteratorFunctionFactory factory = sr.get(iri);
    if (factory == null) {
        throw new SPARQLGenerateException("Unknown Iterator Function: " + iri);
    }
    IteratorFunction iterator = factory.create(iri);
    ExprList exprList = new ExprList(function.getArgs());
    iterator.build(exprList);
    return new IteratorPlanImpl(iterator, exprList, var);
}
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:32,代码来源:PlanFactory.java


示例2: exec

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
@Override
public void exec(
        Binding binding, ExprList args, FunctionEnv env, Consumer<List<NodeValue>> nodeValuesStream) {
    this.env = env;
    if (args == null) {
        throw new ARQInternalErrorException("IteratorFunctionBase:"
                + " Null args list");
    }

    List<NodeValue> evalArgs = new ArrayList<>();
    for (Expr e : args) {
        NodeValue x = e.eval(binding, env);
        evalArgs.add(x);
    }

    exec(evalArgs, nodeValuesStream);
    arguments = null;
}
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:19,代码来源:IteratorStreamFunctionBase.java


示例3: normalize

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
private Expr normalize(ExprFunctionN func) {
    ExprList args = new ExprList();
    for (Expr expr : func.getArgs()) {
        Expr arg = normalize(expr);
        args.add(arg);
    }
    return func.copy(args);
}
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:9,代码来源:ExprNormalizer.java


示例4: checkBuild

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void checkBuild(ExprList args) {
    if (args.size() != 1) {
        throw new QueryBuildException("Selector '"
                + this.getClass().getName() + "' takes one argument");
    }
}
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:11,代码来源:IteratorStreamFunctionBase1.java


示例5: checkBuild

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void checkBuild(ExprList args) {
    if (args.size() != 3) {
        throw new QueryBuildException("Selector '"
                + this.getClass().getName() + "' takes three arguments");
    }
}
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:11,代码来源:IteratorFunctionBase3.java


示例6: checkBuild

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void checkBuild(ExprList args) {
    if (args.size() != 0) {
        throw new QueryBuildException("Iterator function '"
                + this.getClass().getName() + "' takes no arguments");
    }
}
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:11,代码来源:IteratorFunctionBase0.java


示例7: checkBuild

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void checkBuild(ExprList args) {
    if (args.size() != 5) {
        throw new QueryBuildException("Selector '"
                + this.getClass().getName() + "' takes 5 arguments");
    }
}
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:11,代码来源:IteratorStreamFunctionBase5.java


示例8: checkBuild

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void checkBuild(ExprList args) {
    if (args.size() != 2) {
        throw new QueryBuildException("Selector '"
                + this.getClass().getName() + "' takes two arguments");
    }
}
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:11,代码来源:IteratorStreamFunctionBase2.java


示例9: executeBGP

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
/** Execute a BGP (and filters) on a LDF graph, which may be in default storage or it may be a named graph */
private static QueryIterator executeBGP(LinkedDataFragmentGraph graph, OpBGP opBGP, QueryIterator input, ExprList exprs,
                                        ExecutionContext execCxt)
{
    // Execute a BGP on the real default graph
    return optimizeExecuteTriples(graph, input, opBGP.getPattern(), exprs, execCxt) ;
}
 
开发者ID:LinkedDataFragments,项目名称:Client.Java,代码行数:8,代码来源:OpExecutorLDF.java


示例10: accumulate

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
/** Function called on each row in a group */
@Override
public void accumulate(Binding binding, FunctionEnv functionEnv) {
    ExprList exprList = agg.getExprList() ;
    for(Expr expr: exprList) {
        try {
            NodeValue nv = expr.eval(binding, functionEnv) ;
            // Evaluation succeeded.
            if ( nv.isLiteral())
                count ++ ;
        } catch (ExprEvalException ex) {}
    }
}
 
开发者ID:xcurator,项目名称:xcurator,代码行数:14,代码来源:CustomAggregate.java


示例11: exec

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
@Override
public NodeValue exec(Binding binding, ExprList args, String uri, FunctionEnv env) {
	if (args == null) {
		throw new ARQInternalErrorException("ExpandPrefixFunction: Null args list");
	}
	if (args.size() != 1) {
		throw new ExprEvalException("ExpandPrefixFunction: Wrong number of arguments: Wanted 1, got " + args.size());
	}
       return exec(args.get(0).eval(binding, env), env.getContext());
}
 
开发者ID:tarql,项目名称:tarql,代码行数:11,代码来源:ExpandPrefixFunction.java


示例12: addExprToExprList

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
public boolean addExprToExprList() {
    ((ExprList) peek(1)).add((Expr) pop());
    return true;
}
 
开发者ID:IBCNServices,项目名称:OBEP,代码行数:5,代码来源:ParserUtils.java


示例13: checkBuild

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
@Override
public void checkBuild(String uri, ExprList args) {
    if (args.size() != 6) {
        throw new QueryBuildException("Function '" + Lib.className(this) + "' takes two arguments");
    }
}
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:7,代码来源:FUN_CustomCSV.java


示例14: checkBuild

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void checkBuild(ExprList args) {
}
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:7,代码来源:IteratorStreamFunctionBase4.java


示例15: build

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
@Override
   public void build(String uri, ExprList args) {
}
 
开发者ID:TopQuadrant,项目名称:shacl,代码行数:4,代码来源:AbstractFunction.java


示例16: build

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
@Override
public void build(String uri, ExprList args) {
	if (args.size() != 1) {
		throw new QueryBuildException("Function '" + Lib.className(this) + "' takes one argument");
	}
}
 
开发者ID:tarql,项目名称:tarql,代码行数:7,代码来源:ExpandPrefixFunction.java


示例17: IteratorPlanImpl

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
/**
 * The constructor.
 *
 * @param s - The SPARQL-Generate iterator function.
 * @param e - The list of expressions on which to evaluate the
 * iterator function.
 * @param v - The variable that will be bound to each result of the iterator
 *  function evaluation.
 */
public IteratorPlanImpl(
        final IteratorFunction s,
        final ExprList e,
        final Var v) {
    this.iterator = s;
    this.exprList = e;
    this.var = v;
}
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:18,代码来源:IteratorPlanImpl.java


示例18: build

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
/**
 * Called during query plan construction immediately after the construction
 * of the extension instance. Can throw ExprBuildException if something is
 * wrong (like wrong number of arguments).
 *
 * @param args The parsed arguments
 */
void build(ExprList args);
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:9,代码来源:IteratorFunction.java


示例19: exec

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
/**
 * Test a list of values - argument will not be null but may have the wrong
 * number of arguments. FunctionBase provides a more convenient way to
 * implement a function. Can throw ExprEvalsException if something goes
 * wrong.
 *
 * @param binding The current solution
 * @param args A list of unevaluated expressions
 * @param env The execution context
 * @param nodeValuesStream where to emit new values
 */
void exec(Binding binding, ExprList args, FunctionEnv env, Consumer<List<NodeValue>> nodeValuesStream);
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:13,代码来源:IteratorFunction.java


示例20: build

import org.apache.jena.sparql.expr.ExprList; //导入依赖的package包/类
/**
 * Build a iterator function execution with the given arguments,
 * and operate a check of the build.
 * @param args -
 * @throws QueryBuildException if the iterator function cannot be
 * executed with the
 * given arguments.
 */
@Override
public final void build(ExprList args) {
    arguments = args;
    checkBuild(args);
}
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:14,代码来源:IteratorStreamFunctionBase.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ImageInfo类代码示例发布时间:2022-05-22
下一篇:
Java Authenticator类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap