| Constructor and Description |
|---|
NTripleReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
read(Model model,
InputStream in,
String base)
Read serialized RDF from an
InputStream and add the statements
to a Model. |
void |
read(Model model,
Reader reader,
String base)
It is usually a mistake to use this method.
|
void |
read(Model model,
String url)
Read serialized RDF from a url and add the statements to a model.
|
RDFNode |
readNode() |
Resource |
readResource() |
RDFErrorHandler |
setErrorHandler(RDFErrorHandler errHandler)
Set an error handler for the reader
|
Object |
setProperty(String propName,
Object propValue)
Set the value of a reader property.
|
public void read(Model model, InputStream in, String base)
RDFReaderInputStream and add the statements
to a Model.read in interface RDFReadermodel - The model to which statements are added.in - The InputStream from which to readbase - The base to use when converting relative to absolute URI's.
The base URI may be null if there are no relative URIs to convert.
A base URI of "" may permit relative URIs to be used in the
model unconverted.public void read(Model model, Reader reader, String base)
RDFReaderReader and add the statements to a
Model. It is generally better to use an InputStream if
possible. RDFReader.read(Model,InputStream,String), otherwise there is a
danger of a mismatch between the character encoding of say the FileReader
and the character encoding of the data in the file.read in interface RDFReadermodel - The model to which statements are added.reader - the reader from which to readbase - The base to use when converting relative to absolute URI's.
The base URI may be null if there are no relative URIs to convert.
A base URI of "" may permit relative URIs to be used in the
model unconverted.public void read(Model model, String url)
RDFReaderpublic Object setProperty(String propName, Object propValue)
RDFReaderThe behaviour of a reader may be influenced by setting property values. The properties and there effects may depend on the individual reader implementation.
An RDFReader's behaviour can be influenced by defining property values interpreted by that particular reader class. The values for such properties can be changed by calling this method.
No standard properties are defined. For the properties recognised by any particular reader implementation, see the documentation for that implementation.
The built-in RDFReaders have properties as defined by:
JenaReader.setProperty(String,Object)
setProperty in interface RDFReaderpropName - the name of the propertypropValue - the value of the propertynull
if there wasn't onepublic RDFErrorHandler setErrorHandler(RDFErrorHandler errHandler)
RDFReadersetErrorHandler in interface RDFReadererrHandler - the new error handlerpublic Resource readResource()
public RDFNode readNode()
Licenced under the Apache License, Version 2.0