org.apache.jena.riot.system
Class ParserProfileBase

java.lang.Object
  extended by org.apache.jena.riot.system.ParserProfileBase
All Implemented Interfaces:
ParserProfile
Direct Known Subclasses:
ParserProfileChecker

public class ParserProfileBase
extends Object
implements ParserProfile

Basic profile of things, with key operations based on a simple use of the parse elements into Nodes


Constructor Summary
ParserProfileBase(Prologue prologue, ErrorHandler errorHandler)
           
ParserProfileBase(Prologue prologue, ErrorHandler errorHandler, LabelToNode labelMapping)
           
 
Method Summary
 Node create(Node currentGraph, Token token)
          Make any node from a token as appropriate
 Node createBlankNode(Node scope, long line, long col)
          Create a fresh blank node
 Node createBlankNode(Node scope, String label, long line, long col)
          Create a fresh blank node based on scope and label
 Node createLangLiteral(String lexical, String langTag, long line, long col)
          Create a literal for a string+language
 Node createNodeFromToken(Node scope, Token token, long line, long col)
          Special token forms
 Quad createQuad(Node g, Node s, Node p, Node o, long line, long col)
          Create a Quad
 Node createStringLiteral(String lexical, long line, long col)
          Create a literal for a string
 Triple createTriple(Node s, Node p, Node o, long line, long col)
          Create a triple
 Node createTypedLiteral(String lexical, RDFDatatype dt, long line, long col)
          Create a literal for a string+datatype
 Node createURI(String uriStr, long line, long col)
          Create a URI Node
 ErrorHandler getHandler()
           
 LabelToNode getLabelToNode()
           
 Prologue getPrologue()
           
 boolean isStrictMode()
           
 org.apache.jena.iri.IRI makeIRI(String uriStr, long line, long col)
           
 String resolveIRI(String uriStr, long line, long col)
           
 void setHandler(ErrorHandler handler)
           
 void setLabelToNode(LabelToNode mapper)
           
 void setPrologue(Prologue p)
           
 void setStrictMode(boolean mode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParserProfileBase

public ParserProfileBase(Prologue prologue,
                         ErrorHandler errorHandler)

ParserProfileBase

public ParserProfileBase(Prologue prologue,
                         ErrorHandler errorHandler,
                         LabelToNode labelMapping)
Method Detail

getHandler

public ErrorHandler getHandler()
Specified by:
getHandler in interface ParserProfile

setHandler

public void setHandler(ErrorHandler handler)
Specified by:
setHandler in interface ParserProfile

getPrologue

public Prologue getPrologue()
Specified by:
getPrologue in interface ParserProfile

setPrologue

public void setPrologue(Prologue p)
Specified by:
setPrologue in interface ParserProfile

getLabelToNode

public LabelToNode getLabelToNode()
Specified by:
getLabelToNode in interface ParserProfile

setLabelToNode

public void setLabelToNode(LabelToNode mapper)
Specified by:
setLabelToNode in interface ParserProfile

resolveIRI

public String resolveIRI(String uriStr,
                         long line,
                         long col)
Specified by:
resolveIRI in interface ParserProfile

makeIRI

public org.apache.jena.iri.IRI makeIRI(String uriStr,
                                       long line,
                                       long col)
Specified by:
makeIRI in interface ParserProfile

createQuad

public Quad createQuad(Node g,
                       Node s,
                       Node p,
                       Node o,
                       long line,
                       long col)
Description copied from interface: ParserProfile
Create a Quad

Specified by:
createQuad in interface ParserProfile

createTriple

public Triple createTriple(Node s,
                           Node p,
                           Node o,
                           long line,
                           long col)
Description copied from interface: ParserProfile
Create a triple

Specified by:
createTriple in interface ParserProfile

createURI

public Node createURI(String uriStr,
                      long line,
                      long col)
Description copied from interface: ParserProfile
Create a URI Node

Specified by:
createURI in interface ParserProfile

createBlankNode

public Node createBlankNode(Node scope,
                            String label,
                            long line,
                            long col)
Description copied from interface: ParserProfile
Create a fresh blank node based on scope and label

Specified by:
createBlankNode in interface ParserProfile

createBlankNode

public Node createBlankNode(Node scope,
                            long line,
                            long col)
Description copied from interface: ParserProfile
Create a fresh blank node

Specified by:
createBlankNode in interface ParserProfile

createTypedLiteral

public Node createTypedLiteral(String lexical,
                               RDFDatatype dt,
                               long line,
                               long col)
Description copied from interface: ParserProfile
Create a literal for a string+datatype

Specified by:
createTypedLiteral in interface ParserProfile

createLangLiteral

public Node createLangLiteral(String lexical,
                              String langTag,
                              long line,
                              long col)
Description copied from interface: ParserProfile
Create a literal for a string+language

Specified by:
createLangLiteral in interface ParserProfile

createStringLiteral

public Node createStringLiteral(String lexical,
                                long line,
                                long col)
Description copied from interface: ParserProfile
Create a literal for a string

Specified by:
createStringLiteral in interface ParserProfile

createNodeFromToken

public Node createNodeFromToken(Node scope,
                                Token token,
                                long line,
                                long col)
Special token forms

Specified by:
createNodeFromToken in interface ParserProfile

create

public Node create(Node currentGraph,
                   Token token)
Description copied from interface: ParserProfile
Make any node from a token as appropriate

Specified by:
create in interface ParserProfile

isStrictMode

public boolean isStrictMode()
Specified by:
isStrictMode in interface ParserProfile

setStrictMode

public void setStrictMode(boolean mode)
Specified by:
setStrictMode in interface ParserProfile


Licenced under the Apache License, Version 2.0