eu.monnetproject.lemon.impl.io.turtle
Class ParserBase

java.lang.Object
  extended by eu.monnetproject.lemon.impl.io.turtle.ParserBase
Direct Known Subclasses:
TurtleParser

public class ParserBase
extends Object

Author:
John McCrae

Field Summary
protected  Node nLogImplies
           
protected  Node nOwlSameAs
           
protected  Node nRDFfirst
           
protected  Node nRDFnil
           
protected  Node nRDFrest
           
protected  Node nRDFtype
           
protected  boolean skolomizedBNodes
           
protected  boolean strictTurtle
           
protected  String SWAP_LOG_NS
           
protected  String SWAP_NS
           
protected  Node XSD_FALSE
           
protected  Node XSD_TRUE
           
 
Constructor Summary
ParserBase(LemonModelImpl model)
           
ParserBase(Visitor visitor)
           
 
Method Summary
protected  Node createBNode()
           
protected  Node createBNode(String label, int line, int column)
           
protected  Node createListNode()
           
protected  Node createLiteral(String lexicalForm, String langTag, Node datatype)
           
protected  Node createLiteral(String lexicalForm, String langTag, String datatypeURI)
           
protected  Node createLiteralDecimal(String lexicalForm)
           
protected  Node createLiteralDouble(String lexicalForm)
           
protected  Node createLiteralInteger(String lexicalForm)
           
protected  Node createNode(String iri)
           
protected  Node createVariable(String s, int line, int column)
           
protected  double doubleValue(String s)
           
protected  void emitTriple(int line, int col, Triple triple)
           
protected  void endFormula(int line, int col)
           
protected static String exMsg(String msg, int line, int column)
           
protected  String fixupPrefix(String prefix, int line, int column)
           
protected  String getBaseURI()
           
protected  long integerValue(String s)
           
protected  boolean isBNodeIRI(String iri)
           
protected  int makePositiveInteger(String lexicalForm)
           
protected  String resolveIRI(String iriStr, int line, int column)
           
protected  String resolvePName(String qname, int line, int column)
           
protected  String resolveQuotedIRI(String iriStr, int line, int column)
           
protected  void setBase(String iriStr, int line, int column)
           
 void setBaseURI(String u)
           
protected  void setPrefix(int line, int col, String prefix, String uri)
           
protected  void startFormula(int line, int col)
           
protected  String stripChars(String s, int n)
           
protected  String stripQuotes(String s)
           
protected  String stripQuotes3(String s)
           
protected  void throwParseException(String s, int line, int column)
           
static String unescapeStr(String s)
           
protected  String unescapeStr(String s, int line, int column)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XSD_TRUE

protected final Node XSD_TRUE

XSD_FALSE

protected final Node XSD_FALSE

nRDFtype

protected final Node nRDFtype

nRDFfirst

protected final Node nRDFfirst

nRDFrest

protected final Node nRDFrest

nRDFnil

protected final Node nRDFnil

nOwlSameAs

protected final Node nOwlSameAs

nLogImplies

protected final Node nLogImplies

SWAP_NS

protected final String SWAP_NS
See Also:
Constant Field Values

SWAP_LOG_NS

protected final String SWAP_LOG_NS
See Also:
Constant Field Values

strictTurtle

protected boolean strictTurtle

skolomizedBNodes

protected boolean skolomizedBNodes
Constructor Detail

ParserBase

public ParserBase(LemonModelImpl model)

ParserBase

public ParserBase(Visitor visitor)
Method Detail

getBaseURI

protected String getBaseURI()

setBaseURI

public void setBaseURI(String u)

setBase

protected void setBase(String iriStr,
                       int line,
                       int column)

emitTriple

protected void emitTriple(int line,
                          int col,
                          Triple triple)

startFormula

protected void startFormula(int line,
                            int col)

endFormula

protected void endFormula(int line,
                          int col)

setPrefix

protected void setPrefix(int line,
                         int col,
                         String prefix,
                         String uri)

makePositiveInteger

protected int makePositiveInteger(String lexicalForm)

createLiteralInteger

protected Node createLiteralInteger(String lexicalForm)

createLiteralDouble

protected Node createLiteralDouble(String lexicalForm)

createLiteralDecimal

protected Node createLiteralDecimal(String lexicalForm)

createLiteral

protected Node createLiteral(String lexicalForm,
                             String langTag,
                             Node datatype)

createLiteral

protected Node createLiteral(String lexicalForm,
                             String langTag,
                             String datatypeURI)

integerValue

protected long integerValue(String s)

doubleValue

protected double doubleValue(String s)

stripQuotes

protected String stripQuotes(String s)

stripQuotes3

protected String stripQuotes3(String s)

stripChars

protected String stripChars(String s,
                            int n)

resolveQuotedIRI

protected String resolveQuotedIRI(String iriStr,
                                  int line,
                                  int column)

resolveIRI

protected String resolveIRI(String iriStr,
                            int line,
                            int column)

resolvePName

protected String resolvePName(String qname,
                              int line,
                              int column)

createListNode

protected Node createListNode()

createBNode

protected Node createBNode()

createBNode

protected Node createBNode(String label,
                           int line,
                           int column)

createVariable

protected Node createVariable(String s,
                              int line,
                              int column)

createNode

protected Node createNode(String iri)

isBNodeIRI

protected boolean isBNodeIRI(String iri)

throwParseException

protected void throwParseException(String s,
                                   int line,
                                   int column)

fixupPrefix

protected String fixupPrefix(String prefix,
                             int line,
                             int column)

unescapeStr

public static String unescapeStr(String s)

unescapeStr

protected String unescapeStr(String s,
                             int line,
                             int column)

exMsg

protected static String exMsg(String msg,
                              int line,
                              int column)


Copyright © 2012. All Rights Reserved.