Class TurtleParser
java.lang.Object
org.semanticweb.owlapi.rdf.turtle.parser.TurtleParser
- All Implemented Interfaces:
TurtleParserConstants
The Class TurtleParser.
-
Field Summary
FieldsModifier and TypeFieldDescriptionorg.semanticweb.owlapi.rdf.turtle.parser.Token
Next token.org.semanticweb.owlapi.rdf.turtle.parser.Token
Current token.org.semanticweb.owlapi.rdf.turtle.parser.TurtleParserTokenManager
Generated Token Manager.Fields inherited from interface org.semanticweb.owlapi.rdf.turtle.parser.TurtleParserConstants
A, AT, BASE, CLOSE_SQUARE_BRACKET, CLOSEPAR, COMMA, COMMENT, DECIMAL, DEFAULT, DIGIT, DOT, DOUBLE, DOUBLE_CARET, EMPTY_BLANK_NODE, EOF, ERROR, EXPONENT, FALSE, FILTER, FULLIRI, IN_LONG_SINGLESTRING, IN_LONG_STRING, IN_SINGLESTRING, IN_STRING, INTEGER, LETTER, LONG_SINGLESTRING, LONG_STRING, NODE_ID_START, NODEID, OPEN_SQUARE_BRACKET, OPENPAR, PN_CHARS, PN_CHARS_BASE, PN_CHARS_U, PN_LOCAL, PN_PREFIX, PNAME_LN, PNAME_NS, PREFIX, QUOTE, SELECT, SEMICOLON, SINGLEQUOTE, SINGLESTRING, STRING, tokenImage, TRIQUOTE, TRISINGLEQUOTE, TRUE, WHERE
-
Constructor Summary
ConstructorsConstructorDescriptionTurtleParser
(InputStream is, TripleHandler handler, IRI base) Instantiates a new turtle parser.TurtleParser
(Reader reader, TripleHandler handler, IRI base) Instantiates a new turtle parser.TurtleParser
(String dsl) Constructor.TurtleParser
(org.semanticweb.owlapi.rdf.turtle.parser.Provider stream) Constructor.TurtleParser
(org.semanticweb.owlapi.rdf.turtle.parser.TurtleParserTokenManager tm) Constructor with generated Token Manager. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
Disable tracing.final void
Enable tracing.org.semanticweb.owlapi.rdf.turtle.parser.ParseException
Generate ParseException.Gets the iri.final org.semanticweb.owlapi.rdf.turtle.parser.Token
Get the next Token.Gets the prefix manager.final org.semanticweb.owlapi.rdf.turtle.parser.Token
getToken
(int index) Get the specific Token.final IRI
final void
final IRI
final String
final IRI
final String
final void
final void
final String
final String
final IRI
parseIRI()
final IRI
final void
parseLiteral
(IRI subject, IRI predicate) final IRI
final IRI
final void
parseObject
(IRI subject, IRI predicate) final void
parseObjectList
(IRI subject, IRI predicate) final IRI
final void
parsePredicateObjectList
(IRI subject) final void
final String
final IRI
final void
final String
final IRI
final void
final IRI
void
void
ReInit
(org.semanticweb.owlapi.rdf.turtle.parser.Provider stream) Reinitialise.void
ReInit
(org.semanticweb.owlapi.rdf.turtle.parser.TurtleParserTokenManager tm) Reinitialise.void
setTripleHandler
(TripleHandler handler) Sets the triple handler.final boolean
Trace enabled.
-
Field Details
-
token_source
public org.semanticweb.owlapi.rdf.turtle.parser.TurtleParserTokenManager token_sourceGenerated Token Manager. -
token
public org.semanticweb.owlapi.rdf.turtle.parser.Token tokenCurrent token. -
jj_nt
public org.semanticweb.owlapi.rdf.turtle.parser.Token jj_ntNext token.
-
-
Constructor Details
-
TurtleParser
Instantiates a new turtle parser.- Parameters:
reader
- the readerhandler
- the handlerbase
- the base- Throws:
IOException
-
TurtleParser
Instantiates a new turtle parser.- Parameters:
is
- the ishandler
- the handlerbase
- the base- Throws:
IOException
-
TurtleParser
public TurtleParser(org.semanticweb.owlapi.rdf.turtle.parser.Provider stream) Constructor. -
TurtleParser
public TurtleParser(String dsl) throws org.semanticweb.owlapi.rdf.turtle.parser.ParseException, org.semanticweb.owlapi.rdf.turtle.parser.TokenMgrException Constructor.- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
org.semanticweb.owlapi.rdf.turtle.parser.TokenMgrException
-
TurtleParser
public TurtleParser(org.semanticweb.owlapi.rdf.turtle.parser.TurtleParserTokenManager tm) Constructor with generated Token Manager.
-
-
Method Details
-
getPrefixManager
Gets the prefix manager.- Returns:
- the prefix manager
-
setTripleHandler
Sets the triple handler.- Parameters:
handler
- the new triple handler
-
getIRI
Gets the iri.- Parameters:
s
- the s- Returns:
- the iri
-
parseDocument
public final void parseDocument() throws org.semanticweb.owlapi.rdf.turtle.parser.ParseException- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseDirective
public final void parseDirective() throws org.semanticweb.owlapi.rdf.turtle.parser.ParseException- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parsePrefixDirective
public final void parsePrefixDirective() throws org.semanticweb.owlapi.rdf.turtle.parser.ParseException- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseBaseDirective
public final void parseBaseDirective() throws org.semanticweb.owlapi.rdf.turtle.parser.ParseException- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseStatement
public final void parseStatement() throws org.semanticweb.owlapi.rdf.turtle.parser.ParseException- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseTriples
public final void parseTriples() throws org.semanticweb.owlapi.rdf.turtle.parser.ParseException- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseSubject
- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseLoneNS
- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseAbbreviatedIRI
public final IRI parseAbbreviatedIRI() throws org.semanticweb.owlapi.rdf.turtle.parser.ParseException- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseIRI
- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseBlankNode
- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseNodeID
- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parsePredicateObjectList
public final void parsePredicateObjectList(IRI subject) throws org.semanticweb.owlapi.rdf.turtle.parser.ParseException - Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseVerb
- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parsePredicate
- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseResource
- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseObjectList
public final void parseObjectList(IRI subject, IRI predicate) throws org.semanticweb.owlapi.rdf.turtle.parser.ParseException - Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseObject
public final void parseObject(IRI subject, IRI predicate) throws org.semanticweb.owlapi.rdf.turtle.parser.ParseException - Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseCollection
- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseItemList
- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseLiteral
public final void parseLiteral(IRI subject, IRI predicate) throws org.semanticweb.owlapi.rdf.turtle.parser.ParseException - Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseInteger
- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseDouble
- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseDecimal
- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseBoolean
- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseQuotedString
public final String parseQuotedString() throws org.semanticweb.owlapi.rdf.turtle.parser.ParseException- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
parseString
- Throws:
org.semanticweb.owlapi.rdf.turtle.parser.ParseException
-
ReInit
-
ReInit
public void ReInit(org.semanticweb.owlapi.rdf.turtle.parser.Provider stream) Reinitialise. -
ReInit
public void ReInit(org.semanticweb.owlapi.rdf.turtle.parser.TurtleParserTokenManager tm) Reinitialise. -
getNextToken
public final org.semanticweb.owlapi.rdf.turtle.parser.Token getNextToken()Get the next Token. -
getToken
public final org.semanticweb.owlapi.rdf.turtle.parser.Token getToken(int index) Get the specific Token. -
generateParseException
public org.semanticweb.owlapi.rdf.turtle.parser.ParseException generateParseException()Generate ParseException. -
trace_enabled
public final boolean trace_enabled()Trace enabled. -
enable_tracing
public final void enable_tracing()Enable tracing. -
disable_tracing
public final void disable_tracing()Disable tracing.
-