|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
RDFWriter is an interface to RDF serializers.
An RDFWriter
is a class which serializes an RDF model
to some RDF serializaion language. RDF/XML, n-triple and n3 are
examples of serialization languages.
Field Summary | |
static java.lang.String |
NSPREFIXPROPBASE
|
Method Summary | |
RDFErrorHandler |
setErrorHandler(RDFErrorHandler errHandler)
Set an error handler. |
java.lang.Object |
setProperty(java.lang.String propName,
java.lang.Object propValue)
Set a property to control the behaviour of this writer. |
void |
write(Model model,
java.io.OutputStream out,
java.lang.String base)
Serialize Model model to OutputStream out.
|
void |
write(Model model,
java.io.Writer out,
java.lang.String base)
Caution: Serialize Model model to Writer out .
|
Field Detail |
public static final java.lang.String NSPREFIXPROPBASE
Method Detail |
public void write(Model model, java.io.Writer out, java.lang.String base)
model
to Writer out
.
It is often better to use an OutputStream and permit Jena
to choose the character encoding. The charset restrictions
on the Writer are defined by the different implementations
of this interface. Typically using an OutputStreamWriter (e.g.
a FileWriter) at least permits the implementation to
examine the encoding. With an arbitrary Writer implementations
assume a utf-8 encoding.
out
- The Writer to which the serialization should
be sent.model
- The model to be written.base
- the base URI for relative URI calculations.
null
means use only absolute URI's.public void write(Model model, java.io.OutputStream out, java.lang.String base)
model
to OutputStream out.
The implementation chooses the character encoding, utf-8 is preferred.
- Parameters:
out
- The OutputStream to which the serialization should be sent.model
- The model to be written.base
- the base URI for relative URI calculations.
null
means use only absolute URI's.
public java.lang.Object setProperty(java.lang.String propName, java.lang.Object propValue)
An RDFWriter's behaviour can be influenced by defining property values interpreted by that particular writer 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 writer implementation, see the the documentation for that implementation.
The built-in RDFWriters have properties as defined by:
propName
- The name of the property.propValue
- The new value of the property
null
if no value was set.public RDFErrorHandler setErrorHandler(RDFErrorHandler errHandler)
errHandler
- The new error handler to be used.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |