public class RdfNTriplesReader extends RdfReader
| Modifier and Type | Field and Description |
|---|---|
int |
EOF
End of reading buffer marker.
|
| Constructor and Description |
|---|
RdfNTriplesReader(Representation rdfRepresentation,
GraphHandler graphHandler)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
consumeStatement()
Discard all read characters until the end of the statement is reached
(marked by a '.').
|
protected void |
consumeWhiteSpaces()
Discard all read characters.
|
protected void |
discard()
Discard all read characters.
|
protected char |
getChar()
Returns the current parsed character.
|
protected String |
getCurrentToken()
Returns the current token.
|
String |
getParsingMessage()
Returns a message describing the current state of the parsing process.
|
protected String |
getParsingMessage(char[] buffer,
int startTokenIndex,
int scoutIndex)
Returns a message describing the current state of the parsing process.
|
protected boolean |
isAlphaNum(int c)
Returns true if the given character is alphanumeric.
|
protected boolean |
isDelimiter(int c)
Returns true if the given character is a delimiter.
|
protected boolean |
isEndOfFile(int c) |
protected boolean |
isWhiteSpace(int c)
Returns true if the given character is a whitespace.
|
void |
parse()
Parses the current representation.
|
protected void |
parseComment()
Parses a comment.
|
protected void |
parseStatement()
Reads the current statement until its end, and parses it.
|
protected String |
parseToken()
Returns the value of the current token.
|
protected String |
parseUri()
Returns the value of the current URI.
|
protected int |
step()
Read a new character.
|
protected void |
step(int n)
Steps forward.
|
protected void |
stepBack()
Steps back of one step.
|
protected void |
stepBack(int n)
Steps back.
|
getGraphHandler, getRdfRepresentationpublic final int EOF
public RdfNTriplesReader(Representation rdfRepresentation, GraphHandler graphHandler) throws IOException
rdfRepresentation - The representation to read.graphHandler - The graph handler invoked during the parsing.IOExceptionprotected void consumeStatement()
throws IOException
IOExceptionprotected void consumeWhiteSpaces()
throws IOException
getCurrentToken will
return a single character.IOExceptionprotected void discard()
getCurrentToken will
return a single character.protected char getChar()
protected String getCurrentToken()
public String getParsingMessage()
protected String getParsingMessage(char[] buffer, int startTokenIndex, int scoutIndex)
buffer - The current buffer.startTokenIndex - The start index of parsing.scoutIndex - The index of the probable future token.protected boolean isAlphaNum(int c)
c - The given character to check.protected boolean isDelimiter(int c)
c - The given character to check.protected boolean isEndOfFile(int c)
protected boolean isWhiteSpace(int c)
c - The given character to check.public void parse()
throws IOException
parse in class RdfReaderIOExceptionprotected void parseComment()
throws IOException
IOExceptionprotected void parseStatement()
throws IOException
context - The current context.IOExceptionprotected String parseToken() throws IOException
IOExceptionprotected String parseUri() throws IOException
IOExceptionprotected int step()
throws IOException
IOExceptionprotected void step(int n)
throws IOException
n - The number of steps to go forward.IOExceptionprotected void stepBack()
protected void stepBack(int n)
n - The number of steps to go back.Copyright © 2005–2016. All rights reserved.