org.restlet.ext.rdf
Class GraphHandler

java.lang.Object
  extended by org.restlet.ext.rdf.GraphHandler
Direct Known Subclasses:
GraphBuilder

public abstract class GraphHandler
extends Object

Handler for the content of a Graph. List of callbacks used when parsing or writing a representation of a RDF graph.


Constructor Summary
GraphHandler()
           
 
Method Summary
 void endGraph()
          Callback method used after the graph is parsed or written.
 void endPrefixMapping(String prefix)
          Callback method used at the end of a Namespace mapping.
abstract  void link(Graph source, Reference typeRef, Literal target)
          Callback method used when a link is parsed or written.
abstract  void link(Graph source, Reference typeRef, Reference target)
          Callback method used when a link is parsed or written.
abstract  void link(Reference source, Reference typeRef, Literal target)
          Callback method used when a link is parsed or written.
abstract  void link(Reference source, Reference typeRef, Reference target)
          Callback method used when a link is parsed or written.
 void startGraph()
          Callback method used before the graph is parsed or written.
 void startPrefixMapping(String prefix, Reference reference)
          Callback method used at the start of a Namespace mapping.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphHandler

public GraphHandler()
Method Detail

endGraph

public void endGraph()
              throws IOException
Callback method used after the graph is parsed or written. Does nothing by default.

Throws:
IOException

endPrefixMapping

public void endPrefixMapping(String prefix)
Callback method used at the end of a Namespace mapping. Does nothing by default.

Parameters:
prefix - The Namespace prefix.

link

public abstract void link(Graph source,
                          Reference typeRef,
                          Literal target)
Callback method used when a link is parsed or written.

Parameters:
source - The source or subject of the link.
typeRef - The type reference of the link.
target - The target or object of the link.

link

public abstract void link(Graph source,
                          Reference typeRef,
                          Reference target)
Callback method used when a link is parsed or written.

Parameters:
source - The source or subject of the link.
typeRef - The type reference of the link.
target - The target or object of the link.

link

public abstract void link(Reference source,
                          Reference typeRef,
                          Literal target)
Callback method used when a link is parsed or written.

Parameters:
source - The source or subject of the link.
typeRef - The type reference of the link.
target - The target or object of the link.

link

public abstract void link(Reference source,
                          Reference typeRef,
                          Reference target)
Callback method used when a link is parsed or written.

Parameters:
source - The source or subject of the link.
typeRef - The type reference of the link.
target - The target or object of the link.

startGraph

public void startGraph()
                throws IOException
Callback method used before the graph is parsed or written. Does nothing by default.

Throws:
IOException

startPrefixMapping

public void startPrefixMapping(String prefix,
                               Reference reference)
Callback method used at the start of a Namespace mapping. Does nothing by default.

Parameters:
prefix - The Namespace prefix being declared.
reference - The Namespace URI mapped to the prefix.


Copyright © 2005-2013 Restlet.