Class UriExtensions


  • public class UriExtensions
    extends java.lang.Object
    Since:
    2.14
    • Constructor Summary

      Constructors 
      Constructor Description
      UriExtensions()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.eclipse.emf.common.util.URI cleanupEncodedCharacters​(org.eclipse.emf.common.util.URI encoded)
      Process the already encoded URI and eliminate unnecessarily encoded parts of it, e.g.
      protected boolean shouldValidateEncodingSequences​(org.eclipse.emf.common.util.URI rawUri, java.lang.String uriAsString)
      Return true if the URI has escape sequence that need to be re-validated and can potentially be simplified.
      java.lang.String toDecodedString​(java.net.URI uri)
      Converts a java.net.URI to a decoded string
      org.eclipse.emf.common.util.URI toEmfUri​(java.net.URI netUri)
      Returns an URI with empty authority, if authority is absent (null) and has file scheme.
      org.eclipse.emf.common.util.URI toUri​(java.lang.String stringUri)
      Converts the given absolute, encoded stringUri to an EMF URI.
      org.eclipse.emf.common.util.URI withEmptyAuthority​(org.eclipse.emf.common.util.URI uri)
      Converts the file URIs with an absent (null) authority to one with an empty ("") authority
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UriExtensions

        public UriExtensions()
    • Method Detail

      • toUri

        public org.eclipse.emf.common.util.URI toUri​(java.lang.String stringUri)
        Converts the given absolute, encoded stringUri to an EMF URI. If the URI is a file URI, it is guaranteed that its authority is not null.
      • shouldValidateEncodingSequences

        protected boolean shouldValidateEncodingSequences​(org.eclipse.emf.common.util.URI rawUri,
                                                          java.lang.String uriAsString)
        Return true if the URI has escape sequence that need to be re-validated and can potentially be simplified.
        Since:
        2.29
      • cleanupEncodedCharacters

        protected org.eclipse.emf.common.util.URI cleanupEncodedCharacters​(org.eclipse.emf.common.util.URI encoded)
        Process the already encoded URI and eliminate unnecessarily encoded parts of it, e.g. encoded characters that would be valid in the part of the URI where they occur. The result is supposed to be encoded in a minimal (only the strictly necessary but no optional escape sequences) way.
        Since:
        2.29
      • toEmfUri

        public org.eclipse.emf.common.util.URI toEmfUri​(java.net.URI netUri)
        Returns an URI with empty authority, if authority is absent (null) and has file scheme.
      • toDecodedString

        public java.lang.String toDecodedString​(java.net.URI uri)
        Converts a java.net.URI to a decoded string
      • withEmptyAuthority

        public org.eclipse.emf.common.util.URI withEmptyAuthority​(org.eclipse.emf.common.util.URI uri)
        Converts the file URIs with an absent (null) authority to one with an empty ("") authority