4Suite API Documentation

Module Ft.Rdf.Statement

An RDF statement
Copyright 2005 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/


class Statement(Ft.Rdf.Resource.Resource)
Represents an RDF triple or statement


__cmp__(self, other)
# always define when defining __cmp__ or obj will be unhashable
__init__(self, subject, predicate, object_, statementUri='', scope='', objectType='?')
Initializer for an RDF statement instance. statementUri is the URI of this statement. scope is usually the URI of the serialized source of this statement.
Overrides: __init__ from class Resource
Overrides: __repr__ from class Resource
asTuple(self, encoding=None)
Returns the statement data as a tuple in this order: (subject, object, predicate, scope, statementUri, objectType)
If an encoding argument is given, all values are coerced to that encoding.
Otherwise, they are left as-is. If the encoding is the special value
'unicode', then the values are coerced to unicode types.
reify(self, model, uri=None)
Prepare the statement in the model so that it can be the subject of other statements. See the RDF spec for details of how statements are expanded for reification. Note that the original statement is not removed by reification. The statement's uri is used as the subject of the added statements, or a URI is generated if the statement's uri is an empty string.

Methods inherited from class Ft.Rdf.Resource.Resource


RDF_MS_BASE = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'