public class TurtleParser
extends org.openrdf.rio.helpers.RDFParserBase
| Modifier and Type | Field and Description |
|---|---|
protected StringBuilder |
buffer |
protected NamespaceMap |
namespaceMap |
protected PushbackReader |
reader |
| Constructor and Description |
|---|
TurtleParser() |
TurtleParser(NamespaceMap namespaceMap) |
TurtleParser(NamespaceMap namespaceMap,
org.openrdf.model.ValueFactory valueFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendCodePoint(StringBuilder builder,
int c) |
protected void |
assertEquals(int expected,
int actual) |
protected void |
assertEqualsIgnoreCase(int expected,
int actual) |
protected void |
assertIgnoreCase(String expected) |
protected void |
assertNext(int expected) |
protected void |
assertWhitespace() |
protected void |
base() |
protected org.openrdf.model.BNode |
blankNodePropertyList() |
protected StringBuilder |
buffer() |
protected void |
directive(int c) |
protected StringBuilder |
err() |
protected void |
fail(String msg) |
protected void |
fail(StringBuilder builder) |
NamespaceMap |
getNamespaceMap() |
org.openrdf.rio.RDFFormat |
getRDFFormat() |
protected char |
hex() |
protected void |
initParse(Reader reader,
String baseURI) |
protected boolean |
inRange(int c,
int min,
int max) |
protected org.openrdf.model.URI |
iri() |
protected org.openrdf.model.URI |
iri(int c)
iri ::= IRIREF | PrefixedName
|
protected String |
iriRef() |
protected String |
iriRef(int c) |
protected IriTemplate |
iriTemplate() |
protected boolean |
isDigit(int c) |
protected boolean |
isLetter(int c) |
protected boolean |
isWhitespace(int c) |
protected void |
namespace(String prefix,
String name) |
protected int |
next() |
protected String |
nextWord(String delim) |
protected org.openrdf.model.Value |
object(int c)
object ::= iri | BlankNode | collection | blankNodePropertyList | literal
|
void |
parse(InputStream in,
String baseURI) |
void |
parse(Reader reader,
String baseURI) |
protected int |
peek() |
protected boolean |
plx(int c)
PLX ::= PERCENT | PN_LOCAL_ESC
|
protected boolean |
pn_chars_base(int c) |
protected boolean |
pn_chars_u(int c)
PN_CHARS_U ::= PN_CHARS_BASE | '_'
|
protected boolean |
pn_chars(int c)
PN_CHARS ::= PN_CHARS_U | '-' | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040]
|
String |
pn_local()
PN_LOCAL ::= (PN_CHARS_U | ':' | [0-9] | PLX) ((PN_CHARS | '.' | ':' | PLX)* (PN_CHARS | ':' | PLX))?
|
protected String |
pn_prefix() |
protected void |
pn_prefix(int c)
PN_PREFIX ::= PN_CHARS_BASE ((PN_CHARS | '.')* PN_CHARS)?
|
protected String |
pname_ns()
PNAME_NS ::= PN_PREFIX? ':'
|
protected void |
predicateObjectList(org.openrdf.model.Resource subject) |
protected org.openrdf.model.URI |
prefixedName(int c)
PrefixedName ::= PNAME_LN | PNAME_NS
::= (PNAME_NS PN_LOCAL) | PNAME_NS
::= PNAME_NS PN_LOCAL?
|
protected void |
prefixID()
prefixID ::= '@prefix' PNAME_NS IRIREF '.'
|
protected int |
read() |
protected void |
read(char c) |
protected void |
readSpace() |
protected boolean |
skipSpace() |
protected void |
statement(org.openrdf.model.Resource subject,
org.openrdf.model.URI predicate,
org.openrdf.model.Value object) |
protected org.openrdf.model.Resource |
subject(int c)
subject ::= iri | BlankNode | collection
|
protected void |
triples(int c) |
protected org.openrdf.model.BNode |
tryBlankNodePropertyList(int c)
blankNodePropertyList ::= '[' predicateObjectList ']'
|
protected String |
tryCaseInsensitiveWord(String text) |
protected org.openrdf.model.Literal |
tryLiteral() |
protected boolean |
tryWhitespace() |
protected boolean |
tryWord(String text) |
protected void |
unread(int codePoint) |
protected void |
unread(String text) |
protected org.openrdf.model.URI |
verb() |
clear, clearBNodeIDMap, createBNode, createBNode, createLiteral, createLiteral, createStatement, createStatement, createURI, datatypeHandling, getNamespace, getParseErrorListener, getParseLocationListener, getParserConfig, getRDFHandler, getSupportedSettings, initializeNamespaceTableFromConfiguration, preserveBNodeIDs, reportError, reportError, reportError, reportFatalError, reportFatalError, reportFatalError, reportFatalError, reportLocation, reportWarning, reportWarning, resolveURI, setBaseURI, setBaseURI, setDatatypeHandling, setNamespace, setParseErrorListener, setParseLocationListener, setParserConfig, setPreserveBNodeIDs, setRDFHandler, setStopAtFirstError, setValueFactory, setVerifyData, stopAtFirstError, verifyDataprotected PushbackReader reader
protected StringBuilder buffer
protected NamespaceMap namespaceMap
public TurtleParser()
public TurtleParser(NamespaceMap namespaceMap)
public TurtleParser(NamespaceMap namespaceMap, org.openrdf.model.ValueFactory valueFactory)
protected StringBuilder buffer()
protected String nextWord(String delim) throws IOException
IOExceptionpublic NamespaceMap getNamespaceMap()
protected void directive(int c)
throws IOException,
org.openrdf.rio.RDFParseException,
org.openrdf.rio.RDFHandlerException
IOExceptionorg.openrdf.rio.RDFParseExceptionorg.openrdf.rio.RDFHandlerExceptionprotected void base()
throws org.openrdf.rio.RDFParseException
org.openrdf.rio.RDFParseExceptionprotected void prefixID()
throws org.openrdf.rio.RDFParseException,
IOException,
org.openrdf.rio.RDFHandlerException
prefixID ::= '@prefix' PNAME_NS IRIREF '.'This method assumes we have already read '@prefix'
org.openrdf.rio.RDFParseExceptionIOExceptionorg.openrdf.rio.RDFHandlerExceptionprotected void namespace(String prefix, String name) throws org.openrdf.rio.RDFHandlerException
org.openrdf.rio.RDFHandlerExceptionprotected String pname_ns() throws IOException, org.openrdf.rio.RDFParseException
PNAME_NS ::= PN_PREFIX? ':'
IOExceptionorg.openrdf.rio.RDFParseExceptionprotected String pn_prefix() throws org.openrdf.rio.RDFParseException, IOException
org.openrdf.rio.RDFParseExceptionIOExceptionprotected void pn_prefix(int c)
throws IOException,
org.openrdf.rio.RDFParseException
IOExceptionorg.openrdf.rio.RDFParseExceptionprotected boolean pn_chars(int c)
protected boolean pn_chars_u(int c)
protected boolean pn_chars_base(int c)
protected boolean inRange(int c,
int min,
int max)
protected void readSpace()
throws IOException,
org.openrdf.rio.RDFParseException
IOExceptionorg.openrdf.rio.RDFParseExceptionprotected boolean skipSpace()
throws IOException
IOExceptionprotected void triples(int c)
throws org.openrdf.rio.RDFParseException,
IOException,
org.openrdf.rio.RDFHandlerException
org.openrdf.rio.RDFParseExceptionIOExceptionorg.openrdf.rio.RDFHandlerExceptionprotected void predicateObjectList(org.openrdf.model.Resource subject)
throws IOException,
org.openrdf.rio.RDFParseException,
org.openrdf.rio.RDFHandlerException
IOExceptionorg.openrdf.rio.RDFParseExceptionorg.openrdf.rio.RDFHandlerExceptionprotected void statement(org.openrdf.model.Resource subject,
org.openrdf.model.URI predicate,
org.openrdf.model.Value object)
throws org.openrdf.rio.RDFHandlerException
org.openrdf.rio.RDFHandlerExceptionprotected org.openrdf.model.Value object(int c)
throws org.openrdf.rio.RDFParseException,
IOException,
org.openrdf.rio.RDFHandlerException
object ::= iri | BlankNode | collection | blankNodePropertyList | literal
org.openrdf.rio.RDFParseExceptionIOExceptionorg.openrdf.rio.RDFHandlerExceptionprotected org.openrdf.model.BNode blankNodePropertyList()
throws IOException,
org.openrdf.rio.RDFParseException,
org.openrdf.rio.RDFHandlerException
IOExceptionorg.openrdf.rio.RDFParseExceptionorg.openrdf.rio.RDFHandlerExceptionprotected org.openrdf.model.BNode tryBlankNodePropertyList(int c)
throws IOException,
org.openrdf.rio.RDFParseException,
org.openrdf.rio.RDFHandlerException
blankNodePropertyList ::= '[' predicateObjectList ']'
IOExceptionorg.openrdf.rio.RDFHandlerExceptionorg.openrdf.rio.RDFParseExceptionprotected void appendCodePoint(StringBuilder builder, int c)
protected org.openrdf.model.Literal tryLiteral()
throws IOException,
org.openrdf.rio.RDFParseException,
org.openrdf.rio.RDFHandlerException
IOExceptionorg.openrdf.rio.RDFParseExceptionorg.openrdf.rio.RDFHandlerExceptionprotected void unread(String text) throws IOException
IOExceptionprotected boolean isLetter(int c)
protected boolean isDigit(int c)
protected void assertEqualsIgnoreCase(int expected,
int actual)
throws org.openrdf.rio.RDFParseException
org.openrdf.rio.RDFParseExceptionprotected void assertIgnoreCase(String expected) throws IOException, org.openrdf.rio.RDFParseException
IOExceptionorg.openrdf.rio.RDFParseExceptionprotected void assertEquals(int expected,
int actual)
throws org.openrdf.rio.RDFParseException
org.openrdf.rio.RDFParseExceptionprotected void assertNext(int expected)
throws IOException,
org.openrdf.rio.RDFParseException
IOExceptionorg.openrdf.rio.RDFParseExceptionprotected void assertWhitespace()
throws IOException,
org.openrdf.rio.RDFParseException
IOExceptionorg.openrdf.rio.RDFParseExceptionprotected org.openrdf.model.URI verb()
throws IOException,
org.openrdf.rio.RDFParseException,
org.openrdf.rio.RDFHandlerException
IOExceptionorg.openrdf.rio.RDFParseExceptionorg.openrdf.rio.RDFHandlerExceptionprotected org.openrdf.model.Resource subject(int c)
throws org.openrdf.rio.RDFParseException,
IOException,
org.openrdf.rio.RDFHandlerException
subject ::= iri | BlankNode | collection
org.openrdf.rio.RDFHandlerExceptionorg.openrdf.rio.RDFParseExceptionIOExceptionprotected org.openrdf.model.URI iri()
throws org.openrdf.rio.RDFParseException,
IOException,
org.openrdf.rio.RDFHandlerException
org.openrdf.rio.RDFParseExceptionIOExceptionorg.openrdf.rio.RDFHandlerExceptionprotected org.openrdf.model.URI iri(int c)
throws org.openrdf.rio.RDFParseException,
IOException,
org.openrdf.rio.RDFHandlerException
org.openrdf.rio.RDFHandlerExceptionorg.openrdf.rio.RDFParseExceptionIOExceptionprotected org.openrdf.model.URI prefixedName(int c)
throws IOException,
org.openrdf.rio.RDFParseException
PrefixedName ::= PNAME_LN | PNAME_NS
::= (PNAME_NS PN_LOCAL) | PNAME_NS
::= PNAME_NS PN_LOCAL?
IOExceptionorg.openrdf.rio.RDFParseExceptionpublic String pn_local() throws IOException, org.openrdf.rio.RDFParseException
PN_LOCAL ::= (PN_CHARS_U | ':' | [0-9] | PLX) ((PN_CHARS | '.' | ':' | PLX)* (PN_CHARS | ':' | PLX))?
IOExceptionorg.openrdf.rio.RDFParseExceptionprotected boolean plx(int c)
throws IOException,
org.openrdf.rio.RDFParseException
PLX ::= PERCENT | PN_LOCAL_ESC
IOExceptionorg.openrdf.rio.RDFParseExceptionprotected IriTemplate iriTemplate() throws org.openrdf.rio.RDFParseException, IOException
org.openrdf.rio.RDFParseExceptionIOExceptionprotected String iriRef() throws IOException, org.openrdf.rio.RDFParseException
IOExceptionorg.openrdf.rio.RDFParseExceptionprotected String iriRef(int c) throws IOException, org.openrdf.rio.RDFParseException
IOExceptionorg.openrdf.rio.RDFParseExceptionprotected char hex()
throws IOException,
org.openrdf.rio.RDFParseException
IOExceptionorg.openrdf.rio.RDFParseExceptionprotected StringBuilder err()
protected void fail(String msg) throws org.openrdf.rio.RDFParseException
org.openrdf.rio.RDFParseExceptionprotected void fail(StringBuilder builder) throws org.openrdf.rio.RDFParseException
org.openrdf.rio.RDFParseExceptionprotected int next()
throws IOException
IOExceptionpublic org.openrdf.rio.RDFFormat getRDFFormat()
public void parse(InputStream in, String baseURI) throws IOException, org.openrdf.rio.RDFParseException, org.openrdf.rio.RDFHandlerException
IOExceptionorg.openrdf.rio.RDFParseExceptionorg.openrdf.rio.RDFHandlerExceptionpublic void parse(Reader reader, String baseURI) throws IOException, org.openrdf.rio.RDFParseException, org.openrdf.rio.RDFHandlerException
IOExceptionorg.openrdf.rio.RDFParseExceptionorg.openrdf.rio.RDFHandlerExceptionprotected int read()
throws IOException
IOExceptionprotected void unread(int codePoint)
throws IOException
IOExceptionprotected boolean isWhitespace(int c)
protected boolean tryWhitespace()
throws IOException
IOExceptionprotected String tryCaseInsensitiveWord(String text) throws IOException
IOExceptionprotected boolean tryWord(String text) throws IOException
IOExceptionprotected void read(char c)
throws IOException,
org.openrdf.rio.RDFParseException
IOExceptionorg.openrdf.rio.RDFParseExceptionprotected int peek()
throws IOException
IOExceptionCopyright © 2019. All rights reserved.