Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

Document System - Content Meta-data

Overview

The document system stores a variety of information about content on a device which is used in the presentation of content and for constructing sets of content. This information is broken down into three different groups for most content; core meta-data, properties, and categories, there is also some meta-data that is unique to applications.

Content meta-data may be specified by an application when creating content, or it may be extracted from the content itself by content plug ins that are run by the document system when installing content.

Core Meta-data

The core meta-data is defining information that is common to all content, it identifies the name of the content, its type, intended use, and whether it utilizes any DRM protection.

Meta-dataDescription
NameThe user visible name of the content. This is typically derived from the file name but may be explicitly set or extracted from content headers (e.g. the song title of an MP3). For some content such as applications this will be a translated string.
File nameThe absolute file name of the content, or for applications the binary name with no path.
MIME typeThe RFC2045 MIME type of the content.
RoleThe intended usage of the document, indicates whether it is an application, a user document, a system document, or an application folder.
DRM protectionIndicates whether or not the content is protected by any form of DRM.

Filters can be constructed for searching on all the core meta-data, and content sets may be sorted on the name, file name, or MIME type.

Derived Meta-data

The document system also makes available some meta-data that it does not store directly. This is data that can be derived from the core meta-data such as things that are common to all content of the same MIME type, that can be queried from the content itself, or is stored separately. As this meta-data is not stored by the document system it can not be used to filter or sort content.

Meta-dataDescription
IconThe icon displayed when listing the content. For most content this is derived for the MIME type, but it can also be explicitly set as is done for most applications.
MediaThe root path of the file system the content is stored on. This is not explicitly stored but is instead determined from the file path of the content.
DRM RightsThe current DRM permissions for using the content. This information is maintained by a DRM agent independent of the document system and is queried on demand.
SizeThe size of the content in bytes. The document system does not store the size, but gets it from the content directly when queried.

Properties

Properties are key-value pairs that are stored by the document system and can be used to filter and sort content.

Property identifiers are composed of a group and a key the combination of which must be unique per content and value (reusing a group and key will overwrite the existing value). It's not necessary to use a property group as the document system will default to the global group none if no group is given, however when storing application specific properties it is recommended to use a group unique to the application to prevent key conflicts. Qt Extended defines some keys for commonly occurring properties with the QContent::Property enumeration, all of these properties are in the none group.

Categories

The document system utilizes the common Qt Extended category system for grouping content. In order to assign content a category it must have already been created using QCategoryManager, categories from any scope may be assigned to content but typically only the global and Documents scope should be used as categories in other scopes cannot be selected in the document selector widgets or Qt Extended launcher.

The application folders in the Qt Extended launcher are categories in the Applications scope, applications are added to these folders by assigning them one or more application categories.

Application Meta-data

In addition to the regular meta-data shared by all content, applications also need to identify the types of documents they are able to open from the launcher. For each supported type the document system stores the type itself, an icon, and the DRM permission a document must have in order to be opened by the application. Only the first must be specified, if no icon is given then the application's icon will be used, and in the absence of a DRM permission the application is assumed to not support protected content.

The MIME type information and other application meta-data is usually defined in a .desktop file and is imported into the document system when the application is installed.

Content Plug-ins

The document system employs content plug-ins to extract meta-data embedded in content. The information provided by a content plug-in may be an extensive list of searchable information such as that found in the ID3 headers of MP3 files, or simply the correct type of a file with an ambiguous file extension.

A content plug-in identifies a list of file extensions for MIME types it support reading and when installing or updating content meta-data the document system uses these extensions to identify a content plug-in capable of extracting embedded meta-data. If no content plug-in can be found for the content or some necessary information (name or MIME type) has not been provided the document will attempt to derive the missing information from the file name.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 64
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web