4Suite API Documentation

Module Ft.Rdf.ThirdParty.n3p.n3proc

n3proc - An N3 Processor using n3.n3 Author: Sean B. Palmer, inamidst.com Licence: GPL 2; share and enjoy! Documentation: http://inamidst.com/n3p/
usage: 
   %prog [options] <URI>
Classes:
Functions:
Globals:

Classes

class N3Processor(Ft.Rdf.ThirdParty.n3p.n3p.N3Parser)

Methods

__init__(self, uri, sink, baseURI=False)
Overrides: __init__ from class N3Parser
bnode(self, label, sic=False)
declarationFinish(self)
declarationToken(self, prod, tok)
documentStart(self, prod)
dtlangToken(self, prod, tok)
existentialFinish(self)
existentialStart(self, prod)
literal(self, content, language, datatype)
literalFinish(self)
literalStart(self, prod)
literalToken(self, prod, tok)
nodeToken(self, prod, tok)
objectFinish(self)
onFinish(self)
Overrides: onFinish from class N3Parser
onStart(self, prod)
Overrides: onStart from class N3Parser
onToken(self, prod, tok)
Overrides: onToken from class N3Parser
parse(self, start='http://www.w3.org/2000/10/swap/grammar/n3#document')
Overrides: parse from class N3Parser
pathFinish(self)
pathStart(self, prod)
pathtailFinish(self)
pathtailStart(self, prod)
pathtailToken(self, prod, tok)
propertylisttailToken(self, prod, tok)
qname(self, tok)
simpleStatementFinish(self)
simpleStatementStart(self, prod)
symbolToken(self, prod, tok)
triple(self, subj, pred, objt)
univar(self, label, sic=False)
universalFinish(self)
universalStart(self, prod)
uri(self, tok)
verbToken(self, prod, tok)

Methods inherited from class Ft.Rdf.ThirdParty.n3p.n3p.N3Parser

Methods inherited from class object

__delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Members inherited from class Ft.Rdf.ThirdParty.n3p.n3p.N3Parser

Members inherited from class object

__class__
class NTriplesSink(object)

Methods

__init__(self, out=None)
Overrides: __init__ from class object
flatten(self, s, p, o, f)
makeStatementID(self)
quantify(self, formula, var)
start(self, root)
statement(self, s, p, o, f)

Methods inherited from class object

__delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Members

__dict__ = <attribute '__dict__' of 'NTriplesSink' objects>
__weakref__ = <attribute '__weakref__' of 'NTriplesSink' objects>

Members inherited from class object

__class__
class Namespace(unicode)

Methods

__getattr__(self, attr)

Methods inherited from class unicode

__add__, __cmp__, __contains__, __getattribute__, __getitem__, __getnewargs__, __getslice__, __hash__, __len__, __mod__, __mul__, __new__, __repr__, __rmod__, __rmul__, __str__, capitalize, center, count, encode, endswith, expandtabs, find, index, isalnum, isalpha, isdecimal, isdigit, islower, isnumeric, isspace, istitle, isupper, join, ljust, lower, lstrip, replace, rfind, rindex, rjust, rstrip, split, splitlines, startswith, strip, swapcase, title, translate, upper, zfill

Methods inherited from class object

__delattr__, __init__, __reduce__, __reduce_ex__, __setattr__

Members

__dict__ = <attribute '__dict__' of 'Namespace' objects>
__weakref__ = <attribute '__weakref__' of 'Namespace' objects>

Members inherited from class object

__class__
class ParseError(Exception)

Methods inherited from class Exception

__getitem__, __init__, __str__

Functions

Literal(content, language=None, datatype=None)
URI(uri)
Var(label)
bNode(name)
main(argv=None)
parse(uri, options)
quote(s)
unquote(s, triplequoted=False)
Unquote an N-Triples string. Derived from: http://inamidst.com/proj/rdf/ntriples.py

Globals

branches = {u'_:jcOJHCYs16': {u',': [u',', 'http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs16'], u'.': [], u'}': []}, u'_:jcOJHCYs20': {u',': [u',', 'http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs20'], u'.': [], u'}': []}, u'_:jcOJHCYs33': {u'.': [], u':': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs16'], u'<': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs16'], u'_': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs16'], u'a': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs16'], u'}': []}, u'_:jcOJHCYs36': {u'.': [], u':': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs20'], u'<': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs20'], u'_': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs20'], u'a': ['http://www.w3.org/2000/10/swap/grammar/n3#symbol', '_:jcOJHCYs20'], u'}': []}, u'_:jcOJHCYs44': {u'.': [], u'_': ['http://www.w3.org/2000/10/swap/grammar/n3#barename', '_:jcOJHCYs9'], u'a': ['http://www.w3.org/2000/10/swap/grammar/n3#barename', '_:jcOJHCYs9'], u'}': []}, u'_:jcOJHCYs9': {u',': [u',', 'http://www.w3.org/2000/10/swap/grammar/n3#barename', '_:jcOJHCYs9'], u'.': [], u'}': []}, u'http://www.w3.org/2000/10/swap/grammar/n3#declaration': {u'@keywords': [u'@keywords', '_:jcOJHCYs44'], u'@prefix': [u'@prefix', 'http://www.w3.org/2000/10/swap/grammar/n3#qname', 'http://www.w3.org/2000/10/swap/grammar/n3#explicituri']}, u'http://www.w3.org/2000/10/swap/grammar/n3#document': {u'"': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'(': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'+': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'-': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'0': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u':': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'<': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'?': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'@EOFDUMMY': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], u'@forAll': ['http://www.w3.org/2000/10/swap/grammar/n3#statements_optional', 'http://www.w3.org/2000/10/swap/grammar/bnf#eof'], ...}, u'http://www.w3.org/2000/10/swap/grammar/n3#dtlang': {u'!': [], u'"': [], u'(': [], u')': [], u'+': [], u',': [], u'-': [], u'.': [], u'0': [], u':': [], ...}, u'http://www.w3.org/2000/10/swap/grammar/n3#existential': {u'@forSome': [u'@forSome', '_:jcOJHCYs36']}, ...}
quot = {'"': '"', r'\': r'\', 'n': '\n', 'r': '\r', 't': '\t'}
r_hibyte = <_sre.SRE_Pattern object>
r_quot = <_sre.SRE_Pattern object>
r_safe = <_sre.SRE_Pattern object>
r_unilower = <_sre.SRE_Pattern object>
r_uniquot = <_sre.SRE_Pattern object>
regexps = {u'http://www.w3.org/2000/10/swap/grammar/n3#barename': <_sre.SRE_Pattern object>, u'http://www.w3.org/2000/10/swap/grammar/n3#explicituri': <_sre.SRE_Pattern object>, u'http://www.w3.org/2000/10/swap/grammar/n3#langcode': <_sre.SRE_Pattern object>, u'http://www.w3.org/2000/10/swap/grammar/n3#numericliteral': <_sre.SRE_Pattern object>, u'http://www.w3.org/2000/10/swap/grammar/n3#qname': <_sre.SRE_Pattern object>, u'http://www.w3.org/2000/10/swap/grammar/n3#string': <_sre.SRE_Pattern object>, u'http://www.w3.org/2000/10/swap/grammar/n3#variable': <_sre.SRE_Pattern object>}
start = 'http://www.w3.org/2000/10/swap/grammar/n3#document'