Language

The Free and Open Productivity Suite
Released: Apache OpenOffice 4.1.15

API

SDK

Tips ‘n’ Tricks

Miscellaneous


:: com :: sun :: star :: uri ::

interface XExternalUriReferenceTranslator
Description
translates between external and internal URI references.

Some URI schemes leave unspecified important aspects of how to interpret URIs of those schemes. For example, it is unspecified for “file” URLs how to map the byte sequences that constitute the path segments of a “file” URL to filenames on a given platform: The UNO environment always assumes that path segments of “file” URLs represent UTF-8–encoded strings (which have to be mapped to filenames in a platform-specific way), while other applications typically assume that path segments of “file” URLs directly represent a platform's byte-sequence filenames. This interface offers methods to translate between such internal URIs (e.g., UTF-8–encoded “file” URLs used within the UNO environment) and external URIs (e.g., byte-sequence–oriented “file” URLs used by other applications). Typically, only “file” URLs are affected by this translation.

Since the translation process is based on URI schemes, relative URI references (that do not include a scheme) are left unmodified by the translation process.

Since
OOo 2.0

Methods' Summary
translateToInternal returns the internal counterpart of an external URI reference.  
translateToExternal returns the external counterpart of an internal URI reference.  
Methods' Details
translateToInternal
string
translateToInternal( [in] string  externalUriReference );

Description
returns the internal counterpart of an external URI reference.
Parameter externalUriReference
an external URI reference.
Returns
the internal counterpart of the given external URI reference. An empty string is returned if the given external URI reference either is an empty string or cannot be converted (for example, because it contains illegal characters).
translateToExternal
string
translateToExternal( [in] string  internalUriReference );

Description
returns the external counterpart of an internal URI reference.
Parameter internalUriReference
an internal URI reference.
Returns
the external counterpart of the given internal URI reference. An empty string is returned if the given internal URI reference either is an empty string or cannot be converted (for example, because it contains illegal characters).
Top of Page

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. The Apache feather logo is a trademark of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.