Class NV
- java.lang.Object
-
- org.apache.jena.sparql.function.scripting.NV
-
- All Implemented Interfaces:
RDFJS
public class NV extends java.lang.Object implements RDFJS
General representation of anNodeValuefor JavaScript and other scripting languages used to write SPARQL custom functions. ClassNVprovides access to all the details of aNodeValuefor cases where translation to native types isn't enough.Conversion is to native types where possible, otherwise
NV.NV.toStringof a URI returns the uri as a string soNVworks naturally in Java/JavaScript.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)static java.lang.ObjectfromNodeValue(NodeValue nv)Map an ARQNodeValueto java/GraalVM representation of a JavaScript object.java.lang.StringgetDatatype()java.lang.StringgetDT()java.lang.StringgetLabel()java.lang.StringgetLang()java.lang.StringgetLanguage()java.lang.StringgetLex()java.lang.StringgetTermType()java.lang.StringgetUri()java.lang.StringgetValue()inthashCode()booleanisBlank()booleanisLiteral()booleanisNumber()booleanisTripleTerm()booleanisURI()NodeValuenv()static NodeValuetoNodeValue(java.lang.Object r)Map a java/GraalVM representation of a JavaScript object to an ARQNodeValue.java.lang.StringtoString()
-
-
-
Constructor Detail
-
NV
public NV(NodeValue nv)
-
-
Method Detail
-
fromNodeValue
public static java.lang.Object fromNodeValue(NodeValue nv)
-
toNodeValue
public static NodeValue toNodeValue(java.lang.Object r)
Map a java/GraalVM representation of a JavaScript object to an ARQNodeValue. Identified types are null, string, number and boolean and alsoNVreturned 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 java.lang.String getTermType()
- Specified by:
getTermTypein interfaceRDFJS
-
getLabel
public java.lang.String getLabel()
-
getDT
public java.lang.String getDT()
-
getDatatype
public java.lang.String getDatatype()
-
getLanguage
public java.lang.String getLanguage()
-
getLang
public java.lang.String getLang()
-
getLex
public java.lang.String getLex()
-
getUri
public java.lang.String getUri()
-
nv
public NodeValue nv()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-