| Home | Trees | Index | Help |
|---|
| Package ccrdf :: Module rdfdict :: Class rdfDict |
|
ccLicense,
ccWork| Method Summary | |
|---|---|
Creates a new rdfDict given the particular subject and an optional TripleStore (rdfStore). | |
Returns true if the given key appears as a predicate of the subject. | |
Removes all items with the given key. | |
Return the object described in RDF with a subject of self.subject and a predicate of key. | |
Returns an iterator over the unique keys (predicates) for the given subject. | |
Returns the number of predicate-object pairs associated with the subject self.subject. | |
Adds an RDF triple of the values (self.subject, key, value); any objects with the same subject/predicate are replaced. | |
Return the string representation of this instance using an algorithm inspired by the Dublic Core dumb-down method. | |
Return the subject used to create the instance (usually equivalent to rdf:about. | |
Adds an RDF triple consisting of the subject, key and value. | |
Adds the list of objects in values with the same subject and predicate. | |
Returns a list of objects which have a predicate of key. | |
Returns the first object having the predicate key. | |
Returns an iterator over the unique keys (predicates) for the given subject. | |
Removes a specific key-value pair. | |
| Method Details |
|---|
__init__(self,
subject,
rdfStore=None)
Creates a new rdfDict given the particular subject and an optional
TripleStore (rdfStore). If no TripleStore is provided, creates a new
one.
|
__contains__(self,
key)
Returns true if the given key appears as a predicate of the
subject.
|
__delitem__(self,
key)
Removes all items with the given key.
|
__getitem__(self,
key)
Return the object described in RDF with a subject of self.subject
and a predicate of key. If more than one match is found, raises an
AmbiguousKeyError.
|
__iter__(self)Returns an iterator over the unique keys (predicates) for the given subject. |
__len__(self)
Returns the number of predicate-object pairs associated with the
subject self.subject.
|
__setitem__(self,
key,
value)
Adds an RDF triple of the values (self.subject, key, value); any
objects with the same subject/predicate are replaced.
|
__str__(self)
Return the string representation of this instance using an algorithm
inspired by the Dublic Core dumb-down method.
|
about(self)Return the subject used to create the instance (usually equivalent to rdf:about. |
add(self, key, value)Adds an RDF triple consisting of the subject, key and value. |
addAll(self, key, values)Adds the list of objects in values with the same subject and predicate. |
getAll(self, key)Returns a list of objects which have a predicate of key. The list may be empty or contain only a single element. |
getFirst(self, key)Returns the first object having the predicate key. If no match is found returns None. |
iterkeys(self)Returns an iterator over the unique keys (predicates) for the given subject. |
remove(self, key, value)Removes a specific key-value pair. |
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Mon Jul 10 17:08:26 2006 | http://epydoc.sf.net |