|
|
- exceptions.Exception
-
- RedlandError
-
- NodeTypeError
- RedlandWarning
- StreamIter
- __builtin__.object
-
- Iterator
- IteratorIter
- IteratorWithContextIter
- Model
- NS
- Node
- Parser
-
- NTriplesParser
- TurtleParser
- Query
- QueryResults
- Serializer
- Statement
- Storage
-
- FileStorage
- HashStorage
- MemoryStorage
- Stream
- StreamWithContextIter
- Uri
- World
class FileStorage(Storage) |
|
Redland file Storage class
import RDF
s=RDF.FileStorage("abc")
Class of file Storage with required name, additional options.
|
|
- Method resolution order:
- FileStorage
- Storage
- __builtin__.object
Methods defined here:
- __init__(self, mem_name, options_string='')
Methods inherited from Storage:
- __del__(self)
Data and other attributes inherited from Storage:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Storage' objects>
- list of weak references to the object (if defined)
|
class HashStorage(Storage) |
|
Redland Hashed Storage class
import RDF
h1=RDF.HashStorage("abc", options="hash-type='memory'")
# Creating a storage with contexts enabled
s=RDF.HashStorage("def", options="contexts='yes'")
Class of hashed Storage for a particular type of hash (typically
hash-type is "memory" or "bdb") and any other options.
|
|
- Method resolution order:
- HashStorage
- Storage
- __builtin__.object
Methods defined here:
- __init__(self, hash_name, options='')
Methods inherited from Storage:
- __del__(self)
Data and other attributes inherited from Storage:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Storage' objects>
- list of weak references to the object (if defined)
|
class Iterator(__builtin__.object) |
|
Redland Node Iterator class
A class for iterating over a sequence of Node s such as
those returned from a Model query. Some methods return
Iterator s or Python sequences. If this is used, it works
as follows:
iterator=model.get_targets_iterator(source, arc)
while not iterator.end():
# get the current Node
node=iterator.current()
# do something with it
# (it is shared; you must copy it you want to keep it)
...
iterator.next()
iterator=None
|
|
Methods defined here:
- __del__(self)
- __init__(self, object, creator1=None, creator2=None, creator3=None)
- Create an RDF Iterator (constructor).
- __iter__(self)
- context(self)
- Return the context Node of the current object on the Iterator
- current(self)
- Return the current object on the Iterator
- end(self)
- Return true if the iterator is exhausted
- have_elements(self)
- next(self)
- Move to the next object on the Iterator
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Iterator' objects>
- list of weak references to the object (if defined)
|
class IteratorIter(__builtin__.object) |
|
|
Methods defined here:
- __init__(self, iterator)
- __iter__(self)
- next(self)
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'IteratorIter' objects>
- list of weak references to the object (if defined)
|
class IteratorWithContextIter(__builtin__.object) |
|
|
Methods defined here:
- __init__(self, iterator)
- __iter__(self)
- next(self)
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'IteratorWithContextIter' objects>
- list of weak references to the object (if defined)
|
class MemoryStorage(Storage) |
|
Redland memory Storage class
import RDF
h1=RDF.MemoryStorage()
h1=RDF.MemoryStorage("abc")
h2=RDF.MemoryStorage("abc", "write='no'")
# Creating a storage with contexts enabled
s = RDF.MemoryStorage(options_string="contexts='yes'")
Class of memory Storage with optional name, additional options.
|
|
- Method resolution order:
- MemoryStorage
- Storage
- __builtin__.object
Methods defined here:
- __init__(self, mem_name='', options_string='')
Methods inherited from Storage:
- __del__(self)
Data and other attributes inherited from Storage:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Storage' objects>
- list of weak references to the object (if defined)
|
class Model(__builtin__.object) |
|
Redland Graph class
import RDF
model = RDF.Model(storage)
The main interface to the Redland RDF graph (formed from triples, or
RDF statements). There are many methods for adding, removing, querying
statements and serializing them to/from syntaxes using the Serializer
or Parser classes.
Models can also be used as Python sequences to give every triple in the
model:
for statement in model:
print statement
Models have other aspects of sequence types. The following also works:
if statement in model: # do whatever
if (statement, context) in model: # do whatever
del model[statement] # remove statement from model
del model[statement, context] # ditto for context-aware model
model.append(statement) # append a statement
model.append(statement, context) # append statement with context
num_items = len(model) # get number of statements in the model
# works only with countable storages
|
|
Methods defined here:
- __contains__(self, arg)
- __del__(self)
- __delitem__(self, arg)
- __init__(self, storage=None, **args)
- Create an RDF Model (constructor).
Create a Model from an existing Storage (most common use).
Optional parameters:
options_string - A string of options for the Model
options_hash - A Hash of options for the Model
m1 = RDF.Model(s1)
m1 = RDF.Model(storage = s1)
Copy an existing model m1, copying the underlying Storage of m1
m2 = RDF.Model(model = m1)
Create a model using an in-memory storage.
m3 = RDF.Model()
- __iter__(self)
- __len__(self)
- add(self, subject, predicate, object)
- Add the statement (subject,predicate,object) to the model.
DEPRECATED. Use Model.append(Statement(s,p,o)) instead.
- add_statement(self, statement, context=None)
- Add the Statement to the Model with optional context Node.
For Python idiom you should use Model.append() instead, which does
the same thing.
- add_statements(self, statement_stream, context=None)
- Add the Stream of Statements to the Model with the optional
context Node
- add_typed_literal_statement(self, subject, predicate, string, xml_language=None, datatype=None)
- Add the Statement (subject,predicate, typed literal) to the Model
where the typed literal is constructed from the
literal string, optional XML language and optional datatype URI.
DEPRECATED. Use Model.append(Statement(s,p,o)) instead.
- append(self, statement, context=None)
- Append a Statement to the Model, with optional context Node.
model.append(Statement(s, p, o)
- arcs = get_predicates(self, source, target)
- as_stream(self, context=None)
- Return the Model as a Stream of Statements. No need to use
this explicitly, instead do:
for statement in model:
# process statement
- as_stream_context(self, context=None)
- Return the Model as a Stream of (statement, context) tuples.
for (s, c) in model.as_stream_context():
# do whatever
Specify the optional argument context if you want to hardwire
the stream's context.
- contains_statement(self, statement)
- Return true if the Statement is in the Model
- contains_statement_context(self, statement, context)
- Return true if the Statement is in the Model with the specified
context. Note that the implementation is pretty inefficient.
- context_remove_statements = remove_statements_with_context(self, context)
- execute(self, query)
- find_statements(self, statement, context=None)
- Return a Stream of Statements matching the given Statement --
any nodes with value None of the statement match any Node in
the Model.
Specify the optional argument context if you want to search
only in one context.
qs = RDF.Statement(subject = None,
predicate = RDF.Node(uri_string = "http://example.com/pred"),
object = None)
for statement in model.find_statements(qs):
# do whatever
- find_statements_context(self, statement)
- Return a Stream of Statements with context, matching the given
Statement -- any nodes with value None of the statement match
any Node in the Model.
qs = RDF.Statement(subject = None,
predicate = RDF.Node(uri_string = "http://example.com/pred"),
object = None)
for (statement, context) in model.find_statements_context(qs):
# do whatever
- get_arc = get_predicate(self, source, target)
- get_arcs = get_predicates(self, source, target)
- get_contexts(self)
- Return a sequence of context Nodes in the Model.
- get_feature(self, uri)
- Return the Node value of Model feature URI uri
- get_predicate(self, source, target)
- Return one Node in the Model matching (source, ?, target).
The source can be a Node or Uri, the target a Node, Uri or string.
- get_predicates(self, source, target)
- Return a sequence of Nodes that are the predicates
of Statements in the Model matching (source, ?, target).
Instead of specifying a Node for source, you can shortcut with
a Uri, and with a Uri or string for target.
e.g.
model.get_predicates(Uri("http://example.com/me"), "Fred")
- get_predicates_context(self, source, target)
- As for Model.get_predicates but returns a list of
(statement, context) tuples.
- get_source(self, predicate, target)
- Return one Node in the Model matching (?, predicate, target).
The predicate can be a Node or Uri, the target a Node, Uri or string.
- get_sources(self, predicate, target)
- Return a sequence of Node s that are the source
of Statements in the Model matching (?, predicate, target).
Instead of specifying a Node for predicate, you can shortcut with
a Uri, and with a Uri or string for target.
e.g.
model.get_sources(Uri("http://example.com/name"), "Fred")
- get_sources_context(self, predicate, target)
- As for Model.get_sources but returns a list of
(statement, context) tuples.
- get_target(self, source, predicate)
- Return one Node in the Model matching (source, predicate, ?).
The source and predicate can be a Node or Uri.
- get_targets(self, source, predicate)
- Return a sequence of Nodes that are the targets
of Statements in the Model matching (source, predicate, ?).
Instead of specifying a Node for source or predicate, you
can shortcut with a Uri.
e.g.
model.get_targets(Uri("http://example.com/me"), prednode)
- get_targets_context(self, source, predicate)
- As for Model.get_targets but returns a list of
(statement, context) tuples.
- load(self, uri, name='', mime_type='', type_uri=None)
- Load triples into the Model from a URI in a syntax.
If no parser name is given, the parser to use is guessed.
- predicates = get_predicates(self, source, target)
- remove_statement(self, statement, context=None)
- Remove the Statement from the Model with the optional context Node.
This is used by the __delitem__ method. Preferred way of removing a
Statement is:
del model[statement]
del model[statement, context]
- remove_statements_with_context(self, context)
- Remove all Statements from the Model with the given context Node
- run_as_statements(self, query)
- serialise = as_stream(self, context=None)
- set_feature(self, uri, value)
- Set the Node value of Model feature URI uri.
- size(self)
- Return the size of the Model in number of statements.
Returns a value < 0 if number of statements not countable.
- sources = get_sources(self, predicate, target)
- sync(self)
- Synchronise the Model with the underlying Storage.
- targets = get_targets(self, source, predicate)
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Model' objects>
- list of weak references to the object (if defined)
|
class NS(__builtin__.object) |
|
Redland Namespace Utility Class
import RDF
nspace = RDF.NS("http://example.com/foo#")
# creates an RDF Node for http://example.com/foo#blah
node1 = nspace.blah
# creates an RDF Node for http://example.com/foo#blah
node2 = nspace['blah']
A class for generating RDF Nodes with URIs from the same vocabulary
(such as XML Namespace) varying only in the appended name in
the vocabulary. Each node returned is a pointer to a shared copy.
|
|
Methods defined here:
- __getattr__(self, localName)
- __getitem__(self, localName)
- __init__(self, prefix)
- node(self, localName)
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'NS' objects>
- list of weak references to the object (if defined)
|
class NTriplesParser(Parser) |
|
|
- Method resolution order:
- NTriplesParser
- Parser
- __builtin__.object
Methods defined here:
- __init__(self, uri=None)
Methods inherited from Parser:
- __del__(self)
- get_feature(self, uri)
- Return the Node value of Parser feature URI uri
- parse_as_stream(self, uri, base_uri=None)
- "Return a Stream of Statements from parsing the content at
(file: only at present) URI, for the optional base URI
or None if the parsing fails.
for statement in parser.parse_as_stream(""):
print statement
- parse_into_model(self, model, uri, base_uri=None)
- "Parse into the Model model from the content at
(file: only at present) URI, for the optional base URI.
parser.parse_into_model(model, "file:./foo.rdf",
"http://example.com/foo.rdf")
- parse_string_as_stream(self, string, base_uri)
- "Return a Stream of Statements from parsing the content in
string with the required base URI or None if the parsing fails.
for statement in parser.parse_string_as_stream(rdfstring, base_uri):
print statement
- parse_string_into_model(self, model, string, base_uri)
- "Parse into the Model model from the content ain string
with the required base URI
- set_feature(self, uri, value)
- Set the Node value of Parser feature URI uri.
Data and other attributes inherited from Parser:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Parser' objects>
- list of weak references to the object (if defined)
|
class Node(__builtin__.object) |
|
Redland Node (RDF Resource, Property, Literal) Class
import RDF
node1=RDF.Node()
node2=RDF.Node(RDF.Uri("http://example.com/"))
node3=RDF.Node("Hello, World!")
node4=RDF.Node(uri_string="http://example.com/")
node5=RDF.Node(literal="<tag>content</tag>", is_wf_xml=1)
node6=RDF.Node(blank="abc")
node7=RDF.Node(node5)
...
print node2
if node7.is_resource():
print "Resource with URI", node7.uri
if node5.is_blank():
print "Resource with blank node name ", node5.blank_identifier
|
|
Methods defined here:
- __del__(self)
- Free an RDF Node (destructor).
- __eq__(self, other)
- Equality of an RDF Node compared to another RDF Node.
- __hash__(self)
- __init__(self, arg=None, **args)
- Create an RDF Node (constructor).
Resource or Property node creation:
n1 = Node(Uri("http://example.com/foo"))
String literal node creation (see below for more complex
ways of building literals.)
n2 = Node("foo")
Node copying:
n3 = Node(n1)
Or create a new RDF Node using the following named parameters:
uri_string - create a resource node from a string URI
uri - create a resource node from a URI object
literal - create a literal node from a literal string
datatype - the datatype URI
is_wf_xml - the literal is XML (alternative to datatype)
xml_language - the literal XML language
blank - create a resource node from with a blank node identiifer
node - copy a node
- __ne__(self, other)
- Inequality of an RDF Node compared to another RDF Node.
- __str__(self)
- Get a string representation of an RDF Node.
- is_blank(self)
- Return true if node is a blank node
- is_literal(self)
- Return true if node is a literal
- is_resource(self)
- Return true if node is a resource with a URI
Properties defined here:
- blank_identifier
- The node identifier of a blank node
-
- get = _get_blank_identifier(self)
- literal_value
- A dictionary containing the value of the node literal
-
- get = _get_literal_value(self)
- type
- The node type, an integer
-
- get = _get_type(self)
- uri
- The URI of a resource node
-
- get = _get_uri(self)
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Node' objects>
- list of weak references to the object (if defined)
|
class Parser(__builtin__.object) |
|
Redland Syntax Parser Class
import RDF
parser1=RDF.Parser()
parser2=RDF.Parser(name="rdfxml")
parser3=RDF.Parser(mime_type="application/rdf+xml")
stream=parser2.parse_as_stream("file://dir/file.rdf")
parser3.parse_into_model(model, "file://dir/file.rdf", "http://example.org/")
The default parser type if not given explicitly is raptor,
for the RDF/XML syntax.
|
|
Methods defined here:
- __del__(self)
- __init__(self, name='rdfxml', mime_type='application/rdf+xml', uri=None)
- Create an RDF Parser (constructor).
Create a new RDF Parser for a particular syntax. The parser is
chosen by the fields given to the constructor, all of which are
optional. When any are given, they must all match.
name - parser name (currently "rdfxml", "ntriples", "turtle" and "rss-tag-soup")
mime_type - currently "application/rdf+xml" (default) or "text/plain" (ntriples)
uri - URI identifying the syntax
currently only "http://www.w3.org/TR/rdf-testcases/#ntriples"
- get_feature(self, uri)
- Return the Node value of Parser feature URI uri
- parse_as_stream(self, uri, base_uri=None)
- "Return a Stream of Statements from parsing the content at
(file: only at present) URI, for the optional base URI
or None if the parsing fails.
for statement in parser.parse_as_stream(""):
print statement
- parse_into_model(self, model, uri, base_uri=None)
- "Parse into the Model model from the content at
(file: only at present) URI, for the optional base URI.
parser.parse_into_model(model, "file:./foo.rdf",
"http://example.com/foo.rdf")
- parse_string_as_stream(self, string, base_uri)
- "Return a Stream of Statements from parsing the content in
string with the required base URI or None if the parsing fails.
for statement in parser.parse_string_as_stream(rdfstring, base_uri):
print statement
- parse_string_into_model(self, model, string, base_uri)
- "Parse into the Model model from the content ain string
with the required base URI
- set_feature(self, uri, value)
- Set the Node value of Parser feature URI uri.
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Parser' objects>
- list of weak references to the object (if defined)
|
class Query(__builtin__.object) |
|
Redland Query interface class
import RDF
q1 = RDF.Query("SELECT ?a ?c WHERE (?a dc:title ?c) USING dc FOR <http://purl.org/dc/elements/1.1/>")
q2 = RDF.Query("- - -",name="triples")
results=q1.execute(model)
for result in results:
print result['a']
print result['c']
for statement in q2.execute().as_stream(model):
print statement
|
|
Methods defined here:
- __del__(self)
- __init__(self, querystring, base_uri=None, query_language='rdql')
- execute(self, model)
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Query' objects>
- list of weak references to the object (if defined)
|
class Serializer(__builtin__.object) |
|
Redland Syntax Serializer Class
import RDF
ser1=RDF.Serializer(mime_type="application/rdf+xml")
A class for turning a Model into a syntax serialization (at present
only to local files).
|
|
Methods defined here:
- __del__(self)
- __init__(self, name='', mime_type='application/rdf+xml', uri=None)
- Create an RDF Serializer (constructor).
- get_feature(self, uri)
- Return the value of Serializer feature URI uri
- serialize_model_to_file(self, name, model, base_uri=None)
- Serialize to filename name the Model model using the
optional base URI.
- set_feature(self, uri, value)
- Set the value of Serializer feature URI uri.
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Serializer' objects>
- list of weak references to the object (if defined)
|
class Statement(__builtin__.object) |
|
Redland Statement (triple) class. The main means of manipulating
statements is by the subject, predicate and object properties.
import RDF
statement1 = RDF.Statement(node1, node2, node3)
statement2 = RDF.Statement(statement = statement1)
if statement2.subject.is_resource():
print "statement2 subject is URI ",statement2.subject.uri
statement.object = Node("hello, world")
|
|
Methods defined here:
- __del__(self)
- __eq__(self, other)
- Equality of an RDF Statement compared to another RDF Statement.
- __init__(self, subject=None, predicate=None, object=None, **args)
- Constructor for Statement.
Create a Statement from three Node objects.
s1 = RDF.Statement(subjnode, prednode, objnode)
A Node argument can be replaced with Uri or string to
shortcut Node creation.
s2 = RDF.Statement(Uri(""), Uri(""), "baz")
Copy an existing Statement s1.
s3 = RDF.Statement(statement=s1)
- __ne__(self, other)
- Inequality of an RDF Statement compared to another RDF Statement.
- __str__(self)
- matches(self, other)
- Comparison of this potentially incomplete RDF Statement compared to another RDF Statement.
Properties defined here:
- object
- The object node of the statement.
-
- get = _get_object(self)
-
- set = _set_object(self, value)
- predicate
- The predicate node of the statement.
-
- get = _get_predicate(self)
-
- set = _set_predicate(self, value)
- subject
- The subject node of the statement.
-
- get = _get_subject(self)
-
- set = _set_subject(self, value)
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Statement' objects>
- list of weak references to the object (if defined)
|
class Storage(__builtin__.object) |
|
Redland Statement Storage class
import RDF
storage=RDF.Storage(storage_name="memory")
The Redland abstraction for storing RDF graphs as Statements.
There are no user methods (can only be constructed).
You should normally use a specialized class such as MemoryStorage or
HashStorage in preference to this class.
|
|
Methods defined here:
- __del__(self)
- __init__(self, **args)
- Create an RDF Storage (constructor).
Create a new RDF Storage using any of these forms
s1=RDF.Storage(storage_name="name")
Create a Storage with the given name. Currently the built in
storages are "memory" and "hashes". "hashes" takes extra
arguments passed in the field options_string, some of which are
required:
options_string="hash-type='memory',new='yes',write='yes'"
hash-type - required and can be the name of any Hash type supported.
'memory' is always present, and 'bdb' is available
when BerkeleyDB is compiled in.
new - optional and takes a boolean value (default false)
If true, it allows updating of an existing Storage
write - optional and takes a boolean value (default true)
If false, the Storage is opened read-only and for file-based
Storages or those with locks, may be shared-read.
The other form is:
s2=RDF.Storage(storage=s1)
Copy an existing Storage s1.
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Storage' objects>
- list of weak references to the object (if defined)
|
class Stream(__builtin__.object) |
|
Redland Statement Stream class
A class encapsulating a sequence of Statements, such as
those returned from a Model query. Can be used as a Python
sequence.
stream = model.find_statements(query_statement)
for statement in stream:
# do whatever with 'statement'
# note it is shared and will go out of scope, so you must
# copy it if you want it to stay around
You should not normally find yourself needing to use this
class explicitly.
|
|
Methods defined here:
- __del__(self)
- __init__(self, object, creator)
- Create an RDF Stream (constructor).
- __iter__(self)
- context(self)
- Return the context Node of the current object on the Stream
- context_iter(self)
- Return an iterator over this stream that
returns (stream, context) tuples each time it is iterated.
DEPRECATED. Instead use the context-aware method appropriate,
e.g. Model.find_statements_context() or Model.as_stream_context()
- current(self)
- Return the current Statement on the Stream
- end(self)
- Return true if the stream is exhausted
- next(self)
- Move to the next Statement on the Stream
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Stream' objects>
- list of weak references to the object (if defined)
|
class StreamWithContextIter(__builtin__.object) |
|
|
Methods defined here:
- __init__(self, stream)
- __iter__(self)
- next(self)
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'StreamWithContextIter' objects>
- list of weak references to the object (if defined)
|
class TurtleParser(Parser) |
|
|
- Method resolution order:
- TurtleParser
- Parser
- __builtin__.object
Methods defined here:
- __init__(self, uri=None)
Methods inherited from Parser:
- __del__(self)
- get_feature(self, uri)
- Return the Node value of Parser feature URI uri
- parse_as_stream(self, uri, base_uri=None)
- "Return a Stream of Statements from parsing the content at
(file: only at present) URI, for the optional base URI
or None if the parsing fails.
for statement in parser.parse_as_stream(""):
print statement
- parse_into_model(self, model, uri, base_uri=None)
- "Parse into the Model model from the content at
(file: only at present) URI, for the optional base URI.
parser.parse_into_model(model, "file:./foo.rdf",
"http://example.com/foo.rdf")
- parse_string_as_stream(self, string, base_uri)
- "Return a Stream of Statements from parsing the content in
string with the required base URI or None if the parsing fails.
for statement in parser.parse_string_as_stream(rdfstring, base_uri):
print statement
- parse_string_into_model(self, model, string, base_uri)
- "Parse into the Model model from the content ain string
with the required base URI
- set_feature(self, uri, value)
- Set the Node value of Parser feature URI uri.
Data and other attributes inherited from Parser:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Parser' objects>
- list of weak references to the object (if defined)
|
class Uri(__builtin__.object) |
|
Redland URI Class
import RDF
uri1 = RDF.Uri("http://example.com/")
uri2 = RDF.Uri(uri1)
|
|
Methods defined here:
- __del__(self)
- __eq__(self, other)
- Equality of RDF URI to another RDF URI.
- __hash__(self)
- __init__(self, arg=None, **args)
- Create an RDF URI (constructor).
Creates a new RDF URI from either of the following forms:
uri1 = RDF.Uri("http://example.com/")
Create a URI from the given string.
uri2 = RDF.Uri(uri1)
Copy an existing URI uri1.
- __ne__(self, other)
- Inequality of RDF URI to another RDF URI.
- __str__(self)
- Get a string representation of an RDF URI.
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'Uri' objects>
- list of weak references to the object (if defined)
|
class World(__builtin__.object) |
|
Redland Initialisation class.
There are no user methods (can only be constructed).
|
|
Methods defined here:
- __del__(self)
- Destroy RDF World object (destructor).
- __init__(self, digest_name='', uri_hash=None)
- Create new RDF World object (constructor)
Data and other attributes defined here:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'World' objects>
- list of weak references to the object (if defined)
|
|