Class PathUtils


  • public class PathUtils
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ESCAPED_EMPTY  
    • Constructor Summary

      Constructors 
      Constructor Description
      PathUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.net.URI append​(java.net.URI uri, java.lang.String value)  
      static void deleteAtPath​(java.lang.Object document, java.lang.String path)  
      static java.lang.Object fetchFromPath​(java.lang.Object document, java.lang.String path)  
      static java.lang.String fixUnescaped​(java.lang.String ref)
      Applications are supposed to escape $refs but they often don't.
      static java.net.URI getParent​(java.net.URI uri)  
      static java.lang.Object modifyAtPath​(java.lang.Object document, java.lang.String path, java.lang.Object newObject)  
      • Methods inherited from class java.lang.Object

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

      • PathUtils

        public PathUtils()
    • Method Detail

      • append

        public static java.net.URI append​(java.net.URI uri,
                                          java.lang.String value)
      • modifyAtPath

        public static java.lang.Object modifyAtPath​(java.lang.Object document,
                                                    java.lang.String path,
                                                    java.lang.Object newObject)
                                             throws MissingPathException
        Throws:
        MissingPathException
      • getParent

        public static java.net.URI getParent​(java.net.URI uri)
      • fixUnescaped

        public static java.lang.String fixUnescaped​(java.lang.String ref)
        Applications are supposed to escape $refs but they often don't. We help out applications by attempting to escape some of these characters. Some we can never fix in this way, such as the percent character or forward slash character.
        Parameters:
        ref - The URI to possibly fix.
        Returns:
        The fixed ref.