Franz Inc, AllegroGraph

com.franz.openrdf.rio.nquads
Class NQuadsWriter

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

public class NQuadsWriter
extends Object
implements org.openrdf.rio.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()
           
 org.openrdf.rio.RDFFormat getRDFFormat()
           
 void handleComment(String comment)
           
 void handleNamespace(String prefix, String name)
           
 void handleStatement(org.openrdf.model.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 org.openrdf.rio.RDFFormat getRDFFormat()
Specified by:
getRDFFormat in interface org.openrdf.rio.RDFWriter

startRDF

public void startRDF()
              throws org.openrdf.rio.RDFHandlerException
Specified by:
startRDF in interface org.openrdf.rio.RDFHandler
Throws:
org.openrdf.rio.RDFHandlerException

endRDF

public void endRDF()
            throws org.openrdf.rio.RDFHandlerException
Specified by:
endRDF in interface org.openrdf.rio.RDFHandler
Throws:
org.openrdf.rio.RDFHandlerException

handleNamespace

public void handleNamespace(String prefix,
                            String name)
Specified by:
handleNamespace in interface org.openrdf.rio.RDFHandler

handleStatement

public void handleStatement(org.openrdf.model.Statement st)
                     throws org.openrdf.rio.RDFHandlerException
Specified by:
handleStatement in interface org.openrdf.rio.RDFHandler
Throws:
org.openrdf.rio.RDFHandlerException

handleComment

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

Copyright © 2008-2012 Franz Inc.