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, parseUri
consumeStatement, consumeWhiteSpaces, discard, getChar, getCurrentToken, getParsingMessage, getParsingMessage, isAlphaNum, isEndOfFile, isWhiteSpace, parseComment, parseStatement, parseToken, parseUri, step, step, stepBack, stepBack
getGraphHandler, getRdfRepresentation
public RdfN3Reader(Representation rdfN3Representation, GraphHandler graphHandler) throws IOException
rdfRepresentation
- The representation to read.graphHandler
- The graph handler invoked during the parsing.IOException
protected void generateLinks(List<LexicalUnit> lexicalUnits)
RdfTurtleReader
generateLinks
in class RdfTurtleReader
lexicalUnits
- 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)
RdfTurtleReader
isDelimiter
in class RdfTurtleReader
c
- 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 RdfTurtleReader
source
- 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
RdfTurtleReader
parseBlankNode
in class RdfTurtleReader
blankNode
- The blank node to parse.IOException
protected void parseFormula(FormulaToken formulaToken) throws IOException
formulaToken
- The formula token to parse.IOException
protected void parseList(ListToken listToken) throws IOException
RdfTurtleReader
parseList
in class RdfTurtleReader
listToken
- The list token to parse.IOException
protected void parseStatement(Context context) throws IOException
RdfTurtleReader
parseStatement
in class RdfTurtleReader
context
- The current context.IOException
Copyright © 2005–2015. All rights reserved.