:: com :: sun :: star :: drawing :: framework ::

unpublished interface XResourceId
Description
A resource id uses a set of URLs to unambiguously specify a resource of the drawing framework.

Resources of the drawing framework are panes, views, tool bars, and command groups. One URL describes the type of the actual resource. A sequence of URLs (typically one, sometimes two) specifies its anchor, the resource it is bound to. The anchor typically is a pane (for views), or it is empty (for panes).

The resource URL may be empty. In this case the anchor is empty, too. Such an empty resource id does not describe a resource but rather the absence of one. Instead of an empty XResourceId object an empty reference can be used in many places.


Methods' Summary
getResourceURL Return the URL of the resource.  
hasAnchor Return whether there is a non-empty anchor URL. When this method returns false then getAnchorURLs() will return an empty list.  
getAnchor Return a new XResourceId that represents the anchor resource.  
getAnchorURLs Return the, possibly empty, list of anchor URLs.  
getResourceTypePrefix Return the type prefix of the resource URL. This includes all up to and including the second slash.  
compareTo Compare the called XResourceId object with the given one.  
isBoundTo Return whether the anchor of the called resource id object represents the same resource as the given object.  
isBoundToURL Return whether the anchor of the called resource id object represents the same resource as the given anchor URL. This is a convenience variant of the isBoundTo() function that can also be seen as an optimization for the case that the anchor consists of exactly one URL.  
clone Return a copy of the called resource id. The caller becomes the owner of the new object.  
Methods' Details
getResourceURL
string
getResourceURL();

Description
Return the URL of the resource.
hasAnchor
boolean
hasAnchor();

Description
Return whether there is a non-empty anchor URL. When this method returns false then getAnchorURLs() will return an empty list.
getAnchor
XResourceId
getAnchor();

Description
Return a new XResourceId that represents the anchor resource.
getAnchorURLs
sequence< string >
getAnchorURLs();

Description
Return the, possibly empty, list of anchor URLs.
getResourceTypePrefix
string
getResourceTypePrefix();

Description
Return the type prefix of the resource URL. This includes all up to and including the second slash.
compareTo
short
compareTo( [in] XResourceId  xId );

Description
Compare the called XResourceId object with the given one.

The two resource ids are compared first by the number of their resource URLs and anchor URLs. When these numbers are the same then the URLs are compared like normal strings beginning with the resource URL.

Parameter xId
The resource id to which the called resource id is compared.
Returns
Returns 0 when the called object has the same number of URLs as the given object and all URLs of the called object are equal to their counterparts of the given object. Returns -1 when the called object has a smaller number of URLs and +1 when it has a larger number of URLs as the given object. When the number of URLs is the same then the result of comparing the first differing URL is returned.
isBoundTo
boolean
isBoundTo( [in] XResourceId  xId,
[in] AnchorBindingMode  eMode );

Description
Return whether the anchor of the called resource id object represents the same resource as the given object.

Note that not only the anchor of the given object is taken into account. The whole object, including the resource URL, is interpreted as anchor resource.

Parameter xAnchor
The resource id of the anchor.
Parameter eMode
This mode specifies how the called resource has to be bound to the given anchor in order to have this function return true .

If eMode is DIRECT then the anchor of the called resource id has to be identical to the given anchor. If eMode is INDIRECT then the given anchor has to be a part of the anchor of the called resource.

isBoundToURL
boolean
isBoundToURL( [in] string  sAnchorURL,
[in] AnchorBindingMode  eMode );

Description
Return whether the anchor of the called resource id object represents the same resource as the given anchor URL. This is a convenience variant of the isBoundTo() function that can also be seen as an optimization for the case that the anchor consists of exactly one URL.
Parameter xAnchor
The resource URL of the anchor.
Parameter eMode
This mode specifies how the called resource has to be bound to the given anchor in order to have this function return. See the description of isBoundTo() for more information.
clone
XResourceId
clone();

Description
Return a copy of the called resource id. The caller becomes the owner of the new object.
Top of Page