org.jrdf.writer.rdfxml
Class ResourceWriterImpl

java.lang.Object
  extended by org.jrdf.writer.rdfxml.ResourceWriterImpl
All Implemented Interfaces:
TypedNodeVisitor, ResourceWriter

public class ResourceWriterImpl
extends Object
implements ResourceWriter

Represents an RDF/XML header for a given resource.

Author:
TurnerRX, Andrew Newman

Constructor Summary
ResourceWriterImpl(RdfNamespaceMap names, BlankNodeRegistry newRegistry, javax.xml.stream.XMLStreamWriter newXmlStreamWriter)
           
 
Method Summary
 void setTriple(Triple triple)
           
 void visitBlankNode(BlankNode blankNode)
          Visit blank node.
 void visitLiteral(Literal literal)
          Visit Literal.
 void visitNode(Node node)
          Visit node.
 void visitResource(Resource resource)
          Visit Resource.
 void visitURIReference(URIReference uriReference)
          Visit URI Reference.
 void writeEnd()
           
 void writeNestedStatements(IteratorStack<Triple> stack)
           
 void writeStart()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceWriterImpl

public ResourceWriterImpl(RdfNamespaceMap names,
                          BlankNodeRegistry newRegistry,
                          javax.xml.stream.XMLStreamWriter newXmlStreamWriter)
Method Detail

setTriple

public void setTriple(Triple triple)
Specified by:
setTriple in interface ResourceWriter

writeStart

public void writeStart()
                throws WriteException
Specified by:
writeStart in interface ResourceWriter
Throws:
WriteException

writeNestedStatements

public void writeNestedStatements(IteratorStack<Triple> stack)
                           throws WriteException,
                                  javax.xml.stream.XMLStreamException
Specified by:
writeNestedStatements in interface ResourceWriter
Throws:
WriteException
javax.xml.stream.XMLStreamException

writeEnd

public void writeEnd()
              throws WriteException
Specified by:
writeEnd in interface ResourceWriter
Throws:
WriteException

visitBlankNode

public void visitBlankNode(BlankNode blankNode)
Description copied from interface: TypedNodeVisitor
Visit blank node.

Specified by:
visitBlankNode in interface TypedNodeVisitor
Parameters:
blankNode - the blank node to visit.

visitURIReference

public void visitURIReference(URIReference uriReference)
Description copied from interface: TypedNodeVisitor
Visit URI Reference.

Specified by:
visitURIReference in interface TypedNodeVisitor
Parameters:
uriReference - the URI Reference to visit.

visitLiteral

public void visitLiteral(Literal literal)
Description copied from interface: TypedNodeVisitor
Visit Literal.

Specified by:
visitLiteral in interface TypedNodeVisitor
Parameters:
literal - the Literal to visit.

visitNode

public void visitNode(Node node)
Description copied from interface: TypedNodeVisitor
Visit node.

Specified by:
visitNode in interface TypedNodeVisitor
Parameters:
node - the node to visit.

visitResource

public void visitResource(Resource resource)
Description copied from interface: TypedNodeVisitor
Visit Resource.

Specified by:
visitResource in interface TypedNodeVisitor
Parameters:
resource - the node to visit.