Package rdflib :: Module Graph :: Class Context
[show private | hide private]
[frames | no frames]

Type Context

object --+    
         |    
     Graph --+
             |
            Context


Method Summary
  __init__(self, graph, identifier)
  __len__(self, context)
Returns the number of triples in the graph.
  add(self, triple, context)
  bind(self, prefix, namespace, override)
Bind prefix to namespace.
  remove(self, triple, context)
  triples(self, triple, context)
    Inherited from Graph
  __contains__(self, triple)
Support for 'triple in graph' syntax.
  __eq__(self, other)
Test if Graph is exactly equal to Graph other.
  __iadd__(self, other)
Add all triples in Graph other to Graph.
  __isub__(self, other)
Subtract all triples in Graph other from Graph.
  __iter__(self)
Iterates over all triples in the store.
  absolutize(self, uri, defrag)
Will turn uri into an absolute URI if it's not one already.
  close(self)
Close the graph backend.
  comment(self, subject, default)
Queries for the RDFS.comment of the subject, returns default if no comment exists.
  contexts(self, triple)
Generator over all contexts in the graph.
  get_context(self, identifier)
Returns a Context graph for the given identifier, which must be a URIRef or BNode.
  items(self, list)
Generator over all items in the resource specified by list (an RDF collection)
  label(self, subject, default)
Queries for the RDFS.label of the subject, returns default if no label exists.
  load(self, location, publicID, format)
for b/w compat.
  namespaces(self)
Generator over all the prefix, namespace tuples.
  objects(self, subject, predicate)
A generator of objects with the given subject and predicate.
  open(self, path)
Open the graph backend.
  parse(self, source, publicID, format)
Parse source into Graph.
  predicate_objects(self, subject)
A generator of (predicate, object) tuples for the given subject
  predicates(self, subject, object)
A generator of predicates with the given subject and object.
  remove_context(self, identifier)
Removes the given context from the graph.
  save(self, location, format, base)
Save Graph to location using format.
  seq(self, subject)
Check if subject is an rdf:Seq.
  serialize(self, destination, format, base)
Serialize the Graph to destination.
  subject_objects(self, predicate)
A generator of (subject, object) tuples for the given predicate
  subject_predicates(self, object)
A generator of (subject, predicate) tuples for the given object
  subjects(self, predicate, object)
A generator of subjects with the given predicate and object.
  transitive_objects(self, subject, property, remember)
  transitive_subjects(self, predicate, object, remember)
  value(self, subject, predicate, object, default, any)
Get a value for a subject/predicate, predicate/object, or subject/object pair -- exactly one of subject, predicate, object must be None.
    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
  context_aware
    Inherited from Graph
  backend
  namespace_manager

Method Details

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

Returns the number of triples in the graph. If context is specified then the number of triples in the context is returned instead.
Overrides:
rdflib.Graph.Graph.__len__ (inherited documentation)

bind(self, prefix, namespace, override=True)

Bind prefix to namespace. If override is True will bind namespace to given prefix if namespace was already bound to a different prefix.
Overrides:
rdflib.Graph.Graph.bind (inherited documentation)

Generated by Epydoc 2.1 on Wed Jun 29 09:50:16 2005 http://epydoc.sf.net