java.lang.Object
org.tigris.subversion.svnclientadapter.SVNUrl

public class SVNUrl extends Object
We could have used URL, using custom protocols (svn, svn+ssl) (@see http://developer.java.sun.com/developer/onlineTraining/protocolhandlers/) but this is not really necessary as we don't want to open a connection directly with this class. We just want a string which represent a SVN url which can be used with our JNI methods. An SVNUrl is immutable.
Author:
C�dric Chabanois cchabanois@ifrance.com
  • Field Details

  • Constructor Details

  • Method Details

    • appendPath

      public SVNUrl appendPath(String path)
      Asnwer a new SVNUrl with added segments
      Parameters:
      path - a String of path segment(s) to ba appended to receiver
      Returns:
      new SVNUrl
    • getDefaultPort

      public static int getDefaultPort(String protocol)
      get the default port for given protocol
      Parameters:
      protocol -
      Returns:
      port number or -1 if protocol is unknown
    • getProtocol

      public String getProtocol()
      get the protocol
      Returns:
      either http, https, file, svn or svn+ssh
    • getHost

      public String getHost()
      Returns:
      Returns the host.
    • getPort

      public int getPort()
      Returns:
      Returns the port.
    • getPathSegments

      public String[] getPathSegments()
      get the path of the url.
      Returns:
      an arrray of url path segments
    • getLastPathSegment

      public String getLastPathSegment()
      Returns:
      the "file" name, i.e. the element after last /
    • getParent

      public SVNUrl getParent()
      Return new SVNUrl which represents parent of the receiver
      Returns:
      the parent url or null if no parent
    • equals

      public boolean equals(Object target)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object