Class NodeFunctions

java.lang.Object
org.apache.jena.sparql.expr.nodevalue.NodeFunctions

public class NodeFunctions extends Object
Implementation of node-centric functions.
  • Constructor Details

    • NodeFunctions

      public NodeFunctions()
  • Method Details

    • sameTerm

      public static NodeValue sameTerm(NodeValue nv1, NodeValue nv2)
    • sameTerm

      public static boolean sameTerm(org.apache.jena.graph.Node node1, org.apache.jena.graph.Node node2)
      sameTerm(x,y)
    • rdfTermEquals

      public static boolean rdfTermEquals(org.apache.jena.graph.Node n1, org.apache.jena.graph.Node n2)
    • str

      public static NodeValue str(NodeValue nv)
    • str

      public static String str(org.apache.jena.graph.Node node)
    • sortKey

      public static NodeValue sortKey(NodeValue nv, String collation)
    • datatype

      public static NodeValue datatype(NodeValue nv)
    • datatype

      public static org.apache.jena.graph.Node datatype(org.apache.jena.graph.Node node)
    • isNumeric

      public static NodeValue isNumeric(NodeValue nv)
    • hasLang

      public static NodeValue hasLang(NodeValue nv)
    • hasLang

      public static boolean hasLang(org.apache.jena.graph.Node node)
    • hasLangDir

      public static NodeValue hasLangDir(NodeValue nv)
    • hasLangDir

      public static boolean hasLangDir(org.apache.jena.graph.Node node)
    • lang

      public static NodeValue lang(NodeValue nv)
    • lang

      public static String lang(org.apache.jena.graph.Node node)
    • langdir

      public static NodeValue langdir(NodeValue nv)
    • langdir

      public static String langdir(org.apache.jena.graph.Node node)
    • langMatches

      public static NodeValue langMatches(NodeValue nv, NodeValue nvPattern)
      LANGMATCHES
      Parameters:
      nv - The language string
      nvPattern - The pattern to match against
      Returns:
      Boolean nodeValue
    • langMatches

      public static NodeValue langMatches(NodeValue nv, String langPattern)
      LANGMATCHES
      Parameters:
      nv - The language string
      langPattern - The pattern to match against
      Returns:
      Boolean nodeValue
    • langMatches

      public static boolean langMatches(String langStr, String langPattern)
      The algorithm for the SPARQL function "LANGMATCHES". Matching in SPARQL is defined to be the language tag matching of RFC 4647, part of BCP 47.

      SPARQL uses basic matching which is single "*" or a prefix of subtags.

      This code does not implement extended matching correctly.

      Parameters:
      langStr - The language string
      langPattern - The pattern to match against
      Returns:
      Whether there is a match.
    • isIRI

      public static NodeValue isIRI(NodeValue nv)
    • isIRI

      public static boolean isIRI(org.apache.jena.graph.Node node)
    • isURI

      public static NodeValue isURI(NodeValue nv)
    • isURI

      public static boolean isURI(org.apache.jena.graph.Node node)
    • isBlank

      public static NodeValue isBlank(NodeValue nv)
    • isBlank

      public static boolean isBlank(org.apache.jena.graph.Node node)
    • isLiteral

      public static NodeValue isLiteral(NodeValue nv)
    • isLiteral

      public static boolean isLiteral(org.apache.jena.graph.Node node)
    • iri

      public static NodeValue iri(NodeValue nv, String baseIRI)
      NodeValue to NodeValue, skolemizing, and converting strings to URIs.
    • iri

      public static org.apache.jena.graph.Node iri(org.apache.jena.graph.Node n, String baseIRI)
      Node to Node, skolemizing, and converting strings to URIs.
    • struuid

      public static NodeValue struuid()
    • uuid

      public static NodeValue uuid()
    • strDatatype

      public static NodeValue strDatatype(NodeValue v1, NodeValue v2)
    • strLang

      public static NodeValue strLang(NodeValue v1, NodeValue v2)
    • strLangDir

      public static NodeValue strLangDir(NodeValue v1, NodeValue v2, NodeValue v3)
    • duration

      public static Duration duration(int seconds)
      A duration, tided