public class RDFLoader extends Object
Constructor and Description |
---|
RDFLoader(ParserConfig config,
ValueFactory vf) |
Modifier and Type | Method and Description |
---|---|
void |
load(File file,
String baseURI,
RDFFormat dataFormat,
RDFHandler rdfHandler)
Parses RDF data from the specified file to the given RDFHandler.
|
void |
load(InputStream in,
String baseURI,
RDFFormat dataFormat,
RDFHandler rdfHandler)
Parses RDF data from an InputStream to the RDFHandler.
|
void |
load(Reader reader,
String baseURI,
RDFFormat dataFormat,
RDFHandler rdfHandler)
Parses RDF data from a Reader to the RDFHandler.
|
void |
load(URL url,
String baseURI,
RDFFormat dataFormat,
RDFHandler rdfHandler)
Parses the RDF data that can be found at the specified URL to the RDFHandler.
|
public RDFLoader(ParserConfig config, ValueFactory vf)
config
- vf
- public void load(File file, String baseURI, RDFFormat dataFormat, RDFHandler rdfHandler) throws IOException, RDFParseException, RDFHandlerException
file
- A file containing RDF data.baseURI
- The base URI to resolve any relative URIs that are in the data against. This defaults to the
value of file.toURI()
if the value is set to null.dataFormat
- The serialization format of the data.rdfHandler
- Receives RDF parser events.IOException
- If an I/O error occurred while reading from the file.UnsupportedRDFormatException
- If no parser is available for the specified RDF format.RDFParseException
- If an error was found while parsing the RDF data.RDFHandlerException
- If thrown by the RDFHandlerpublic void load(URL url, String baseURI, RDFFormat dataFormat, RDFHandler rdfHandler) throws IOException, RDFParseException, RDFHandlerException
url
- The URL of the RDF data.baseURI
- The base URI to resolve any relative URIs that are in the data against. This defaults to the
value of url.toExternalForm()
if the value is set to
null.dataFormat
- The serialization format of the data. If set to null, the format will be automatically
determined by examining the content type in the HTTP response header, and failing that, the
file name extension of the supplied URL.rdfHandler
- Receives RDF parser events.IOException
- If an I/O error occurred while reading from the URL.UnsupportedRDFormatException
- If no parser is available for the specified RDF format, or the RDF format
could not be automatically determined.RDFParseException
- If an error was found while parsing the RDF data.RDFHandlerException
- If thrown by the RDFHandlerpublic void load(InputStream in, String baseURI, RDFFormat dataFormat, RDFHandler rdfHandler) throws IOException, RDFParseException, RDFHandlerException
in
- An InputStream from which RDF data can be read.baseURI
- The base URI to resolve any relative URIs that are in the data against.dataFormat
- The serialization format of the data.rdfHandler
- Receives RDF parser events.IOException
- If an I/O error occurred while reading from the input stream.UnsupportedRDFormatException
- If no parser is available for the specified RDF format.RDFParseException
- If an error was found while parsing the RDF data.RDFHandlerException
- If thrown by the RDFHandlerpublic void load(Reader reader, String baseURI, RDFFormat dataFormat, RDFHandler rdfHandler) throws IOException, RDFParseException, RDFHandlerException
reader
- A Reader from which RDF data can be read.baseURI
- The base URI to resolve any relative URIs that are in the data against.dataFormat
- The serialization format of the data.rdfHandler
- Receives RDF parser events.IOException
- If an I/O error occurred while reading from the reader.UnsupportedRDFormatException
- If no parser is available for the specified RDF format.RDFParseException
- If an error was found while parsing the RDF data.RDFHandlerException
- If thrown by the RDFHandlerCopyright © 2015-2019 Eclipse Foundation. All Rights Reserved.