All Implemented Interfaces:

public class NV extends Object implements RDFJS
General representation of an NodeValue for JavaScript and other scripting languages used to write SPARQL custom functions. Class NV provides access to all the details of a NodeValue for cases where translation to native types isn't enough.

Conversion is to native types where possible, otherwise NV. NV.toString of a URI returns the uri as a string so NV works naturally in Java/JavaScript.

See Also:
  • Constructor Details

  • Method Details

    • fromNodeValue

      public static Object fromNodeValue(NodeValue nv)
      Map an ARQ NodeValue to java/GraalVM representation of a JavaScript object. Native JavaScript types supported are null, string, number and boolean. Otherwise a NV is returned.
    • toNodeValue

      public static NodeValue toNodeValue(Object r)
      Map a java/GraalVM representation of a JavaScript object to an ARQ NodeValue. Identified types are null, string, number and boolean and also NV returned by the JavaScript code.
    • isURI

      public boolean isURI()
    • isBlank

      public boolean isBlank()
    • isNumber

      public boolean isNumber()
    • isLiteral

      public boolean isLiteral()
    • isTripleTerm

      public boolean isTripleTerm()
    • getTermType

      public String getTermType()
      Specified by:
      getTermType in interface RDFJS
    • getValue

      public String getValue()
      Specified by:
      getValue in interface RDFJS
    • getLabel

      public String getLabel()
    • getDT

      public String getDT()
    • getDatatype

      public String getDatatype()
    • getLanguage

      public String getLanguage()
    • getLang

      public String getLang()
    • getLex

      public String getLex()
    • getUri

      public String getUri()
    • nv

      public NodeValue nv()
    • toString

      public String toString()
      toString in class Object
    • hashCode

      public int hashCode()
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      equals in class Object