org.eclipse.xtext.linking.lazy
Class LazyURIEncoder

java.lang.Object
  extended by org.eclipse.xtext.linking.lazy.LazyURIEncoder

public class LazyURIEncoder
extends java.lang.Object

Author:
Sven Efftinge - Initial contribution and API

Constructor Summary
LazyURIEncoder()
           
 
Method Summary
 void appendShortFragment(org.eclipse.emf.ecore.EObject obj, java.lang.StringBuilder target)
           
 Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> decode(org.eclipse.emf.ecore.resource.Resource res, java.lang.String uriFragment)
          decodes the uriFragment
 java.lang.String encode(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EReference ref, INode node)
          encodes the given three parameters into a string, so that they can be retrieved from a resource using decode(Resource, String)
 org.eclipse.emf.ecore.EReference fromShortExternalForm(org.eclipse.emf.ecore.EClass clazz, java.lang.String shortForm)
           
 INode getNode(INode node, java.lang.String path)
          ONLY public to be testable
 void getRelativePath(java.lang.StringBuilder result, INode parserNode, INode node)
          ONLY public to be testable
protected  boolean isAncestor(INode parent, INode child)
           
 boolean isCrossLinkFragment(org.eclipse.emf.ecore.resource.Resource res, java.lang.String s)
           
 org.eclipse.emf.ecore.EObject resolveShortFragment(org.eclipse.emf.ecore.resource.Resource res, java.lang.String shortFragment)
           
 java.lang.String toShortExternalForm(org.eclipse.emf.ecore.EClass clazz, org.eclipse.emf.ecore.EReference ref)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyURIEncoder

public LazyURIEncoder()
Method Detail

encode

public java.lang.String encode(org.eclipse.emf.ecore.EObject obj,
                               org.eclipse.emf.ecore.EReference ref,
                               INode node)
encodes the given three parameters into a string, so that they can be retrieved from a resource using decode(Resource, String)

Parameters:
obj -
ref -
node -
Returns:

appendShortFragment

public void appendShortFragment(org.eclipse.emf.ecore.EObject obj,
                                java.lang.StringBuilder target)

toShortExternalForm

public java.lang.String toShortExternalForm(org.eclipse.emf.ecore.EClass clazz,
                                            org.eclipse.emf.ecore.EReference ref)

decode

public Triple<org.eclipse.emf.ecore.EObject,org.eclipse.emf.ecore.EReference,INode> decode(org.eclipse.emf.ecore.resource.Resource res,
                                                                                           java.lang.String uriFragment)
decodes the uriFragment

Parameters:
res -
uriFragment -
Returns:

resolveShortFragment

public org.eclipse.emf.ecore.EObject resolveShortFragment(org.eclipse.emf.ecore.resource.Resource res,
                                                          java.lang.String shortFragment)

fromShortExternalForm

public org.eclipse.emf.ecore.EReference fromShortExternalForm(org.eclipse.emf.ecore.EClass clazz,
                                                              java.lang.String shortForm)

getRelativePath

public void getRelativePath(java.lang.StringBuilder result,
                            INode parserNode,
                            INode node)
ONLY public to be testable


isAncestor

protected boolean isAncestor(INode parent,
                             INode child)

getNode

public INode getNode(INode node,
                     java.lang.String path)
ONLY public to be testable


isCrossLinkFragment

public boolean isCrossLinkFragment(org.eclipse.emf.ecore.resource.Resource res,
                                   java.lang.String s)