Package RDFFormats :: Module Store :: Class Store
[show private | hide private]
[frames | no frames]

Class Store

AbstractHandler --+
                  |
  AbstractStore --+
                  |
                 Store

Known Subclasses:
Store

A store class providing, in each instance, a wrapper around an underlying
store, convenience attributes based on namespaces from the Format module and
node types from the underlying store implementation, and a selection of
higher-level operations relevant to parsing and writing.

Method Summary
  __init__(self, store, impl, prefix)
Initialise the store with the given underlying 'store' and implementation 'impl'.
  add_attribute(self, parent, label)
Add to the given 'parent' a special attribute node with the given 'label'.
  add_contains(self, node, element)
  add_name(self, node, name)
  add_node(self, label, uriref)
Add a node using the given 'label' to indicate its type and an optional 'uriref' to provide an identity.
  add_value(self, attribute, label, value)
Add to the given 'attribute', described by the given 'label', the specified 'value'.
  close(self)
Close the underlying store.
  commit(self)
Commit changes to the underlying store if appropriate.
  contexts(self)
Return a list of contexts found in this store.
  get_context(self, context)
Return a copy of this store which uses the given 'context' to constrain operations on the stored triples.
  get_label(self, node)
Return a label representing the given 'node'.
  get_node_type(self, node)
Return the type of the given 'node'.
  get_uid(self, node)
Return the uid for the given 'node' (a store identifier).
  has_item(self, uriref)
  make_uid(self, value)
Return a store identifier for the given plain uid 'value'.
  remove_context(self, context)
Removes the specified 'context' from the database.
  remove_node(self, node, deep)
Remove the given 'node' and its attributes from the store.
  rollback(self)
Roll back changes to the underlying store if appropriate.
    Inherited from AbstractHandler
  get_supported_item_types(self)
  get_urirefs_for_attribute(self, attribute)
  get_urirefs_for_item_type(self, item_type_name)
  get_urirefs_for_property_type(self, property_type_name)
  parse(self, f, name, uriref)
  parse_document_fragment(self, doc, root, uriref)
  supports_item_type(self, item_type_str)
  write_to_document(self, doc, root, main_node, nodes, qualifier, value_as_attribute)
  write_to_stream(self, stream, main_node, nodes, *args, **kw)

Class Variable Summary
list connector_labels = []
NoneType prefix = None                                                                  
list uriref_labels = []

Method Details

__init__(self, store, impl, prefix=None)
(Constructor)

Initialise the store with the given underlying 'store' and
implementation 'impl'. The additional 'prefix' specifies the namespace
prefix which may qualify properties/predicates associated with this
store.

add_attribute(self, parent, label)

Add to the given 'parent' a special attribute node with the given
'label'. Return the created node.

add_node(self, label, uriref=None)

Add a node using the given 'label' to indicate its type and an optional
'uriref' to provide an identity. Return the node identity.
Overrides:
RDFFormats.Store.AbstractStore.add_node

add_value(self, attribute, label, value)

Add to the given 'attribute', described by the given 'label', the
specified 'value'.

close(self)

Close the underlying store.

commit(self)

Commit changes to the underlying store if appropriate.

contexts(self)

Return a list of contexts found in this store.

get_context(self, context)

Return a copy of this store which uses the given 'context' to constrain
operations on the stored triples.

get_label(self, node)

Return a label representing the given 'node'.

get_node_type(self, node)

Return the type of the given 'node'.

get_uid(self, node)

Return the uid for the given 'node' (a store identifier). Unlike
'make_uid', this method distinguishes between simple non-URI identifiers
and URIs.

make_uid(self, value)

Return a store identifier for the given plain uid 'value'.

remove_context(self, context)

Removes the specified 'context' from the database.

remove_node(self, node, deep=0)

Remove the given 'node' and its attributes from the store. If the
optional 'deep' flag is set (as is not the default), remove all linked
nodes recursively, stopping only at connector attributes which should
mark the interfaces between items of different types.
Overrides:
RDFFormats.Store.AbstractHandler.remove_node

rollback(self)

Roll back changes to the underlying store if appropriate.

Class Variable Details

connector_labels

Type:
list
Value:
[]                                                                     

prefix

Type:
NoneType
Value:
None                                                                  

uriref_labels

Type:
list
Value:
[]                                                                     

Generated by Epydoc 2.1 on Tue Sep 18 23:33:17 2007 http://epydoc.sf.net