Class E_IRI

All Implemented Interfaces:
Expr
Direct Known Subclasses:
E_URI

public class E_IRI extends ExprFunction1
IRI(expr), one argument, SPARQL standard form. The function URI(expr) is the same, but under a different name as a subclass.

As an ARQ extension , there is also IRI(base, relative) form which is E_IRI2. The relative URI (string or IRI) is resolved against the result of the "base" expression. which in turn is resolved as per the one-argument form.

  • Constructor Details

    • E_IRI

      public E_IRI(Expr relExpr)
    • E_IRI

      public E_IRI(String parserBaseURI, Expr relExpr)
  • Method Details

    • eval

      public NodeValue eval(NodeValue v, FunctionEnv env)
      Overrides:
      eval in class ExprFunction1
    • copy

      public Expr copy(Expr expr)
      Specified by:
      copy in class ExprFunction1
    • eval

      public NodeValue eval(NodeValue v)
      Specified by:
      eval in class ExprFunction1
    • getFunctionPrintName

      public String getFunctionPrintName(SerializationContext cxt)
      Description copied from class: ExprFunction
      Name used for output in SPARQL format needing functional form (no specific keyword). e.g. regexp(), custom functions, ...
      Overrides:
      getFunctionPrintName in class ExprFunction
    • getParserBase

      public String getParserBase()
      Get the parser base - the base URI a a string at the point in parsing when this object was created. If there is an explicit base expression (2 argument form), the parse base is used to make the base expression absolute.

      This may be null - the object may not have been created by the parser.

    • getRelExpr

      public Expr getRelExpr()
      Expression for the relative URI. This is the argument to the one-argument form or the second argument for the two-argument form.
    • hashCode

      public int hashCode()
      Description copied from interface: Expr
      Expr are used in both syntax and algebra. There is no syntax to algebra translation step because the parser uses operator precedence to build the right evaluation structure directly.

      The exceptions to this are the NOT EXISTS and EXISTS expressions which involve a query pattern. As a result there are different ways in syntax to produce the same algebra form.

      Two Expr are considered equal if they are equal as algebra expressions. hashCode and equals must implement that.

      There is also equalsBySyntax. Because two different syntax forms can yield the same algebra, but two different algebra forms must be different syntax, equalsBySyntax implies equals (by algebra).

      Hence, different hashCode => not equalsBySyntax.

      Specified by:
      hashCode in interface Expr
      Overrides:
      hashCode in class ExprFunction1
    • equals

      public boolean equals(Expr obj, boolean bySyntax)
      Description copied from interface: Expr
      General equality operation - consider this to be 'protected'
      Specified by:
      equals in interface Expr
      Overrides:
      equals in class ExprFunction