public class WebURL
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
WebURL(java.lang.String aSpec)
Creates a new WebURL for given URL string.
|
Modifier and Type | Method and Description |
---|---|
WebFile |
createFile(boolean isDir)
Creates a file for the URL.
|
boolean |
equals(java.lang.Object anObj)
Standard equals implementation.
|
WebSite |
getAsSite()
Returns the site for the URL.
|
WebFile |
getFile()
Returns the file for the URL.
|
protected WebFile |
getFileImpl()
Returns the file for the URL.
|
WebURL |
getFileURL()
Returns the URL for the file (no hashtags).
|
java.lang.String |
getHost()
Returns the Host part of the URL (the Authority minus the optional UserInfo and Port).
|
java.lang.String |
getPath()
Returns the part of the URL string that describes the file path.
|
java.lang.String |
getPathName()
Returns the last component of the file path.
|
java.lang.String |
getPathNameSimple()
Returns the last component of the file path minus any '.' extension suffix.
|
int |
getPort()
Returns the port of the URL.
|
java.lang.String |
getQuery()
Returns the part of the URL string that describes the query.
|
java.lang.String |
getQueryValue(java.lang.String aKey)
Returns the value for given Query key in URL, if available.
|
java.lang.String |
getRef()
Returns the hash tag reference from the URL as a simple string.
|
java.lang.String |
getRefValue(java.lang.String aKey)
Returns the value for given HashTag key in URL, if available.
|
java.lang.String |
getScheme()
Returns the URL Scheme (lower case).
|
WebSite |
getSite()
Returns the source of this URL.
|
WebURL |
getSiteURL()
Returns the URL for the source of this URL.
|
WebURL |
getStaticFileURL()
Returns the URL for the static file (no query/hashtags).
|
java.lang.String |
getString()
Returns the URL string.
|
java.net.URL |
getURL()
Returns the standard URL.
|
static WebURL |
getURL(java.lang.Class aClass,
java.lang.String aName)
Returns a URL for given class and resource name.
|
static WebURL |
getURL(java.lang.Object anObj)
Returns a URL for given object.
|
int |
hashCode()
Standard HashCode implementation.
|
boolean |
isFileSet()
Returns whether file has been set/loaded for this URL.
|
boolean |
isFileURL()
Returns whether URL is for file only (no hashtags).
|
boolean |
isStaticFileURL()
Returns whether URL is for static file only (no query/hashtags).
|
java.lang.String |
toString()
Standard toString implementation.
|
protected WebURL(java.lang.String aSpec)
public static WebURL getURL(java.lang.Object anObj)
public static WebURL getURL(java.lang.Class aClass, java.lang.String aName)
public java.net.URL getURL()
public java.lang.String getString()
public java.lang.String getScheme()
public java.lang.String getHost()
public int getPort()
public java.lang.String getPath()
public java.lang.String getPathName()
public java.lang.String getPathNameSimple()
public java.lang.String getQuery()
public java.lang.String getQueryValue(java.lang.String aKey)
public java.lang.String getRef()
public java.lang.String getRefValue(java.lang.String aKey)
public WebSite getSite()
public WebURL getSiteURL()
public boolean isFileSet()
@Nullable public WebFile getFile()
@Nullable protected WebFile getFileImpl()
public WebFile createFile(boolean isDir)
public boolean isFileURL()
public boolean isStaticFileURL()
public WebURL getFileURL()
public WebURL getStaticFileURL()
public WebSite getAsSite()
public boolean equals(java.lang.Object anObj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object