com.hp.hpl.mesa.rdf.jena.common
Class NTripleWriter
java.lang.Object
|
+--com.hp.hpl.mesa.rdf.jena.common.NTripleWriter
- All Implemented Interfaces:
- RDFWriter
- public class NTripleWriter
- extends java.lang.Object
- implements RDFWriter
Writes out an XML serialization of a model.
- Version:
- Release='$Name: $' Revision='$Revision: 1.6 $' Date='$Date: 2001/11/19 16:10:56 $'
- Author:
- bwm
Method Summary |
RDFErrorHandler |
setErrorHandler(RDFErrorHandler errHandler)
Set an error handler. |
void |
setNsPrefix(java.lang.String prefix,
java.lang.String ns)
Set the the namespace prefix to be used for a particular namespace. |
java.lang.Object |
setProperty(java.lang.String propName,
java.lang.Object propValue)
Set a property to control the writer's behaviour. |
static void |
write(Model model,
java.io.PrintWriter writer)
|
void |
write(Model model,
java.io.Writer writer,
java.lang.String base)
Serialize Model model to Writer out. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NTripleWriter
public NTripleWriter()
write
public void write(Model model,
java.io.Writer writer,
java.lang.String base)
throws RDFException
- Description copied from interface:
RDFWriter
- Serialize Model
model
to Writer out.
- Specified by:
write
in interface RDFWriter
- Following copied from interface:
com.hp.hpl.mesa.rdf.jena.model.RDFWriter
- Parameters:
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.- Throws:
RDFException
- Generic RDF exception.
setProperty
public java.lang.Object setProperty(java.lang.String propName,
java.lang.Object propValue)
throws RDFException
- Set a property to control the writer's behaviour.
This writer currently recognises no properties. Invoking this
method always causes an UNKNOWNPROPERTY RDFException
to be raised.
?
- Specified by:
setProperty
in interface RDFWriter
- Parameters:
propName
- The name of the property to be setpropValue
- The new value of the property- Returns:
- the previous value of the property
- Throws:
RDFException
- Throws UNKNOWNPROPERTY RDFException
if the
property name is not recognised
setNsPrefix
public void setNsPrefix(java.lang.String prefix,
java.lang.String ns)
- Description copied from interface:
RDFWriter
- Set the the namespace prefix to be used for a particular namespace.
- Specified by:
setNsPrefix
in interface RDFWriter
- Following copied from interface:
com.hp.hpl.mesa.rdf.jena.model.RDFWriter
- Parameters:
prefix
- the prefix to be usedns
- the namespace
setErrorHandler
public RDFErrorHandler setErrorHandler(RDFErrorHandler errHandler)
- Description copied from interface:
RDFWriter
- Set an error handler.
- Specified by:
setErrorHandler
in interface RDFWriter
- Following copied from interface:
com.hp.hpl.mesa.rdf.jena.model.RDFWriter
- Parameters:
errHandler
- The new error handler to be used.- Returns:
- the old error handler
write
public static void write(Model model,
java.io.PrintWriter writer)
throws java.io.IOException,
RDFException
Copyright © 2001 Hewlett-Packard. All Rights Reserved.