Class StreamRDFWriter.WriterRegistry<T>

java.lang.Object
org.apache.jena.riot.system.StreamRDFWriter.WriterRegistry<T>
Enclosing class:
StreamRDFWriter

public static class StreamRDFWriter.WriterRegistry<T> extends Object
Writer registry
  • Constructor Details

    • WriterRegistry

      public WriterRegistry()
  • Method Details

    • register

      public void register(Lang lang, RDFFormat format)
      Register the default serialization for the language (replace any existing registration).
      Parameters:
      lang - Languages
      format - The serialization forma to use when the language is used for writing.
    • register

      public void register(RDFFormat serialization, T streamWriterFactory)
      Register the serialization for datasets and it's associated factory
      Parameters:
      serialization - RDFFormat for the output format.
      streamWriterFactory - Source of writer engines
    • get

      public T get(RDFFormat serialization)
      Return the T for a given RDFFormat.
      Parameters:
      serialization - RDFFormat for the output format.
      Returns:
      T Registered thing or null.
    • contains

      public boolean contains(RDFFormat serialization)
      Return true if the format is registered
      Parameters:
      serialization -
      Returns:
      boolean
    • defaultSerialization

      public RDFFormat defaultSerialization(Lang lang)
      Return the format registered as the default for the language
    • choose

      public RDFFormat choose(Lang lang)
      Parameters:
      lang -
      Returns:
      The RDFFormat for the lang
      Throws:
      RiotException - if there is no registered format