public class RdfN3Reader extends RdfTurtleReader
EOF| Constructor and Description |
|---|
RdfN3Reader(Representation rdfN3Representation,
GraphHandler graphHandler)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
generateLinks(List<LexicalUnit> lexicalUnits)
Loops over the given list of lexical units and generates the adequat
calls to link* methods.
|
protected boolean |
isDelimiter(int c)
Returns true if the given character is a delimiter.
|
protected boolean |
isPath(LexicalUnit lexicalUnit)
Returns true if the given lexical unit is a "path" shorthand.
|
protected void |
link(Object source,
Reference typeRef,
Object target)
Callback method used when a link is parsed or written.
|
protected void |
parseBlankNode(BlankNodeToken blankNode)
Parse the given blank node.
|
protected void |
parseFormula(FormulaToken formulaToken)
Parses the given formula token.
|
protected void |
parseList(ListToken listToken)
Parse the given list token.
|
protected void |
parseStatement(Context context)
Reads the current statement until its end, and parses it.
|
getContext, newBlankNodeId, parse, parseDirective, parseString, parseToken, parseUriconsumeStatement, consumeWhiteSpaces, discard, getChar, getCurrentToken, getParsingMessage, getParsingMessage, isAlphaNum, isEndOfFile, isWhiteSpace, parseComment, parseStatement, parseToken, parseUri, step, step, stepBack, stepBackgetGraphHandler, getRdfRepresentationpublic RdfN3Reader(Representation rdfN3Representation, GraphHandler graphHandler) throws IOException
rdfRepresentation - The representation to read.graphHandler - The graph handler invoked during the parsing.IOExceptionprotected void generateLinks(List<LexicalUnit> lexicalUnits)
RdfTurtleReadergenerateLinks in class RdfTurtleReaderlexicalUnits - The list of lexical units used to generate the links.GraphHandler.link(Graph, Reference, Reference),
GraphHandler.link(Reference, Reference, Literal),
GraphHandler.link(Reference, Reference, Reference)protected boolean isDelimiter(int c)
RdfTurtleReaderisDelimiter in class RdfTurtleReaderc - The given character to check.protected boolean isPath(LexicalUnit lexicalUnit)
lexicalUnit - The lexical unit to analyse.protected void link(Object source, Reference typeRef, Object target)
link in class RdfTurtleReadersource - The source or subject of the link.typeRef - The type reference of the link.target - The target or object of the link.protected void parseBlankNode(BlankNodeToken blankNode) throws IOException
RdfTurtleReaderparseBlankNode in class RdfTurtleReaderblankNode - The blank node to parse.IOExceptionprotected void parseFormula(FormulaToken formulaToken) throws IOException
formulaToken - The formula token to parse.IOExceptionprotected void parseList(ListToken listToken) throws IOException
RdfTurtleReaderparseList in class RdfTurtleReaderlistToken - The list token to parse.IOExceptionprotected void parseStatement(Context context) throws IOException
RdfTurtleReaderparseStatement in class RdfTurtleReadercontext - The current context.IOExceptionCopyright © 2005–2015. All rights reserved.