Re: [Tracker] My disagreement with a recent change in the ontology for GNOME Notes





This is an example how you should do it instead, Pierre-Yves:

https://wiki.gnome.org/Tracker/Documentation/Examples/SPARQL/Email

MIME as document type is probably a lot more rich than GNOME's notes
format is. Yet we have modeled MIME into the NMM ontology just fine.

Note that the text/html contents are not stored in the examples.

The reference to the text/html part should be a nfo:DataObject. For
example a nfo:FileDataObject with a nie:url pointing to a file on the
filesystem containing the text/html contents. It could also be a nie:url
pointing to a uri schema that triggers a messaged daemon into fetching
and/or giving you the MIME part over a FD passed D-Bus IPC, much like
gvfs's FS daemons work.

Neither such an E-mail nor gvfs should store HTML documents (on a SAMBA
or a IMAP storage) into Tracker's Nepomuk storage. Even the
nie:plainTextContent is a questionable thing to store (and embedded
users of Trackers are questioning us removing the property for storage
capacity reasons).

If you want GNOME notes to offer text/html contents, while allowing
applications to query Tracker over SPARQL for notes, use nie:url with
nfo:DataObject and provide a service that delivers the contents to the
querying application.

Let us know when you have fixed this design mistake so that we can
remove the xmlContents property from our ontology. As I doubt that
Nepomuk upstream would ever accept this anyway.

Kind regards,

Philip

On Thu, 2013-07-11 at 13:22 +0200, Philip Van Hoof wrote:
Hi Pierre-Yves,

I should probably have watched the ML more carefully now that it's committed and too late.

https://git.gnome.org/browse/tracker/commit/?id=6c1885f241880b528d29c2270022dac2bdd5be86
https://bugzilla.gnome.org/show_bug.cgi?id=701828

+nfo:xmlContent a rdf:Property ;
+     rdfs:comment "XML/HTML or other rich representation of a document" ;
+     nrl:maxCardinality 1 ;
+     rdfs:domain nfo:Document ;
+     rdfs:range xsd:string .

I disagree with this approach. We should not put formatted content into
the Nepomuk storage:

The field is useless for any other application but the hosting
application. We can't query it, because its contents are formatted and
we don't have query capabilities to query your formatted contents. And
even if we would allow storage of formatted content like XML, we should
enforce the format using a DTD or other XML schema so that we're sure
that the inserted format is valid and known.

Neither of that is what nfo:xmlContent specifies, so I think it does not
belong in the ontology at all. Tracker's Nepomuk storage isn't a
freeform 'store whatever you want' with the sole exception of
nie:plainTextContent (which I honestly dislike a lot for the same
reason).

If GNOME Notes wants to store notes in Tracker, then it should store
data and metadata in it. And store UI data, like X/Y positions and list
offsets or indexes by itself. This simply does not belong in Tracker, at
all.

Allowing GNOME application to store whatever they want, using XML or not
(as I don't care about the actual format), is crazy. Model your
application correct and store information correct. Don't abuse Tracker
to solve your 'whatever' storage needs. And XML is indeed 'whatever',
just like JSON, binary, CSV, etc are: we can't use them in SPARQL.


Kind regards,

Philip


-- 
Philip Van Hoof
Software developer
Codeminded BVBA - http://codeminded.be



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