public class PortableURIs extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PortableURIs.PortableFragmentDescription |
| Modifier and Type | Field and Description |
|---|---|
static String |
PORTABLE_SCHEME |
| Constructor and Description |
|---|
PortableURIs() |
| Modifier and Type | Method and Description |
|---|---|
protected PortableURIs.PortableFragmentDescription |
createPortableFragmentDescription(IEObjectDescription desc,
org.eclipse.emf.ecore.EObject target) |
protected PortableURIs.PortableFragmentDescription |
fromFragmentString(String fragmentString) |
org.eclipse.emf.ecore.EObject |
getEObject(org.eclipse.emf.ecore.EObject from,
String toFragment)
Finds an EObject for the given context EObject and fragment.
|
String |
getFragment(org.eclipse.emf.ecore.EObject fromContainer,
org.eclipse.emf.ecore.EObject toChild)
Computes a fragment to the child relative from the given container.
|
protected String |
getPortableURIFragment(org.eclipse.emf.ecore.EObject obj) |
boolean |
isPortableURIFragment(String uriFragment) |
org.eclipse.emf.ecore.EObject |
resolve(StorageAwareResource resource,
String portableFragment)
Resolves a given portable URI fragment against the given resource.
|
protected String |
toFragmentString(PortableURIs.PortableFragmentDescription desc) |
org.eclipse.emf.common.util.URI |
toPortableURI(StorageAwareResource sourceResource,
org.eclipse.emf.ecore.EObject targetObject)
Creates and returns a portable URI from the global scope.
|
org.eclipse.emf.common.util.URI |
toPortableURI(StorageAwareResource sourceResource,
org.eclipse.emf.common.util.URI targetURI)
Creates and returns a portable URI from the given resource to the targetURI.
|
public static final String PORTABLE_SCHEME
public boolean isPortableURIFragment(String uriFragment)
public org.eclipse.emf.ecore.EObject resolve(StorageAwareResource resource, String portableFragment)
resource - the resource from which global scope to look up the EObjectportableFragment - the portable fragment pointing to the to be resolved EObjectpublic org.eclipse.emf.common.util.URI toPortableURI(StorageAwareResource sourceResource, org.eclipse.emf.common.util.URI targetURI)
null is no portable URI can be constructed, which is the case if the
targetObject is not itself exported or is a child of an exported EObject.sourceResource - the resource from which the EObject should later be resolvedtargetURI - the target URI that should be resolvable by the created portable URInullpublic org.eclipse.emf.common.util.URI toPortableURI(StorageAwareResource sourceResource, org.eclipse.emf.ecore.EObject targetObject)
null is no portable URI can be constructed, which is the case if the
targetObject is not itself exported or is a child of an exported EObject.sourceResource - the resource from which the EObject should later be resolvedtargetObject - the target object that should be resolvable by the created portable URInullprotected String getPortableURIFragment(org.eclipse.emf.ecore.EObject obj)
null if the give EObject isn't itself or is not contained in an exported EObjectDescriptionprotected PortableURIs.PortableFragmentDescription createPortableFragmentDescription(IEObjectDescription desc, org.eclipse.emf.ecore.EObject target)
protected String toFragmentString(PortableURIs.PortableFragmentDescription desc)
protected PortableURIs.PortableFragmentDescription fromFragmentString(String fragmentString)
public String getFragment(org.eclipse.emf.ecore.EObject fromContainer, org.eclipse.emf.ecore.EObject toChild)
fromContainer - the container EObject from which the fragment path is computedtoChild - the target EObject which can be found using the fromContainer and resulting fragment pathnull is fromContainer == toChildgetEObject(EObject,String)public org.eclipse.emf.ecore.EObject getEObject(org.eclipse.emf.ecore.EObject from,
String toFragment)
from - the EObject from which the path should be resolvedtoFragment - the fragmentnull, the given EObject itself will be returned.Copyright © 2015. All Rights Reserved.