Oxygen XML Editor 11.2 Author API

ro.sync.exml.workspace.api.util
Interface UtilAccess

All Known Subinterfaces:
AuthorUtilAccess

public interface UtilAccess

Provides access to utility methods.

*********************************
EXPERIMENTAL - Subject to change
*********************************

Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.

Since:
11.2

Method Summary
 String correctURL(String url)
          Corrects the given URL by converting not allowed characters to their escaped representation.
 File locateFile(URL url)
          Locate the file on disk corresponding to the URL.
 String makeRelative(URL baseURL, URL childURL)
          Make the child URL relative to the base URL.
 

Method Detail

makeRelative

String makeRelative(URL baseURL,
                    URL childURL)
Make the child URL relative to the base URL.

The child URL is relatively expressed to the base URL. If it is not possible, the child URL is returned.

For example if the base URL is "file://c:/projects/exml/base.prx" and the child URL is "file://c:/projects/exml/test/someTest.xml" the result will be: "test/someTest.xml"

Parameters:
baseURL - The base URL.
childURL - The child URL.
Returns:
The relative path or the childURL if a relative path cannot be computed.

correctURL

String correctURL(String url)
Corrects the given URL by converting not allowed characters to their escaped representation.

Parameters:
url - The URL to be corrected.
Returns:
The corrected URL. It does not return null.

locateFile

File locateFile(URL url)
Locate the file on disk corresponding to the URL.

Parameters:
url - The URL to be checked.
Returns:
The corresponding File from the local file system or null if the URL is remote.

Oxygen XML Editor 11.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2010.