Re: [Tracker] Notification and ontology questions

On 09/03/10 04:10, Spivak, Max wrote:
Hi folks,


A few notification and custom ontology questions

Notification questions:
- Does libtracker-client support receiving
org.freedesktop.Tracker1.Resources.Class signals? It doesn't appear to

Good question, according to our online documentation it does work for classes. You can see which classes using:

tracker-sparql -q "select ?c where { ?c a rdfs:Class . ?c tracker:notify true }"

I don't think this applies to properties.

-- is there a plan for this in the future? (Does anyone have any sample
glib-dbus signal listening code?)

Hmm, we can always add some. So far we have examples/ for libtracker-miner and libtracker-extract (which I am working on now). We can certainly add an example or two there. We also document this on the site here:


- What's the mechanism to add classes for which notifications are sent?
Let's say I want to be notified of all FileDataObject changes -- how do
I do that?

In the ontology, you need to add tracker:notify true; to the properties (and classes if that works too, I am not sure).

- It *appears* that tracker-store is sending duplicate signals for
Subjects[Added|Changed|Removed]. I'm on 0.7.23. Is this known? Or it
could be my wonky dbus signal listening code. :)

Sounds like a bug. Are you sure you're not setting up the signal handler twice? :P

- I need to define custom ontology that describes books, periodicals,
etc. While some of the data is fairly generic, other is sufficiently
specific to our projects that it wouldn't make sense to push it outside
of our use. What's the best way to do that? Do I add my own file,
something like <tracker>/data/ontologies/95_book.ontology?

Yes, you can do that. If you are packaging your own version of Tracker. Otherwise, you can add it to the $prefix/share/tracker/ontologies/ location where they get installed and a reindex should work here. I would advise you test your ontology thoroughly and check the logs for any errors/warnings. The ontology defines the database schema and it is easy to create problems for yourself here.

- Is there a way to define or extend ontology at runtime?

Not exactly. We recently added some level of support here but it is not meant to be used for 3rd parties yet. That needs a bit more work. Philip also did the work here.

We did plan to do this before 0.8 IIRC, but I don't know if it will get done now since we want to release before the end of this month.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]