public class ContextAwareProxyURIHelper
extends java.lang.Object
URI
s that carry the target metamodel descriptor
and the context URI
as context information.Constructor and Description |
---|
ContextAwareProxyURIHelper() |
Modifier and Type | Method and Description |
---|---|
void |
augmentToContextAwareProxy(org.eclipse.emf.ecore.EObject proxy,
org.eclipse.emf.ecore.resource.Resource contextResource)
Augments given
proxy to a context-aware proxy by adding key/value pairs that contain the
target metamodel descriptor and a context URI to the query string of the proxy URI. |
org.eclipse.emf.common.util.URI |
getContextURI(org.eclipse.emf.common.util.URI uri)
Extracts the context
URI carried by given context-aware proxy URI . |
java.lang.String |
getTargetMetaModelDescriptorId(org.eclipse.emf.common.util.URI uri)
Extracts the identifier of the target
metamodel descriptor carried by given
context-aware proxy URI . |
org.eclipse.emf.common.util.URI |
trimProxyContextInfo(org.eclipse.emf.common.util.URI proxyURI)
If given
proxy URI contains proxy context-related key/value pairs on its query
string , returns the URI formed by removing those key/value pairs or removing the query string entirely in case
that no other key/value pairs exist; returns given proxy URI unchanged, otherwise. |
public void augmentToContextAwareProxy(org.eclipse.emf.ecore.EObject proxy, org.eclipse.emf.ecore.resource.Resource contextResource)
proxy
to a context-aware proxy by adding key/value pairs that contain the
target metamodel descriptor
and a context URI
to the query string
of the proxy URI. Those are required to support the resolution of proxified references between
objects from different metamodels and to honor the resource scope
of the proxy URI when it
is being resolved.proxy
- The proxy to be handled.contextResource
- The resource that identifies the context of the proxy (typically the resource containing it).trimProxyContextInfo(URI)
public org.eclipse.emf.common.util.URI trimProxyContextInfo(org.eclipse.emf.common.util.URI proxyURI)
proxy URI
contains proxy context-related key/value pairs on its query
string
, returns the URI formed by removing those key/value pairs or removing the query string entirely in case
that no other key/value pairs exist; returns given proxy URI unchanged, otherwise.proxyURI
- The context-aware proxy URI to be handled.#augmentToContextAwareProxy(EObject)
public java.lang.String getTargetMetaModelDescriptorId(org.eclipse.emf.common.util.URI uri)
metamodel descriptor
carried by given
context-aware proxy URI
.public org.eclipse.emf.common.util.URI getContextURI(org.eclipse.emf.common.util.URI uri)
URI
carried by given context-aware proxy URI
.