de.fuberlin.wiwiss.ng4j.trix
Class TriXParser
java.lang.Object
de.fuberlin.wiwiss.ng4j.trix.TriXParser
public class TriXParser
- extends Object
A parser for TriX files (see
TriX
specification). Parsed graphs and triples are passed to a
ParserCallback
for further processing.
TODO: Deal with TriX XSLT syntactic extensions
TODO: Have only one parse() method, with InputSource argument
- Author:
- Richard Cyganiak (richard@cyganiak.de)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TriXParser
public TriXParser()
parse
public void parse(InputStream source,
URI baseURI,
ParserCallback callback)
throws IOException,
SAXException
- Parses a TriX file from an InputStream. Parsed graphs and triples are passed
to the callback.
- Parameters:
source
- a stream containing a TriX filebaseURI
- the URI of the input file (for resolving relative URIs)callback
- receives parsed graphs and triples
- Throws:
SAXException
- on XML parse error
IOException
- on I/O error when reading from source
parse
public void parse(Reader source,
URI baseURI,
ParserCallback callback)
throws IOException,
SAXException
- Parses a TriX file from a Reader. Parsed graphs and triples are passed
to the callback.
- Parameters:
source
- a stream containing a TriX filebaseURI
- the URI of the input file (for resolving relative URIs)callback
- receives parsed graphs and triples
- Throws:
SAXException
- on XML parse error
IOException
- on I/O error when reading from source