Document System - Content Meta-data
|
Meta-data | Description |
---|---|
Name | The 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 name | The absolute file name of the content, or for applications the binary name with no path. |
MIME type | The RFC2045 MIME type of the content. |
Role | The intended usage of the document, indicates whether it is an application, a user document, a system document, or an application folder. |
DRM protection | Indicates 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.
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-data | Description |
---|---|
Icon | The 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. |
Media | The 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 Rights | The 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. |
Size | The size of the content in bytes. The document system does not store the size, but gets it from the content directly when queried. |
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.
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.
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.
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.
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 ! |
Copyright © 2000-2012 - www.developpez.com