Nepomuk Namespace Reference
from PyKDE4.nepomuk.Nepomuk import *
Detailed Description
Class Index
Enumerations | |
ErrorCode | { NoError, CommunicationError, InvalidType, UnknownError } |
Functions | |
Nepomuk.Variant | RDFLiteralToValue (Soprano.Node node) |
QString | defaultGraph () |
QString | errorString (Nepomuk.ErrorCode code) |
QUrl | extractNamespace (QUrl url) |
QString | naoNamespace () |
QString | nrlNamespace () |
long | qHash (Nepomuk.Resource res) |
QString | rdfNamepace () |
QString | rdfsNamespace () |
setDefaultRepository (QString s) | |
QString | typePredicate () |
Soprano.Node | valueToRDFNode (Nepomuk.Variant a0) |
[Soprano.Node] | valuesToRDFNodes (Nepomuk.Variant a0) |
Enumeration Documentation
ErrorCode |
- Enumerator:
-
NoError = 0 CommunicationError InvalidType UnknownError
Function Documentation
Nepomuk.Variant RDFLiteralToValue | ( | Soprano.Node | node | |
) |
- Deprecated:
- Use Variant.fromNode() instead.
QString defaultGraph | ( | ) |
- Returns:
- The name of the default Nepomuk repository ("main").
- Deprecated:
- Use Nepomuk.ResourceManager.mainModel()
QString errorString | ( | Nepomuk.ErrorCode | code | |
) |
- Returns:
- A human-readble string.
QString naoNamespace | ( | ) |
- Deprecated:
- Use Soprano.Vocabulary.NAO.naoNamepace()
QString nrlNamespace | ( | ) |
- Deprecated:
- Use Soprano.Vocabulary.NRL.nrlNamepace()
long qHash | ( | Nepomuk.Resource | res | |
) |
\class Resource resource.h Nepomuk/Resource
Resource is the central object type in Nepomuk. It represents a piece of information of any kind.
Resources are identified by their unique URI (which correlates directly with the URI in the local NEPOMUK RDF storage.
Resource objects with the same URI share their data.
All methods in Resource are thread-safe.
See hacking for details on how to use Resource.
- See also:
- ResourceManager
Special case: file URLs
file:/ URLs are handled as a special case in Nepomuk. Starting with KDE 4.4 they are no longer used to identify the Nepomuk resource but only stored as nie:url property. All resources have nepomuk:/res/<UUID> URIs. The Resource constructors handle this automatically. Thus, one can still use file URLs to construct the objects. But be aware of the following example:
KUrl fileUrl("file:home/foobar/example.txt"); Nepomuk.Resource fileRes(fileUrl); QUrl fileResUri = fileRes.resourceUri();
Here fileUrl and fileResUri are NOT equal. The latter is the resource URI of the form nepomuk:/res/<UUID>.
QString rdfNamepace | ( | ) |
- Deprecated:
- Use Soprano.Vocabulary.RDF.rdfNamepace()
QString rdfsNamespace | ( | ) |
- Deprecated:
- Use Soprano.Vocabulary.RDFS.rdfsNamepace()
setDefaultRepository | ( | QString | s | |
) |
- Deprecated:
- Has no effect anymore.
QString typePredicate | ( | ) |
- Deprecated:
- Use Soprano.Vocabulary.RDF.type()
Soprano.Node valueToRDFNode | ( | Nepomuk.Variant | a0 | |
) |
Used internally by Resource. Converts a non-list Variant into a Soprano.Node.
[Soprano.Node] valuesToRDFNodes | ( | Nepomuk.Variant | a0 | |
) |
Used internally by Resource. Converts a Variant into a literal value to be used in the RDF store.