Package org.apache.jena.riot.system
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 java.lang.ObjectWriter registry
-
-
Constructor Summary
Constructors Constructor Description WriterRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RDFFormatchoose(Lang lang)booleancontains(RDFFormat serialization)Return true if the format is registeredRDFFormatdefaultSerialization(Lang lang)Return the format registered as the default for the languageTget(RDFFormat serialization)Return the T for a given RDFFormat.voidregister(Lang lang, RDFFormat format)Register the default serialization for the language (replace any existing registration).voidregister(RDFFormat serialization, T streamWriterFactory)Register the serialization for datasets and it's associated factory
-
-
-
Method Detail
-
register
public void register(Lang lang, RDFFormat format)
Register the default serialization for the language (replace any existing registration).- Parameters:
lang- Languagesformat- 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
-
-