Class SVNUrl
java.lang.Object
org.tigris.subversion.svnclientadapter.SVNUrl
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendPath
(String path) Asnwer a new SVNUrl with added segmentsboolean
static int
getDefaultPort
(String protocol) get the default port for given protocolgetHost()
Return new SVNUrl which represents parent of the receiverString[]
get the path of the url.int
getPort()
get the protocolint
hashCode()
toString()
-
Field Details
-
SEGMENT_SEPARATOR
protected static final char SEGMENT_SEPARATOR- See Also:
-
-
Constructor Details
-
SVNUrl
Constructor- Parameters:
svnUrl
- a string to parse url from- Throws:
MalformedURLException
- when parsing failed
-
-
Method Details
-
appendPath
Asnwer a new SVNUrl with added segments- Parameters:
path
- a String of path segment(s) to ba appended to receiver- Returns:
- new SVNUrl
-
getDefaultPort
get the default port for given protocol- Parameters:
protocol
-- Returns:
- port number or -1 if protocol is unknown
-
getProtocol
get the protocol- Returns:
- either http, https, file, svn or svn+ssh
-
getHost
- Returns:
- Returns the host.
-
getPort
public int getPort()- Returns:
- Returns the port.
-
getPathSegments
get the path of the url.- Returns:
- an arrray of url path segments
-
getLastPathSegment
- Returns:
- the "file" name, i.e. the element after last /
-
getParent
Return new SVNUrl which represents parent of the receiver- Returns:
- the parent url or null if no parent
-
equals
-
hashCode
public int hashCode() -
toString
-