{"id":1692,"date":"2009-04-22T16:52:00","date_gmt":"2009-04-22T16:52:00","guid":{"rendered":"http:\/\/www.leobard.net\/blog\/?p=1692"},"modified":"2017-11-04T15:51:00","modified_gmt":"2017-11-04T15:51:00","slug":"annotating-files-but-where-to-store-the-metadata","status":"publish","type":"post","link":"https:\/\/www.leobard.net\/blog\/2009\/04\/22\/annotating-files-but-where-to-store-the-metadata\/","title":{"rendered":"Annotating files &#8211; but where to store the metadata?"},"content":{"rendered":"<p>An interesting thread about file metadata for KDE got my attention: <a href=\"http:\/\/zwabel.wordpress.com\/2009\/03\/29\/portable-meta-information\/\">Portable Meta-Information<\/a>. I waited a month until it cooled down and re-read it to draw my own conclusions.<\/p>\n<p>The author, zwabel, correclty identified the problem that the Semantic Desktop must be compatible with the past &#8211; <b>and with the future!<\/b>.<\/p>\n<p><cite>I think, for the future, we need to find a way to keep the users data together, so it is as persistent and approachable as the files themselves:<br \/>\n&#8211; When the user copies his photo archive or backs it up to a CD, no matter what application he uses, meta-information like ratings, comments, or tags, have to move together with the photos<br \/>\n&#8211; When the user has a fresh install, and copies his photo archive from a CD to the disk, the meta-information for the photos should be just there<br \/>\n&#8211; User-generated meta-data should _never_ be lost just because a file\/directory was renamed, a mount-point changed, or whatever<br \/>\n&#8211; User-generated meta-data should not be lost when a file completely unrelated to the item is damaged or deleted(Database)<br \/>\n&#8211; In 20 years, when KDE4 is history for a long time, and I find an old photo backup CD, the meta-data should still be readable<\/cite><\/p>\n<p>zwabel then suggested to store the metadata additionally to the central store (which NEPOMUK needs for the search engine and is essential anyway) in a multitude of &#8220;.meta&#8221; files, which are stored in the same directory as the files. For the file picture1.png, the metadata would be in picture1.png.meta. I think this is a pragmatic idea and would say:<\/p>\n<p><b>Lets store it in picture1.png.rdf<\/b><\/p>\n<p>As serialization, I suggest the W3C RDF standard, which we use in the central NEPOMUK store anyway (in the database) and which has a well-readable standardized serialization format in either XML or a plain-text format. To achieve linux-geek compability, I suggest the plaintext format. For example, to add authorship  information about picture1.png, it would be:<\/p>\n<pre>\n@prefix dc: &lt;http:\/\/purl.org\/dc\/elements\/1.1\/&gt;.\n@prefix rdf: &lt;http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#&gt;.  \n&lt;&gt;  dc:creator \"Dave Beckett\";\ndc:date \"2002-07-31\";\ndc:publisher \"ILRT, University of Bristol\";\ndc:title \"Dave Beckett's Home Page\" .\n<\/pre>\n<p>Note that the &lt;&gt; is a known shortcut for &#8220;this&#8221;, the equivalent rdf\/xml is: rdf:about=&#8221;&#8221;.<\/p>\n<p>Sebastian Tr\u00fcg also argues in a way that also leaves both ways open for the future, database and filesystem:<br \/>\n<cite>&#8220;you need a database anyway. Thus, in the end, the only solution I see at the moment is a kind of copy wrapper that makes sure metadata is copied with the file. Then one could also send information like a person or a project to a friend and the system would pick up all interesting metadata.&#8221;<\/cite><\/p>\n<p>So &#8211; how do we format the metadata inside the files? The same way we do as in the RDF repository of nepomuk. There we use the <a href=\"http:\/\/www.semanticdesktop.org\/ontologies\/nie\/\">NIE<\/a> and <a href=\"http:\/\/www.semanticdesktop.org\/ontologies\/nao\/\">NAO<\/a> ontologies. But Pushing Dublin Core is also a good way to do, but do it the W3C way, standardized. <\/p>\n<p>Using the RDF encoding of Dublin Core and for example Turtle\/N3 as serialization format gives a rock-solid W3C industry standardized (or at least well implemented) way. <\/p>\n<p>Because the world is not perfect and needs many possible ways to evolve, we can store the metadata in redundancy now in as many places as possible &#8211; but in one format. For freedesktop and nepomuk RDF is the best choice, in my (not so humble) opinion. It is serializeable, it can be stored in a database, it can be hosted on the web. No other standard has this. It is embedded in PDF already in the XMPP format.<\/p>\n<p>I propose &#8220;.turtle&#8221; files to indicate that its RDF\/Turtle serialization, but if you insist, &#8220;.rdf&#8221; is also fine with me (but implying RDF\/XML storage, which is a bit sluggish), and &#8220;.meta&#8221; is also fine with me if you store RDF\/turtle inside. Making up a new micro format would be stupid.<\/p>\n<p>My Summary:<\/p>\n<ul>\n<li>storing it in the filesystem is nice, but not a killer-argument. It works &#8482; by just storing it in the central nepomuk repository for 90% of all use cases, so start hacking applications that help the users save time and improve their user experience with what is there today.<\/li>\n<li>do not store it in .meta, but in .turtle, which is the rock-solid industry standard by W3C and human-readable and a simple microformat-like text format (smoother than xml)<\/li>\n<li>do also store it however possible in the files themselves, not to block out others. Use EXIF fields, use XMPP fields in PDF, use ID3v2 fields, use those metedata!<\/li>\n<li>do also index it in the central search engine, be it nepomuk or beagle++ (beagle++ is the rdf-enabled beagle, check it out if you are not aware of it)<\/li>\n<li>storing it in metadata file attributes (xattr\/channels\/&#8230;) is the goal, but I propose to extend these standards with RDF to achieve cross-system compability. What worked for the web, may also work here.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>An interesting thread about file metadata for KDE got my attention: Portable Meta-Information. I waited a month until it cooled down and re-read it to draw my own conclusions. The author, zwabel, correclty identified the problem that the Semantic Desktop must be compatible with the past &#8211; and with the future!. I think, for the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.leobard.net\/blog\/2009\/04\/22\/annotating-files-but-where-to-store-the-metadata\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Annotating files &#8211; but where to store the metadata?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bluesky_dont_syndicate":"","_bluesky_syndication_accounts":"","_bluesky_syndication_text":"","activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[5],"tags":[],"class_list":["post-1692","post","type-post","status-publish","format-standard","hentry","category-semweb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Annotating files - but where to store the metadata? - Leobard&#039;s blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.leobard.net\/blog\/2009\/04\/22\/annotating-files-but-where-to-store-the-metadata\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Annotating files - but where to store the metadata? - Leobard&#039;s blog\" \/>\n<meta property=\"og:description\" content=\"An interesting thread about file metadata for KDE got my attention: Portable Meta-Information. I waited a month until it cooled down and re-read it to draw my own conclusions. The author, zwabel, correclty identified the problem that the Semantic Desktop must be compatible with the past &#8211; and with the future!. I think, for the &hellip; Continue reading &quot;Annotating files &#8211; but where to store the metadata?&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.leobard.net\/blog\/2009\/04\/22\/annotating-files-but-where-to-store-the-metadata\/\" \/>\n<meta property=\"og:site_name\" content=\"Leobard&#039;s blog\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/leobard\" \/>\n<meta property=\"article:published_time\" content=\"2009-04-22T16:52:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-11-04T15:51:00+00:00\" \/>\n<meta name=\"author\" content=\"leobard\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"leobard\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/2009\\\/04\\\/22\\\/annotating-files-but-where-to-store-the-metadata\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/2009\\\/04\\\/22\\\/annotating-files-but-where-to-store-the-metadata\\\/\"},\"author\":{\"name\":\"leobard\",\"@id\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/#\\\/schema\\\/person\\\/23f718c5d3bd8d343befaa1b11bdc609\"},\"headline\":\"Annotating files &#8211; but where to store the metadata?\",\"datePublished\":\"2009-04-22T16:52:00+00:00\",\"dateModified\":\"2017-11-04T15:51:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/2009\\\/04\\\/22\\\/annotating-files-but-where-to-store-the-metadata\\\/\"},\"wordCount\":815,\"commentCount\":0,\"articleSection\":[\"SemWeb\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.leobard.net\\\/blog\\\/2009\\\/04\\\/22\\\/annotating-files-but-where-to-store-the-metadata\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/2009\\\/04\\\/22\\\/annotating-files-but-where-to-store-the-metadata\\\/\",\"url\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/2009\\\/04\\\/22\\\/annotating-files-but-where-to-store-the-metadata\\\/\",\"name\":\"Annotating files - but where to store the metadata? - Leobard&#039;s blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/#website\"},\"datePublished\":\"2009-04-22T16:52:00+00:00\",\"dateModified\":\"2017-11-04T15:51:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/#\\\/schema\\\/person\\\/23f718c5d3bd8d343befaa1b11bdc609\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/2009\\\/04\\\/22\\\/annotating-files-but-where-to-store-the-metadata\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.leobard.net\\\/blog\\\/2009\\\/04\\\/22\\\/annotating-files-but-where-to-store-the-metadata\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/2009\\\/04\\\/22\\\/annotating-files-but-where-to-store-the-metadata\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Annotating files &#8211; but where to store the metadata?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/\",\"name\":\"Leobard&#039;s blog\",\"description\":\"personal weblog of Leo Sauermann\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/#\\\/schema\\\/person\\\/23f718c5d3bd8d343befaa1b11bdc609\",\"name\":\"leobard\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4f15ee76fffcb732371d121c4713809a3f075186c6223630d4fe6c82ae88166d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4f15ee76fffcb732371d121c4713809a3f075186c6223630d4fe6c82ae88166d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4f15ee76fffcb732371d121c4713809a3f075186c6223630d4fe6c82ae88166d?s=96&d=mm&r=g\",\"caption\":\"leobard\"},\"description\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/about-leo-sauermann\\\/\",\"sameAs\":[\"https:\\\/\\\/www.leobard.net\\\/\",\"https:\\\/\\\/www.facebook.com\\\/leobard\",\"https:\\\/\\\/www.instagram.com\\\/leobarder\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/leosauermann\\\/\"],\"url\":\"https:\\\/\\\/www.leobard.net\\\/blog\\\/author\\\/leobard\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Annotating files - but where to store the metadata? - Leobard&#039;s blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.leobard.net\/blog\/2009\/04\/22\/annotating-files-but-where-to-store-the-metadata\/","og_locale":"en_US","og_type":"article","og_title":"Annotating files - but where to store the metadata? - Leobard&#039;s blog","og_description":"An interesting thread about file metadata for KDE got my attention: Portable Meta-Information. I waited a month until it cooled down and re-read it to draw my own conclusions. The author, zwabel, correclty identified the problem that the Semantic Desktop must be compatible with the past &#8211; and with the future!. I think, for the &hellip; Continue reading \"Annotating files &#8211; but where to store the metadata?\"","og_url":"https:\/\/www.leobard.net\/blog\/2009\/04\/22\/annotating-files-but-where-to-store-the-metadata\/","og_site_name":"Leobard&#039;s blog","article_author":"https:\/\/www.facebook.com\/leobard","article_published_time":"2009-04-22T16:52:00+00:00","article_modified_time":"2017-11-04T15:51:00+00:00","author":"leobard","twitter_card":"summary_large_image","twitter_misc":{"Written by":"leobard","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.leobard.net\/blog\/2009\/04\/22\/annotating-files-but-where-to-store-the-metadata\/#article","isPartOf":{"@id":"https:\/\/www.leobard.net\/blog\/2009\/04\/22\/annotating-files-but-where-to-store-the-metadata\/"},"author":{"name":"leobard","@id":"https:\/\/www.leobard.net\/blog\/#\/schema\/person\/23f718c5d3bd8d343befaa1b11bdc609"},"headline":"Annotating files &#8211; but where to store the metadata?","datePublished":"2009-04-22T16:52:00+00:00","dateModified":"2017-11-04T15:51:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.leobard.net\/blog\/2009\/04\/22\/annotating-files-but-where-to-store-the-metadata\/"},"wordCount":815,"commentCount":0,"articleSection":["SemWeb"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.leobard.net\/blog\/2009\/04\/22\/annotating-files-but-where-to-store-the-metadata\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.leobard.net\/blog\/2009\/04\/22\/annotating-files-but-where-to-store-the-metadata\/","url":"https:\/\/www.leobard.net\/blog\/2009\/04\/22\/annotating-files-but-where-to-store-the-metadata\/","name":"Annotating files - but where to store the metadata? - Leobard&#039;s blog","isPartOf":{"@id":"https:\/\/www.leobard.net\/blog\/#website"},"datePublished":"2009-04-22T16:52:00+00:00","dateModified":"2017-11-04T15:51:00+00:00","author":{"@id":"https:\/\/www.leobard.net\/blog\/#\/schema\/person\/23f718c5d3bd8d343befaa1b11bdc609"},"breadcrumb":{"@id":"https:\/\/www.leobard.net\/blog\/2009\/04\/22\/annotating-files-but-where-to-store-the-metadata\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.leobard.net\/blog\/2009\/04\/22\/annotating-files-but-where-to-store-the-metadata\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.leobard.net\/blog\/2009\/04\/22\/annotating-files-but-where-to-store-the-metadata\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.leobard.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Annotating files &#8211; but where to store the metadata?"}]},{"@type":"WebSite","@id":"https:\/\/www.leobard.net\/blog\/#website","url":"https:\/\/www.leobard.net\/blog\/","name":"Leobard&#039;s blog","description":"personal weblog of Leo Sauermann","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.leobard.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.leobard.net\/blog\/#\/schema\/person\/23f718c5d3bd8d343befaa1b11bdc609","name":"leobard","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4f15ee76fffcb732371d121c4713809a3f075186c6223630d4fe6c82ae88166d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4f15ee76fffcb732371d121c4713809a3f075186c6223630d4fe6c82ae88166d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4f15ee76fffcb732371d121c4713809a3f075186c6223630d4fe6c82ae88166d?s=96&d=mm&r=g","caption":"leobard"},"description":"https:\/\/www.leobard.net\/blog\/about-leo-sauermann\/","sameAs":["https:\/\/www.leobard.net\/","https:\/\/www.facebook.com\/leobard","https:\/\/www.instagram.com\/leobarder\/","https:\/\/www.linkedin.com\/in\/leosauermann\/"],"url":"https:\/\/www.leobard.net\/blog\/author\/leobard\/"}]}},"_links":{"self":[{"href":"https:\/\/www.leobard.net\/blog\/wp-json\/wp\/v2\/posts\/1692","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.leobard.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.leobard.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.leobard.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.leobard.net\/blog\/wp-json\/wp\/v2\/comments?post=1692"}],"version-history":[{"count":1,"href":"https:\/\/www.leobard.net\/blog\/wp-json\/wp\/v2\/posts\/1692\/revisions"}],"predecessor-version":[{"id":2478,"href":"https:\/\/www.leobard.net\/blog\/wp-json\/wp\/v2\/posts\/1692\/revisions\/2478"}],"wp:attachment":[{"href":"https:\/\/www.leobard.net\/blog\/wp-json\/wp\/v2\/media?parent=1692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.leobard.net\/blog\/wp-json\/wp\/v2\/categories?post=1692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.leobard.net\/blog\/wp-json\/wp\/v2\/tags?post=1692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}