Package org.eclipse.emf.cdo.util
Class CDOURIUtil
java.lang.Object
org.eclipse.emf.cdo.util.CDOURIUtil
Various static methods that may help with CDO-specific
URIs.
CDO URIs are in one of two different formats, either canonical or connection-aware. The canonical format is:
cdo:// RepositoryUUID / ResourcePath [? Param=Value (& Param=Value)*]The non-terminals being:
- RepositoryUUID: the
UUIDof the repository. By default it's generated when a repository is first started. If the default format is not adequate the UUID value can be overridden in the repository setup with theoverrideUUIDproperty. - ResourcePath: the full path of the
resourcewithin the repository, segments separated by slashes, no leading slash. - Param: one of the following
- prefetch: a boolean value. The value true attempts to load all objects contained by the resource in a single server-round trip and cache the results.
resources properly require the resource set to be
configured externally so that the connection to the correct repository can be established, for example:
session.openView(resourceSet);
Note that resources preserve their original URI in the scope of the managing view, that is not necessarily in canonical format.
For a description of the connection-aware URI format refer to CDOURIData.
- Since:
- 2.0
- Author:
- Simon McDuff
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionanalyzePath(String path) analyzePath(URI uri) static voidappendQueryParameter(StringBuilder query, String parameter, String value) static URIappendResourcePath(URI uri, String path) static CDOIDconvertExternalCDOID(URI baseURI, CDOID newCDOID) Converting temporary CDOID to External CDOID
e.g.:
baseURI = cdo://2a57dfcf-8f97-4d39-8e17-9d99ae5c4b3c/resB#5/2
newCDOID = OID2
return = cdo://2a57dfcf-8f97-4d39-8e17-9d99ae5c4b3c/resB#1/2static URIcreateResourceURI(String repositoryUUID, String path) Deprecated.This method is subject to removal in a future release.static URIcreateResourceURI(CDOSession session, String path) Deprecated.This method is subject to removal in a future release.static URIcreateResourceURI(CDOView view, String path) static StringextractRepositoryUUID(URI uri) Deprecated.static String[]static StringextractResourcePath(URI uri) static StringformatQuery(Map<String, String> parameters) getParameters(String query) static StringsanitizePath(String path) static URItrimResourceInfos(URI uri) static voidvalidateURI(URI uri) Deprecated.
-
Field Details
-
PROTOCOL_NAME
- Since:
- 4.0
- See Also:
-
SEGMENT_SEPARATOR_CHAR
public static final char SEGMENT_SEPARATOR_CHAR- See Also:
-
SEGMENT_SEPARATOR
-
-
Method Details
-
extractResourceFolderAndName
- Throws:
InvalidURIException
-
extractResourcePath
- Throws:
InvalidURIException
-
createResourceURI
-
convertExternalCDOID
Converting temporary CDOID to External CDOID
e.g.:
baseURI = cdo://2a57dfcf-8f97-4d39-8e17-9d99ae5c4b3c/resB#5/2
newCDOID = OID2
return = cdo://2a57dfcf-8f97-4d39-8e17-9d99ae5c4b3c/resB#1/2 -
sanitizePath
- Since:
- 4.11
-
analyzePath
-
analyzePath
-
getParameters
- Since:
- 4.0
-
formatQuery
- Since:
- 4.12
-
appendQueryParameter
- Since:
- 4.12
-
appendResourcePath
- Since:
- 4.12
-
trimResourceInfos
- Since:
- 4.12
-
validateURI
Deprecated.- Throws:
InvalidURIException
-
extractRepositoryUUID
Deprecated. -
createResourceURI
Deprecated.This method is subject to removal in a future release.cdo://repositoryUUID/path
The path is added at the end of "cdo://repositoryUUID". If path doesn't start with '/', it will be added automatically.
e.g.: /resA or resA will give the same result → cdo://repositoryUUID/resA
authority = repositoryUUID
path = /resA -
createResourceURI
Deprecated.This method is subject to removal in a future release.
-