LibreOffice
LibreOffice 24.2 SDK API Reference
Public Member Functions | List of all members
XUriReferenceFactory Interface Referencepublished

creates URI references. More...

import"XUriReferenceFactory.idl";

Inheritance diagram for XUriReferenceFactory:
XInterface UriReferenceFactory

Public Member Functions

XUriReference parse ([in] string uriReference)
 parses the textual representation of a URI reference. More...
 
XUriReference makeAbsolute ([in] XUriReference baseUriReference, [in] XUriReference uriReference, [in] boolean processAdditionalSpecialSegments, [in] RelativeUriExcessParentSegments excessParentSegments)
 resolves a relative URI reference to absolute form. More...
 
XUriReference makeRelative ([in] XUriReference baseUriReference, [in] XUriReference uriReference, [in] boolean preferAuthorityOverRelativePath, [in] boolean preferAbsoluteOverRelativePath, [in] boolean encodeRetainedSpecialSegments)
 changes an absolute URI reference to relative form. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

Detailed Description

creates URI references.

See RFC 3986 for a description of URI references and related terms.

Since
OOo 2.0

Member Function Documentation

◆ makeAbsolute()

XUriReference makeAbsolute ( [in] XUriReference  baseUriReference,
[in] XUriReference  uriReference,
[in] boolean  processAdditionalSpecialSegments,
[in] RelativeUriExcessParentSegments  excessParentSegments 
)

resolves a relative URI reference to absolute form.

Parameters
baseUriReferencethe base URI reference. If the given uriReference is a same-document reference, baseUriReference is used as a reference to the current document.
uriReferenceany URI reference. Backwards-compatible relative URI references starting with a scheme component (see RFC 3986, Sections 5.2.2 and 5.4,2) are not supported; instead, they are interpreted as absolute URI references.
processAdditionalSpecialSegmentsif TRUE, special segments (“.” and “..”) within the path of the base URI (except for the last, cut-off segment), and within an already absolute uriReference, are processed as required by RFC 3986. If FALSE, such special segments are treated like ordinary segments. Conformance with RFC 3986 requires TRUE to be passed.
excessParentSegmentsdetails how excess special parent segments (“..”) are handled. Conformance with RFC 3986 requires REMOVE to be passed.
Returns
a fresh object that supports com::sun::star::uri::XUriReference (and possibly also additional, scheme-specific interfaces), if the given uriReference can be resolved to an absolute URI reference, relative to the given baseUriReference; otherwise, NULL is returned. Especially, if baseUriReference is NULL, or is not an absolute URI reference, or if uriReference is NULL, then NULL is always returned.

◆ makeRelative()

XUriReference makeRelative ( [in] XUriReference  baseUriReference,
[in] XUriReference  uriReference,
[in] boolean  preferAuthorityOverRelativePath,
[in] boolean  preferAbsoluteOverRelativePath,
[in] boolean  encodeRetainedSpecialSegments 
)

changes an absolute URI reference to relative form.

Parameters
baseUriReferencethe base URI reference.
uriReferenceany URI reference.
preferAuthorityOverRelativePathcontrols how a relative URI reference is generated when both baseUriReference (e.g., “scheme://auth/a/b”) and uriReference (e.g., “scheme://auth//c/d”) have the same scheme and authority components, and the path component of uriReference starts with “//”. If TRUE, the generated relative URI reference includes an authority component (e.g., “//auth//c/d”); if FALSE, the generated relative URI reference has a relative path (e.g., “..//c/d”).
preferAbsoluteOverRelativePathcontrols how a relative URI reference is generated when both baseUriReference (e.g., “scheme://auth/a/b”) and uriReference (e.g., “scheme://auth/c/d”) have the same scheme and authority components (if present), but share no common path segments. If TRUE, the generated relative URI reference has an absolute path (e.g., “/c/d”); if FALSE, the generated relative URI reference has a relative path (e.g., “../c/d”).
encodeRetainedSpecialSegmentsif TRUE, special segments (“.” and “..”) that are already present in the path component of the given uriReference and which end up in a relative path returned from this method, are encoded (as “%2E” and “%2E%2E”, respectively).
Returns
a fresh object that supports com::sun::star::uri::XUriReference, if the given uriReference is either already relative, or has a relative path, or is of a different scheme than the given baseUriReference, or can be changed to a relative URI reference, relative to the given baseUriReference; otherwise, NULL is returned. Especially, if baseUriReference is NULL, or is not an absolute URI reference, or if uriReference is NULL, then NULL is always returned.

◆ parse()

XUriReference parse ( [in] string  uriReference)

parses the textual representation of a URI reference.

Parameters
uriReferencethe textual representation of a URI reference.
Returns
an object that supports com::sun::star::uri::XUriReference (and possibly also additional, scheme-specific interfaces), if the given input can be parsed into a URI reference; otherwise, NULL is returned.

The documentation for this interface was generated from the following file: