Franz Inc, AllegroGraph

com.franz.openrdf.rio.nquads
Class NQuadsWriter

java.lang.Object
  extended by com.franz.openrdf.rio.nquads.NQuadsWriter
All Implemented Interfaces:
RDFHandler, RDFWriter

public class NQuadsWriter
extends Object
implements RDFWriter

An implementation of the RDFWriter interface that writes RDF documents in N-Quads format. The N-Quads format is defined here.


Constructor Summary
NQuadsWriter(OutputStream out)
          Creates a new NQuadsWriter that will write to the supplied OutputStream.
NQuadsWriter(Writer writer)
          Creates a new NQuadsWriter that will write to the supplied Writer.
 
Method Summary
 void endRDF()
           
 RDFFormat getRDFFormat()
           
 void handleComment(String comment)
           
 void handleNamespace(String prefix, String name)
           
 void handleStatement(Statement st)
           
 void startRDF()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NQuadsWriter

public NQuadsWriter(OutputStream out)
Creates a new NQuadsWriter that will write to the supplied OutputStream.

Parameters:
out - The OutputStream to write the N-Quads document to.

NQuadsWriter

public NQuadsWriter(Writer writer)
Creates a new NQuadsWriter that will write to the supplied Writer.

Parameters:
writer - The Writer to write the N-Quads document to.
Method Detail

getRDFFormat

public RDFFormat getRDFFormat()
Specified by:
getRDFFormat in interface RDFWriter

startRDF

public void startRDF()
              throws RDFHandlerException
Specified by:
startRDF in interface RDFHandler
Throws:
RDFHandlerException

endRDF

public void endRDF()
            throws RDFHandlerException
Specified by:
endRDF in interface RDFHandler
Throws:
RDFHandlerException

handleNamespace

public void handleNamespace(String prefix,
                            String name)
Specified by:
handleNamespace in interface RDFHandler

handleStatement

public void handleStatement(Statement st)
                     throws RDFHandlerException
Specified by:
handleStatement in interface RDFHandler
Throws:
RDFHandlerException

handleComment

public void handleComment(String comment)
                   throws RDFHandlerException
Specified by:
handleComment in interface RDFHandler
Throws:
RDFHandlerException

Copyright © 2008-2012 Franz Inc.