Language:

The Free and Open Productivity Suite
Apache OpenOffice 4.1.4 released

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous


:: com :: sun :: star :: util ::

interface XURLTransformer
Description
supports parsing and assembling of URLs
See also
URL, URLTransformer

Methods' Summary
parseStrict parses the string in URL::Complete which should contain a syntactically complete URL.  
parseSmart parses the string in URL::Complete, which may contain a syntactically complete URL or is specified by the provided protocol  
assemble assembles the parts of the URL specified by aURL and stores it into URL::Complete  
getPresentation returns a representation of the URL for UI purposes only  
Methods' Details
parseStrict
boolean
parseStrict( [inout] URL  aURL );

Description
parses the string in URL::Complete which should contain a syntactically complete URL.

The implementation is allowed to correct minor failures in URL::Complete if the meaning of the URL remain unchanged. Parts of the URL are stored in the other fields of aURL.

Parameter aURL
the URL which include the complete string notation and will contain all parsed parts of it after finishing this call. URL::Complete can be overwritten if the implementation corrected minor failures.
Returns
true if parsing was successfully (means if given URL was syntactically correct) or false otherwhise.
parseSmart
boolean
parseSmart( [inout] URL  aURL,
[in] string  sSmartProtocol );

Description
parses the string in URL::Complete, which may contain a syntactically complete URL or is specified by the provided protocol

The implementation can use smart functions to correct or interpret URL::Complete if it is not a syntactically complete URL. The parts of the URL are stored in the other fields of aURL.

Parameter aURL
the URL which include the string notation and will contain all parsed parts of it after finishing this call. This includes URL::Complete.
Parameter sSmartProtocol
optional information which protocol specification should be used to parse memberURL::Complete. If empty the implementation can use a protocol which fit best.
Returns
true if parsing was successful (means if URL::Complete could be syntactically correct) or false otherwise.
assemble
boolean
assemble( [inout] URL  aURL );

Description
assembles the parts of the URL specified by aURL and stores it into URL::Complete
Parameter aURL
the URL which contains alls neccessary information in a structured form. The member URL::Complete contains the URL in string notation after the operation finished successfully. Otherwise the content of URL::complete is not defined.
Returns
true if assembling was successfully or false otherwise.
getPresentation
string
getPresentation( [in] URL  aURL,
[in] boolean  bWithPassword );

Description
returns a representation of the URL for UI purposes only

Sometimes it can be usefull to show an URL on an user interface in a more "human readable" form. Such URL can't be used on any API call, but make it easier for the user to understand it.

Parameter aURL
URL in structured form which should be shown at the UI
Parameter bWithPassword
specifies whether the password will be included in the encoding or not. Usually passwords should never be shown at the user interface.
Returns
a string representing the aURL if it is syntactically correct. A empty string if aURL is not syntactically correct.
Top of Page

Apache Software Foundation

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

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