[Nepomuk] Re: Question regarding usage of Nepomuk::Vocabulary::PIMO::hasPart()

Christian Mollekopf chrigi_1 at fastmail.fm
Fri Oct 29 10:38:38 CEST 2010


Instead of adding an note to a topic with the isPart relation, i added now the 
topic as property to the note.

The Topic is a Nepomuk::Thing("MyTopic", Nepomuk::Vocabulary::PIMO::Topic())

The note is a Nepomuk::Resource(akonadiItemUri)

and i add the property like this:
setProperty(Nepomuk::Vocabulary::PIMO::Topic(), Nepomuk::Thing("MyTopic", 
Nepomuk::Vocabulary::PIMO::Topic()));

I did not yet create the hiarchy of topics, but plan to do so with the isPart 
relation (could not yet figure out how that works).

The solution i have now works for me, but I wonder if this is the correct way 
to do things, or if it would make more sense to use the isPart relation.

Cheers,

Christian


On Thursday 28 October 2010 13:53:59 Christian Mollekopf wrote:
> Hi,
> 
> I'm currently prototyping an application for handling Notes/Tasks/Events.
> While i use akonadi items for storing the notes, and the existing akonadi
> classes is want to use nepomuk to model the relations between them.
> 
> I know there are already other efforts in this direction namely kjots,
> basket, semnotes, and i will eventually see how to integrate, share code,
> merge, or whatever =)
> 
> For manual organisation I want to use "Topics". I.e this will allow a
> treestructure like the notes in kjots, but also allow notes to be in
> several "Topics" at the same time.
> 
> So my understanding of how that should work (i will talk only about notes
> for simplicity):
> -I create a Pimo::Note resource for each note and set the akonadi uri as
> identifier
> -I create a Pimo::Thing of the type Nepomuk::Vocabulary::PIMO::Topic() for
> each topic
> 
> For the relation between topics (hiarchy), and adding items to a topic, i
> want to use the Nepomuk::Vocabulary::PIMO::hasPart() relation
> (respectively isPart() but that is not existing).
> 
> So for an example hiarchy:
> 
> "Topic1->Subtopic1->Note1"
> 
> which would read as:
> 
> "Note1 isPartOf Subtopic1 isPartOf Topic1"
> 
> I hope this is the correct way to do things, but my problem is, i don't
> understand how to use the Nepomuk::Vocabulary::PIMO::hasPart() relation.
> 
> Specifically, how can i set Note1 to be part of Subtopic1, and how can i
> check if Note1 is part of Subtopic1.
> 
> A Codeexample would be greatly appreceated.
> 
> In case it matters:
> i found Nepomuk::Vocabulary::PIMO::hasPart() and
> Nepomuk::Vocabulary::PIMO::Topic() in pimo.h which i believe is the
> ontology?
> 
> Thanks for you help,
> 
> Christian
> _______________________________________________
> Nepomuk mailing list
> Nepomuk at kde.org
> https://mail.kde.org/mailman/listinfo/nepomuk


More information about the Nepomuk mailing list