Class StreamRDFWriter.WriterRegistry<T>

  • Enclosing class:
    StreamRDFWriter

    public static class StreamRDFWriter.WriterRegistry<T>
    extends java.lang.Object
    Writer registry
    • Constructor Summary

      Constructors 
      Constructor Description
      WriterRegistry()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      RDFFormat choose​(Lang lang)  
      boolean contains​(RDFFormat serialization)
      Return true if the format is registered
      RDFFormat defaultSerialization​(Lang lang)
      Return the format registered as the default for the language
      T get​(RDFFormat serialization)
      Return the T for a given RDFFormat.
      void register​(Lang lang, RDFFormat format)
      Register the default serialization for the language (replace any existing registration).
      void register​(RDFFormat serialization, T streamWriterFactory)
      Register the serialization for datasets and it's associated factory
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WriterRegistry

        public WriterRegistry()
    • Method Detail

      • 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