pretty
index
/home/syosi/cvs-trunk/WWW/2000/10/swap/pretty.py

$Id: pretty.html,v 1.13 2004/11/10 00:50:21 syosi Exp $
 
Printing of N3 and RDF formulae
 
20003-8-20 split offf from llyn.py
 
This is or was http://www.w3.org/2000/10/swap/pretty.py

 
Modules
       
diag
string
types

 
Classes
       
Serializer

 
class Serializer
    A serializer to serialize the formula F into the given
abstract syntax sink
 
  Methods defined here:
__init__(self, F, sink, flags='', sorting=0)
dumpBySubject(self, sorting=1)
Dump one formula only by order of subject except forSome's first for n3=a mode
dumpChronological(self)
Fast as possible. Only dumps data. No formulae or universals.
dumpFormulaContents(self, context, sink, sorting, equals=0)
Iterates over statements in formula, bunching them up into a set
for each subject.
dumpLists(self)
dumpNested(self)
Iterates over all URIs ever seen looking for statements
dumpPrefixes(self)
dumpStatement(self, sink, triple, sorting)
Dump one statement, including structure within object
dumpVariables(self, context, sink, sorting=1, pretty=0, dataOnly=0)
Dump the forAlls and the forSomes at the top of a formula
extern(self, t)
notAsExtern(self, t)
selectDefaultPrefix(self, printFunction)
Symbol whose fragments have the most occurrences.
we suppress the RDF namespace itself because the XML syntax has problems with it
being default as it is used for attributes.
 
This also outputs the prefixes.

 
Functions
       
canItbeABNode(formula, symbol)

 
Data
        ALL4 = (0, 1, 2, 3)
CONTEXT = 0
DAML_sameAs_URI = 'http://www.w3.org/2002/07/owl#sameAs'
FLOAT_DATATYPE = 'http://www.w3.org/2001/XMLSchema#double'
INTEGER_DATATYPE = 'http://www.w3.org/2001/XMLSchema#integer'
List_NS = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'
Logic_NS = 'http://www.w3.org/2000/10/swap/log#'
META_NS_URI = 'http://www.w3.org/2000/10/swap/meta#'
N3_Empty = (0, 'http://www.w3.org/1999/02/22-rdf-syntax-ns#Empty')
N3_List = (0, 'http://www.w3.org/1999/02/22-rdf-syntax-ns#List')
N3_first = (0, 'http://www.w3.org/1999/02/22-rdf-syntax-ns#first')
N3_nil = (0, 'http://www.w3.org/1999/02/22-rdf-syntax-ns#nil')
N3_rest = (0, 'http://www.w3.org/1999/02/22-rdf-syntax-ns#rest')
OBJ = 3
OWL_NS = 'http://www.w3.org/2002/07/owl#'
PARTS = (1, 2, 3)
PRED = 1
RDF_NS_URI = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'
RDF_type_URI = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'
STRING_NS_URI = 'http://www.w3.org/2000/10/swap/string#'
SUBJ = 2
cvsRevision = '$Revision: 1.13 $'
forAllSym = 'http://www.w3.org/2000/10/swap/log#forAll'
forSomeSym = 'http://www.w3.org/2000/10/swap/log#forSome'
prefixchars = 'abcdefghijklmnopqustuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
tracking = 0