Package rdflib :: Package store :: Class Store
[show private | hide private]
[frames | no frames]

Type Store

object --+
         |
        Store

Known Subclasses:
AbstractSQLStore, AuditableStorage, BerkeleyDB, IOMemory, Memory, MySQL, REGEXMatching, Sleepycat

Method Summary
  __init__(self, configuration, identifier)
identifier: URIRef of the Store.
  __len__(self, context)
Number of statements in the store.
  add(self, (subject, predicate, object), context, quoted)
Adds the given statement to a specific context or to the model.
  addN(self, quads)
Adds each item in the list of statements to a specific context.
  bind(self, prefix, namespace)
  close(self, commit_pending_transaction)
This closes the database connection.
  commit(self)
  contexts(self, triple)
Generator over all contexts in the graph.
  create(self, configuration)
  destroy(self, configuration)
This destroys the instance of the store identified by the configuration string.
  gc(self)
Allows the store to perform any needed garbage collection
  namespace(self, prefix)
  namespaces(self)
  open(self, configuration, create)
Opens the store specified by the configuration string.
  prefix(self, namespace)
  remove(self, (subject, predicate, object), context)
Remove the set of triples matching the pattern from the store
  rollback(self)
  triples(self, (subject, predicate, object), context)
A generator over all the triples matching the pattern.
  triples_choices(self, (subject, predicate, object_), context)
A variant of triples that can take a list of terms instead of a single term in any slot.
  __get_node_pickler(self)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Property Summary
  node_pickler

Class Variable Summary
bool context_aware = False
bool formula_aware = False
bool transaction_aware = False

Method Details

__init__(self, configuration=None, identifier=None)
(Constructor)

identifier: URIRef of the Store. Defaults to CWD configuration: string containing infomation open can use to connect to datastore.
Overrides:
__builtin__.object.__init__

__len__(self, context=None)
(Length operator)

Number of statements in the store. This should only account for non-quoted (asserted) statements if the context is not specified, otherwise it should return the number of statements in the formula or context given.

add(self, (subject, predicate, object), context, quoted=False)

Adds the given statement to a specific context or to the model. The quoted argument is interpreted by formula-aware stores to indicate this statement is quoted/hypothetical It should be an error to not specify a context and have the quoted argument be True. It should also be an error for the quoted argument to be True when the store is not formula-aware.

addN(self, quads)

Adds each item in the list of statements to a specific context. The quoted argument is interpreted by formula-aware stores to indicate this statement is quoted/hypothetical. Note that the default implementation is a redirect to add

close(self, commit_pending_transaction=False)

This closes the database connection. The commit_pending_transaction parameter specifies whether to commit all pending transactions before closing (if the store is transactional).

contexts(self, triple=None)

Generator over all contexts in the graph. If triple is specified, a generator over all contexts the triple is in.

destroy(self, configuration)

This destroys the instance of the store identified by the configuration string.

gc(self)

Allows the store to perform any needed garbage collection

open(self, configuration, create=False)

Opens the store specified by the configuration string. If create is True a store will be created if it does not already exist. If create is False and a store does not already exist an exception is raised. An exception is also raised if a store exists, but there is insufficient permissions to open the store. This should return one of VALID_STORE,CORRUPTED_STORE,or NO_STORE

remove(self, (subject, predicate, object), context=None)

Remove the set of triples matching the pattern from the store

triples(self, (subject, predicate, object), context=None)

A generator over all the triples matching the pattern. Pattern can include any objects for used for comparing against nodes in the store, for example, REGEXTerm, URIRef, Literal, BNode, Variable, Graph, QuotedGraph, Date? DateRange?

A conjunctive query can be indicated by either providing a value of None for the context or the identifier associated with the Conjunctive Graph (if it's context aware).

triples_choices(self, (subject, predicate, object_), context=None)

A variant of triples that can take a list of terms instead of a single term in any slot. Stores can implement this to optimize the response time from the default 'fallback' implementation, which will iterate over each term in the list and dispatch to tripless

Property Details

node_pickler

Get Method:
__get_node_pickler(self)

Class Variable Details

context_aware

Type:
bool
Value:
False                                                                  

formula_aware

Type:
bool
Value:
False                                                                  

transaction_aware

Type:
bool
Value:
False                                                                  

Generated by Epydoc 2.1 on Wed Apr 4 16:05:45 2007 http://epydoc.sf.net