public class HadoopRdfIORegistry extends Object
Lang
Readers and writers are dynamically discovered using the Java
ServiceLoader mechanism. This will look for files under
META-INF/services named
org.apache.jena.hadoop.rdf.io.registry.ReaderFactory and
org.apache.jena.hadoop.rdf.io.registry.WriterFactory. This follows
the standard ServiceLoader format of provided one class name per
line which implements the relevant interface.
| Constructor and Description |
|---|
HadoopRdfIORegistry() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addReaderFactory(ReaderFactory f)
Registers the reader factory for all the languages it declares itself as
supporting
|
static void |
addWriterFactory(WriterFactory f)
Registers the writer factory for all the languages it declares itself as
supporting
|
static org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,QuadWritable> |
createQuadReader(Lang lang)
Tries to create a quad reader for the given language
|
static <TKey> org.apache.hadoop.mapreduce.RecordWriter<TKey,QuadWritable> |
createQuadWriter(Lang lang,
Writer writer,
org.apache.hadoop.conf.Configuration config)
Tries to create a quad writer for the given language
|
static org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,TripleWritable> |
createTripleReader(Lang lang)
Tries to create a triple reader for the given language
|
static <TKey> org.apache.hadoop.mapreduce.RecordWriter<TKey,TripleWritable> |
createTripleWriter(Lang lang,
Writer writer,
org.apache.hadoop.conf.Configuration config)
Tries to create a triple writer for the given language
|
static boolean |
hasQuadReader(Lang lang)
Gets whether there is a quad reader available for the given language
|
static boolean |
hasQuadWriter(Lang lang)
Gets whether there is a quad writer available for the given language
|
static boolean |
hasTriplesReader(Lang lang)
Gets whether there is a triple reader available for the given language
|
static boolean |
hasTriplesWriter(Lang lang)
Gets whether there is a triple writer available for the given language
|
static void |
reset()
Resets the registry to the default configuration
|
public static void reset()
public static void addReaderFactory(ReaderFactory f)
f - Reader factorypublic static void addWriterFactory(WriterFactory f)
f - Writer factorypublic static boolean hasQuadReader(Lang lang)
lang - Languagepublic static boolean hasTriplesReader(Lang lang)
lang - Languagepublic static org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,QuadWritable> createQuadReader(Lang lang) throws IOException
lang - LanguageIOException - Thrown if a quad reader is not available or the given
language does not support quadspublic static org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,TripleWritable> createTripleReader(Lang lang) throws IOException
lang - LanguageIOException - Thrown if a triple reader is not available or the given
language does not support triplepublic static boolean hasQuadWriter(Lang lang)
lang - Languagepublic static boolean hasTriplesWriter(Lang lang)
lang - Languagepublic static <TKey> org.apache.hadoop.mapreduce.RecordWriter<TKey,QuadWritable> createQuadWriter(Lang lang, Writer writer, org.apache.hadoop.conf.Configuration config) throws IOException
lang - Languagewriter - Writerconfig - ConfigurationIOException - Thrown if a quad writer is not available or the given
language does not support quadspublic static <TKey> org.apache.hadoop.mapreduce.RecordWriter<TKey,TripleWritable> createTripleWriter(Lang lang, Writer writer, org.apache.hadoop.conf.Configuration config) throws IOException
lang - Languagewriter - Writerconfig - ConfigurationIOException - Thrown if a triple writer is not available or the given
language does not support tripleLicenced under the Apache License, Version 2.0