Class LangJSONLD10

java.lang.Object
org.apache.jena.riot.lang.LangJSONLD10
All Implemented Interfaces:
ReaderRIOT

@Deprecated public class LangJSONLD10 extends Object implements ReaderRIOT
Deprecated.
Migrate to JSON-LD 1.1
One can pass a jsonld context using the (jena) Context mechanism, defining a (jena) Context (sorry for this clash of "contexts"), (cf. last argument in ReaderRIOT.read(InputStream in, String baseURI, ContentType ct, StreamRDF output, Context context)) with:
 Context jenaContext = new Context()
 jenaCtx.set(JsonLdReader.JSONLD_CONTEXT, contextAsJsonString);
 
where contextAsJsonString is a JSON string containing the value of the "@context". It is also possible to define the different options supported by JSONLD-java using the JSONLD_OPTIONS Symbol The JsonLDReadContext is a convenience class that extends Context and provides methods to set the values of these different Symbols that are used in controlling the writing of JSON-LD. Note: it is possible to override jsonld's "@context" value by providing one, using a Context, and setting the JSONLD_CONTEXT Symbol's value to the data expected by JSON-LD java API (a Map).
  • Field Details

    • JSONLD_CONTEXT

      public static final Symbol JSONLD_CONTEXT
      Deprecated.
      Symbol to use to pass (in a Context object) the "@context" to be used when reading jsonld (overriding the actual @context in the jsonld) Expected value: the value of the "@context", as expected by the JSONLD-java API (a Map)
    • JSONLD_OPTIONS

      public static final Symbol JSONLD_OPTIONS
      Deprecated.
      value: the option object expected by JsonLdProcessor (instance of JsonLdOptions)
    • LITERAL

      public static String LITERAL
      Deprecated.
    • BLANK_NODE

      public static String BLANK_NODE
      Deprecated.
    • IRI

      public static String IRI
      Deprecated.
  • Constructor Details

  • Method Details

    • read

      public void read(Reader reader, String baseURI, ContentType ct, StreamRDF output, Context context)
      Deprecated.
      Description copied from interface: ReaderRIOT
      Read from an InputStream and output RDF on the StreamRDF.
      Specified by:
      read in interface ReaderRIOT
      Parameters:
      reader - Reader. InputStreams are preferred because Reader do not allow RIOT to set the character set.
      baseURI - Base URI (or null)
      ct - Content-Type if available. Routing to the right parser will have already been done so this only useful to get addition Content-Type information or if this ReaderRIOT can handle multiple media types.
      output - Destination for the parser output.
      context - Environment settings.
    • read

      public void read(InputStream in, String baseURI, ContentType ct, StreamRDF output, Context context)
      Deprecated.
      Description copied from interface: ReaderRIOT
      Read from an InputStream and output RDF on the StreamRDF.
      Specified by:
      read in interface ReaderRIOT
      Parameters:
      in - InputStream
      baseURI - Base URI (or null)
      ct - Content-Type if available. Routing to the right parser will have already been done so this only useful to get addition Content-Type information or if this ReaderRIOT can handle multiple media types.
      output - Destination for the parser output.
      context - Environment settings.