4Suite API Documentation

Module Ft.Rdf.Serializers.TriX

RDF model-to-TriX DOM serialization, TriX XML-to-RDF model deserialization, using SAX, where the serialized XML conforms to TriX syntax.
Classes:
Functions:
Globals:

Classes

class Serializer
Serialize or deserialize a model based on the TriX serialization.

Methods

__init__(self, reify=1)
deserialize(self, model, source)
Generate RDF statements from a TriX serialization and insert these into a Model.
makeTriXComponent(self, doc, name, content)
serialize(self, model, nsMap=None, selectUri=None, localResources=[], implementation=None, stmts=None)
Construct a DOM representing statements in the model.
class TriXHandler(Ft.Xml.Sax.ContentHandler)

Methods

__init__(self, model)
characters(self, content)
Overrides: characters from class ContentHandler
endElementNS(self, (uri, localName), qualifiedName)
Overrides: endElementNS from class ContentHandler
startElementNS(self, (uri, localName), qualifiedName, atts)
Overrides: startElementNS from class ContentHandler
startTriple(self)
useGraph(self)
useId(self)
usePlainLiteral(self)
useTriple(self)
useTypedLiteral(self)
useUri(self)

Methods inherited from class Ft.Xml.Sax.ContentHandler

endDocument, endPrefixMapping, setDocumentLocator, startDocument, startPrefixMapping

Functions

CreateParser([readExtDtd])
CreateParser([readExtDtd]) -> Parser
Return a new XML parser object.

Globals

BNODE_BASE = 'http://4suite.org/rdf/anonymous/'
OBJECT_TYPE_LITERAL = 'L'
OBJECT_TYPE_RESOURCE = 'R'
OBJECT_TYPE_UNKNOWN = '?'
RDF_MS_BASE = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'
RDF_SCHEMA_BASE = 'http://www.w3.org/2000/01/rdf-schema#'
TRIX_NS = 'http://www.w3.org/2004/03/trix/trix-1/'