Overview | Module | Use | Devguide | Index

Included Services | Exported Interfaces | Properties' Summary | Properties' Details

:: com :: sun :: star :: document ::
service TypeDetection
Description capsulate a type detection service and provide read/write access on it's configuration data. It's possible to make a "flat" detection wich may use internal configuration data only - or a "deep" detection which use special ExtendedTypeDetection services to look into the document stream. Last mode can be supressed to perform the operation. Of course the results can't be guaranteed then. (e.g. in case the extension was changed) Developers Guide 6.2.4 Office Development - Common Application Features - Integrating Import and Export Filters

Exported Interfaces
XTypeDetection | Description can be used to make a flat or deep type detection. Use this interface to get information about the type of the given resource. Return value will be always an internal name of a registered document type. It can be used may on other services (e.g. ::com::sun::star::frame::FrameLoaderFactory ) to do further things, which base on it (e.g. to load it into a frame).
  ::com::sun::star::container::XNameAccess | Description provides read access to the complete set of type configuration data. Every container item is specified as a set of properties and will be represented by a sequence< PropertyValue > structure. Follow properties are supported: (But note: not all of them must be present everytimes!)
  Property Name | Value Type | Description
  Name | [string] | The internal name is the only value, which makes a container item unique.
  UIName | [string] | It contains the localized name for this type for the current locale.
  UINames | [sequence< string > ] | It contains all available localized names for this type. The are organized in pairs and represented as a structure of sequence< PropertyValue >. The name of such property must be interpreted as locale; it's value as the localized type name corresponding to this locale.
  MediaType | [string] | It contains the MIME or content type descriptor. The differences between a MIME type and an internal type name was made, to resolve existing ambigities.
  ClipboardFormat deprecated! | [string] | It was interepreted as an identifier inside clipboard. Please use new property ContentFormat instead of this now.
  ContentFormat | [string] | It's and identifier, which is used for a deep format detection. An ExtendedTypeDetection use this value to match a given content to this type. e.g. It's interpreted as the doc type of an XML stream or as an identifier inside a file header.
  URLPattern | [sequence< string > ] | This list contains different URL patterns, which identify this type. E.g. data base contents can be described by an new defined protocol like "sql://select * ". In combination with a sutable ::com::sun::star::frame::FrameLoader or ImportFilter / ExportFilter it woul be possible then, to layout a sql query output into an office frame.
  Extensions | [sequence< string > ] | It contains a list of file extensions, which match this type. They must be specified as pure extension, without any special signs. E.g.: "doc", "html" ... but not ".doc". Using of wildcards is allowed but not very usefull. The may resulting ambigities with other type registrations can't be resolved anytimes.
  DocumentIconID | [integer] | It's an ID, which present the number of a corresponding icon.
Note: All elements of this container will be adressed by his internal name, and it must be an unambigous value.
::com::sun::star::container::XNameContainer | [ OPTIONAL ] Description provides a write access to the configuration data.
::com::sun::star::container::XContainerQuery | [ OPTIONAL ] Description provides search on the configuration data set. Against simple property search it provides some complex algorithms too. For further informations please read the SDK documentation.
::com::sun::star::util::XFlushable | [ OPTIONAL ] Description can be used to perform container changes. Because the complexness of such configuration set can be very high, it seams not very usefull to update the undelying configuration layer on every container change request immediatly. Another strategy can be to make all changes (adding/changing/removing of items) and call flush at the end. That will validate the whole container and reject inconsistent data sets. Only in case all made changes was correct, they will be written back to the configuration. Further this interface provides the possibelity, that interested changes listener can be registered too.

Top of Page

Copyright © 2003 Sun Microsystems, Inc.