org.jrdf.parser.rdfxml
Class GraphRdfXmlParser

java.lang.Object
  extended by org.jrdf.parser.rdfxml.GraphRdfXmlParser
All Implemented Interfaces:
Parser

public class GraphRdfXmlParser
extends Object
implements Parser

An RDF/XML parser that adds every triple encountered to a JRDF Graph. Use the default parser configuration.

Version:
$Revision: 544 $
Author:
Andrew Newman

Constructor Summary
GraphRdfXmlParser(Graph graph)
           
GraphRdfXmlParser(Graph graph, ParserBlankNodeFactory blankNodeFactory)
           
 
Method Summary
 void parse(InputStream in, String baseURI)
          Parses the data from the supplied InputStream, using the supplied BASE_URI to resolve any relative URI references.
 void parse(Reader reader, String baseURI)
          Parses the data from the supplied Reader, using the supplied BASE_URI to resolve any relative URI references.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphRdfXmlParser

public GraphRdfXmlParser(Graph graph)
                  throws GraphException
Throws:
GraphException

GraphRdfXmlParser

public GraphRdfXmlParser(Graph graph,
                         ParserBlankNodeFactory blankNodeFactory)
                  throws GraphException
Throws:
GraphException
Method Detail

parse

public void parse(InputStream in,
                  String baseURI)
           throws IOException,
                  ParseException,
                  StatementHandlerException
Description copied from interface: Parser
Parses the data from the supplied InputStream, using the supplied BASE_URI to resolve any relative URI references.

Specified by:
parse in interface Parser
Parameters:
in - The InputStream from which to read the data.
baseURI - The URI associated with the data in the InputStream.
Throws:
IOException - If an I/O error occurred while data was read from the InputStream.
ParseException - If the parser has found an unrecoverable parse error.
StatementHandlerException - If the configured statement handler has encountered an unrecoverable error.

parse

public void parse(Reader reader,
                  String baseURI)
           throws IOException,
                  ParseException,
                  StatementHandlerException
Description copied from interface: Parser
Parses the data from the supplied Reader, using the supplied BASE_URI to resolve any relative URI references.

Specified by:
parse in interface Parser
Parameters:
reader - The Reader from which to read the data.
baseURI - The URI associated with the data in the InputStream.
Throws:
IOException - If an I/O error occurred while data was read from the InputStream.
ParseException - If the parser has found an unrecoverable parse error.
StatementHandlerException - If the configured statement handler has encountered an unrecoverable error.