Class LazyUriEncoder


  • public class LazyUriEncoder
    extends Object
    Класс для кодирования\декодирования символических ссылок
    • Constructor Summary

      Constructors 
      Constructor Description
      LazyUriEncoder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void appendShortFragment​(org.eclipse.emf.ecore.EObject obj, StringBuilder target)  
      Quad<org.eclipse.emf.ecore.EObject,​org.eclipse.emf.ecore.EReference,​INode,​String> decode​(org.eclipse.emf.ecore.resource.Resource resource, String syntheticLink)
      Метод для получения четверки: <Объект, Ссылка, Узел, Текст ссылки> по синтетической ссылке или
      String encode​(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EReference ref, int index, String symLink)
      Создает синтетическую ссылку - строковое представление символической ссылки для: объект, неконтэйнмент ссылка, индекс, текстовое представление символической ссылки
      protected org.eclipse.emf.ecore.EReference fromShortExternalForm​(org.eclipse.emf.ecore.EClass clazz, String shortForm)  
      boolean isLazyLinkFragment​(org.eclipse.emf.ecore.resource.Resource res, String linkFragment)
      Определяет является ли фрагмент uri linkFragment представлением символической ссылки
      protected String toShortExternalForm​(org.eclipse.emf.ecore.EClass clazz, org.eclipse.emf.ecore.EReference ref)  
    • Constructor Detail

      • LazyUriEncoder

        public LazyUriEncoder()
    • Method Detail

      • encode

        public String encode​(org.eclipse.emf.ecore.EObject obj,
                             org.eclipse.emf.ecore.EReference ref,
                             int index,
                             String symLink)
        Создает синтетическую ссылку - строковое представление символической ссылки для: объект, неконтэйнмент ссылка, индекс, текстовое представление символической ссылки
        Parameters:
        \u043e\u0431\u044a\u0435\u043a\u0442 - модели
        ref - неконтэйнмент ссылка
        index - индекс узла из parse-tree для прокси
        symLink - текстовое представление символической ссылки
        Returns:
        синтетическая ссылка
      • decode

        public Quad<org.eclipse.emf.ecore.EObject,​org.eclipse.emf.ecore.EReference,​INode,​String> decode​(org.eclipse.emf.ecore.resource.Resource resource,
                                                                                                                          String syntheticLink)
        Метод для получения четверки: <Объект, Ссылка, Узел, Текст ссылки> по синтетической ссылке или
        Parameters:
        resource - ресурс
        syntheticLink - синтетическая ссылка
        Returns:
        четверка: <Объект, Ссылка, Узел, Текст ссылки>
      • isLazyLinkFragment

        public boolean isLazyLinkFragment​(org.eclipse.emf.ecore.resource.Resource res,
                                          String linkFragment)
        Определяет является ли фрагмент uri linkFragment представлением символической ссылки
        Parameters:
        res - ресурс
        linkFragment - фрагмент uri
        Returns:
        является ли фрагмент uri linkFragment представлением символической ссылки
      • appendShortFragment

        protected void appendShortFragment​(org.eclipse.emf.ecore.EObject obj,
                                           StringBuilder target)
      • toShortExternalForm

        protected String toShortExternalForm​(org.eclipse.emf.ecore.EClass clazz,
                                             org.eclipse.emf.ecore.EReference ref)
      • fromShortExternalForm

        protected org.eclipse.emf.ecore.EReference fromShortExternalForm​(org.eclipse.emf.ecore.EClass clazz,
                                                                         String shortForm)