Nepomuk
Overview | Using | Examples | Desktop Ontologies | Resource Generator
Resource Handling Examples
Add an annotation (a comment) to a file.
The following example creates a new tag. The tag can be accessed through its name which works as an identifier. Nepomuk automatically creates a new unique URI if this tag does not already exist.
Reading the information using plain Resource methods:
Reading the information using the convenience classes (be aware that these classes need to be generated from an ontology using the Resource Generator):
Present all defined properties of an arbitrary resource to the user including internationalized labels:
Query Examples
Perform a simple full text query that looks for any resource containing the value 'nepomuk':
Create a query that lists all resources tagged with a tag whose name matches 'nepomuk':
Create a query that lists all resources tagged with a specific tag:
Create a query that lists all resource tagged with both the tags used above:
Create a query that lists all files tagged with a specific tag:
Any other term can be used as sub term in a ComparisonTerm (Vocabulary namespace generated via The Nepomuk Resource Generator). The following query does return all resources related to person contacts that are tagged with tag
.
To make matters even more complex the above ComparisonTerm can be inverted:
This will not match resources related to some tagged person contact but match resources that some tagged person contact is related to (sounds confusing but remember that the properties are not symmetric by default, i.e. the graph of data is directed.)
Listing Files
Restrict the search to a specific folder:
Restrict the search to files-only (Vocabulary namespace generated via onto2vocabularyclass using ${SHAREDDESKTOPONTOLOGIES_ROOT_DIR}/nie/nfo
.trig):
List all query results in a KDirModel:
KIO will use the nepomuksearch:/
slave to list search results as file entries.
Misc Query Examples
Match all EmailAddress instances with a specific email address:
Match all nco:PersonContact instances:
Match all person contacts with a specific email address:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.