Class ExprUtils

java.lang.Object
se.liu.ida.hefquin.jenaext.sparql.expr.ExprUtils

public class ExprUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.jena.sparql.expr.Expr
    buildAnd(List<org.apache.jena.sparql.expr.Expr> exprList)
    Builds a left-associative logical AND expression from the given list of expressions.
    static org.apache.jena.sparql.expr.Expr
    buildOr(List<org.apache.jena.sparql.expr.Expr> exprList)
    Builds a left-associative logical OR expression from the given list of expressions.
    static Set<org.apache.jena.graph.Node>
    collectURIs(org.apache.jena.sparql.expr.Expr expr)
    Collects all URI nodes that occur anywhere within the given expression.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExprUtils

      public ExprUtils()
  • Method Details

    • collectURIs

      public static Set<org.apache.jena.graph.Node> collectURIs(org.apache.jena.sparql.expr.Expr expr)
      Collects all URI nodes that occur anywhere within the given expression.
      Parameters:
      expr - the expression to inspect
      Returns:
      the URI nodes contained in the expression
    • buildOr

      public static org.apache.jena.sparql.expr.Expr buildOr(List<org.apache.jena.sparql.expr.Expr> exprList)
      Builds a left-associative logical OR expression from the given list of expressions.
      Parameters:
      exprList - the expressions to combine
      Returns:
      a logical OR expression over all given expressions
      Throws:
      IllegalArgumentException - if the list is null or empty
    • buildAnd

      public static org.apache.jena.sparql.expr.Expr buildAnd(List<org.apache.jena.sparql.expr.Expr> exprList)
      Builds a left-associative logical AND expression from the given list of expressions.
      Parameters:
      exprList - the expressions to combine
      Returns:
      a logical AND expression over all given expressions
      Throws:
      IllegalArgumentException - if the list is null or empty