org.openrdf.rio.trig
Class TriGParser
java.lang.Object
org.openrdf.rio.helpers.RDFParserBase
org.openrdf.rio.turtle.TurtleParser
org.openrdf.rio.trig.TriGParser
- All Implemented Interfaces:
- RDFParser
public class TriGParser
- extends TurtleParser
RDF parser for TriG files.
This parser is not thread-safe, therefore its public methods are
synchronized.
This implementation is based on the 2005/06/06 version of the TriG
specification, but implemented as an extension of the Turtle specification of
2006/01/02.
- Author:
- Arjohn Kampman
- See Also:
TurtleParser
|
Constructor Summary |
TriGParser()
Creates a new TriGParser that will use a ValueFactoryImpl to
create RDF model objects. |
TriGParser(ValueFactory valueFactory)
Creates a new TriGParser that will use the supplied ValueFactory to create
RDF model objects. |
| Methods inherited from class org.openrdf.rio.turtle.TurtleParser |
parse, parse, parseBase, parseCollection, parseDirective, parseImplicitBlank, parseLongString, parseNodeID, parseNumber, parseObject, parseObjectList, parsePredicate, parsePredicateObjectList, parsePrefixID, parseQNameOrBoolean, parseQuotedLiteral, parseQuotedString, parseString, parseSubject, parseTriples, parseURI, parseValue, peek, read, reportError, reportFatalError, reportFatalError, reportLocation, reportWarning, skipLine, skipWSC, throwEOFException, unread, verifyCharacter |
| Methods inherited from class org.openrdf.rio.helpers.RDFParserBase |
clear, clearBNodeIDMap, createBNode, createBNode, createLiteral, createStatement, createStatement, createURI, datatypeHandling, getNamespace, getParseErrorListener, getParseLocationListener, getRDFHandler, preserveBNodeIDs, reportError, reportFatalError, reportFatalError, reportLocation, 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 |
TriGParser
public TriGParser()
- Creates a new TriGParser that will use a
ValueFactoryImpl to
create RDF model objects.
TriGParser
public TriGParser(ValueFactory valueFactory)
- Creates a new TriGParser that will use the supplied ValueFactory to create
RDF model objects.
- Parameters:
valueFactory - A ValueFactory.
getRDFFormat
public RDFFormat getRDFFormat()
- Description copied from interface:
RDFParser
- Gets the RDF format that this parser can parse.
- Specified by:
getRDFFormat in interface RDFParser- Overrides:
getRDFFormat in class TurtleParser
parseStatement
protected void parseStatement()
throws IOException,
RDFParseException,
RDFHandlerException
- Overrides:
parseStatement in class TurtleParser
- Throws:
IOException
RDFParseException
RDFHandlerException
parseGraph
protected void parseGraph()
throws IOException,
RDFParseException,
RDFHandlerException
- Throws:
IOException
RDFParseException
RDFHandlerException
reportStatement
protected void reportStatement(Resource subj,
URI pred,
Value obj)
throws RDFParseException,
RDFHandlerException
- Overrides:
reportStatement in class TurtleParser
- Throws:
RDFParseException
RDFHandlerException
Copyright © 2001-2007 Aduna. All Rights Reserved.