Class E_JsonConvert

java.lang.Object
org.apache.jena.sparql.function.FunctionBase
org.apache.jena.sparql.function.FunctionBase1
org.aksw.jena_sparql_api.sparql.ext.json.E_JsonConvert
All Implemented Interfaces:
org.apache.jena.sparql.function.Function

public class E_JsonConvert extends org.apache.jena.sparql.function.FunctionBase1
Convert RDF terms to corresponding JSON elements (if possible)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static com.google.gson.JsonElement
    convert(org.apache.jena.graph.Node node, com.google.gson.Gson gson)
    Convert the given node to a JsonElement.
    org.apache.jena.sparql.expr.NodeValue
    exec(org.apache.jena.sparql.expr.NodeValue v)
     

    Methods inherited from class org.apache.jena.sparql.function.FunctionBase1

    checkBuild, exec

    Methods inherited from class org.apache.jena.sparql.function.FunctionBase

    build, exec, exec

    Methods inherited from class java.lang.Object

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

    • E_JsonConvert

      public E_JsonConvert()
  • Method Details

    • exec

      public org.apache.jena.sparql.expr.NodeValue exec(org.apache.jena.sparql.expr.NodeValue v)
      Specified by:
      exec in class org.apache.jena.sparql.function.FunctionBase1
    • convert

      public static com.google.gson.JsonElement convert(org.apache.jena.graph.Node node, com.google.gson.Gson gson)
      Convert the given node to a JsonElement. IRIs are be converted to strings. If the node already is a json object (a literal value of type JsonElement) then the argument is returned.
      Parameters:
      node -
      gson -
      Returns: