org.openrdf.rio.trix
Class TriXParser

java.lang.Object
  extended by org.openrdf.rio.helpers.RDFParserBase
      extended by org.openrdf.rio.trix.TriXParser
All Implemented Interfaces:
RDFParser

public class TriXParser
extends RDFParserBase

A parser that can parse RDF files that are in the TriX format.

Author:
Arjohn Kampman

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.openrdf.rio.RDFParser
RDFParser.DatatypeHandling
 
Field Summary
 
Fields inherited from class org.openrdf.rio.helpers.RDFParserBase
rdfHandler
 
Constructor Summary
TriXParser()
          Creates a new TriXParser that will use a ValueFactoryImpl to create objects for resources, bNodes, literals and statements.
TriXParser(ValueFactory valueFactory)
          Creates a new TriXParser that will use the supplied ValueFactory to create objects for resources, bNodes, literals and statements.
 
Method Summary
 RDFFormat getRDFFormat()
          Gets the RDF format that this parser can parse.
 void parse(InputStream in, String baseURI)
          Parses the data from the supplied InputStream, using the supplied baseURI to resolve any relative URI references.
 void parse(Reader reader, String baseURI)
          Parses the data from the supplied Reader, using the supplied baseURI to resolve any relative URI references.
 
Methods inherited from class org.openrdf.rio.helpers.RDFParserBase
clear, clearBNodeIDMap, createBNode, createBNode, createLiteral, createStatement, createStatement, createURI, datatypeHandling, getNamespace, getParseErrorListener, getParseLocationListener, getRDFHandler, preserveBNodeIDs, reportError, reportError, reportFatalError, reportFatalError, reportFatalError, reportFatalError, reportLocation, reportWarning, reportWarning, resolveURI, setBaseURI, setBaseURI, setDatatypeHandling, setNamespace, setParseErrorListener, setParseLocationListener, setPreserveBNodeIDs, setRDFHandler, setStopAtFirstError, setValueFactory, setVerifyData, stopAtFirstError, verifyData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TriXParser

public TriXParser()
Creates a new TriXParser that will use a ValueFactoryImpl to create objects for resources, bNodes, literals and statements.


TriXParser

public TriXParser(ValueFactory valueFactory)
Creates a new TriXParser that will use the supplied ValueFactory to create objects for resources, bNodes, literals and statements.

Parameters:
valueFactory - A ValueFactory.
Method Detail

getRDFFormat

public final RDFFormat getRDFFormat()
Description copied from interface: RDFParser
Gets the RDF format that this parser can parse.


parse

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

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.
RDFParseException - If the parser has found an unrecoverable parse error.
RDFHandlerException - If the configured statement handler has encountered an unrecoverable error.

parse

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

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.
RDFParseException - If the parser has found an unrecoverable parse error.
RDFHandlerException - If the configured statement handler has encountered an unrecoverable error.


Copyright © 2001-2007 Aduna. All Rights Reserved.