2007/5/4, Evgeny Egorochkin <<a href="mailto:phreedom.stdin@gmail.com">phreedom.stdin@gmail.com</a>>:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Friday 04 May 2007 14:31:21 jamie wrote:<br>> On Fri, 2007-05-04 at 14:00 +0300, Evgeny Egorochkin wrote:<br>> > Missing are structures. As soon as we go further than generic metadata<br>> > like author and size, and try to extract document structure, we'll run
<br>> > into troubles. An example: c++ sources with nested classes and their<br>> > members. Too many workarounds would be necessary for .desktop<br>><br>> this is doable (we do support this in tracker and plan on adding support
<br>> to desktop files for this)<br>><br>> You would have a metadata type of struct<br>> and have another field "children" that lists the child metadata names<br>><br>> Each child metadata will have its own def
<br>><br>> Eg for a struct type for Email:Address containg Contact:Name and<br>> Contact:Email you would have:<br>><br>><br>> [Contact:Name]<br>> DisplayName=Contact:Name<br>> Type=string<br>><br>
> [Contact:Email]<br>> DisplayName=Contact:Email<br>> Type=string<br>><br>> [Email:Address]<br>> DisplayName=Email:Address<br>> Type=struct<br>> Children=Contact:Name;Contact:Email;<br><br>This apparently solves the storage issue for this particular case. However,
<br>there are several shortcomings:<br>1) Structures are not extensible.<br> *You cannot define generic structure for an OO language and subclass it if<br>necessary.<br> *Applications can't add custom fields to existing structures.
<br>2) Data retrieval.<br>If you put the whole structure in a single property, you make it hard e.g. to<br>use several files to describe a single structure. Also, it is hard to<br>interlink classes e.g. point to ancestor class(es).
</blockquote><div><br><br>I think that metadata constructs so complex that they require several files to be described are out of scope for XESAM. We wan't to create a common interface that everyone can implement. If you suddenly require that the implementation support arbitrarily complex RDF structures I think we narrow the would-be implementors down quite a bit.
<br> </div>Another thing is that the search spec is not designed to query complex metadata structures anyway.<br><br>I fear that we end up with an over engineered spec if we wan't to allow arbitrarily complex metadata. Basically I can't see the need to build metadata structs/classes. Take the example of a Java-file. It could have a metadata model where the class has methods and the methods have documentation and arguments and so on. It's all great, and you could do all sorts of fancy queries against it, but I honestly find it hard to believe that it is worth the effort. You can get almost as good functionality with the flat field proposal that was put out initially (fields still have parents).
<br><br>I'm not saying that there aren't any cases where a complex metadata model is of great benefit, but do we need to encumber the whole xesam standard with that? I mean with the Java-class example above wouldn't that functionality be part of an IDE anyway? I would rarely wan't to search for argument types of a method from my general desktop search tool.
<br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>This is an example of an actual RDF serialization + named graphs<br>extensions(which does support localization as suggested by Sebastian)
<br><br>@Prefix ...................... // 1-2 lines copied intact for all files<br>@Base ......................<br><br>Mp3.Title<br> is_a field;<br> of_type string;<br> name "Title"@EN; // not sure I got intl syntax right from the get go
<br> name "Titel"@NL; // but likely so<br> description "Mp3 title"<br> ...<br> comment "example".<br><br>Mp3.artist<br> is_a field;
<br> of_type string;<br> has_parent Content.Creator<br> name "Artist";<br> description "Mp3 artist";<br> ...<br> comment "example".
</blockquote><div><br>Thanks for the example. What is the name of the language you use here? I got lost in the debate somewhere :-) <br></div>It looks simple and clean and I don't have anything against it as such.<br>
<br>I'm still in favour of .desktop though - the main cause is simply that the .desktop is used everywhere already. Let's stick to one format I say.<br></div><br><br>Cheers,<br>Mikkel<br>