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() |
WebFile |
getFile()
Returns the file for the URL, may be null.
|
protected WebFile |
getFileImpl() |
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() |
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() |
WebURL |
getSiteURL()
Returns the URL for the source of this URL.
|
WebURL |
getStaticFileURL() |
java.lang.String |
getString() |
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(@Nonnull java.lang.String aSpec)
@Nullable public static WebURL getURL(@Nullable java.lang.Object anObj)
anObj
- Object to create a WebURL from. May be null (if null, null is returned.)@Nullable public static WebURL getURL(@Nonnull java.lang.Class aClass, @Nullable java.lang.String aName)
public java.net.URL getURL()
public java.lang.String getString()
@Nullable public java.lang.String getScheme()
@Nullable public java.lang.String getHost()
public int getPort()
@Nullable public java.lang.String getPath()
public java.lang.String getPathName()
public java.lang.String getPathNameSimple()
@Nullable public java.lang.String getQuery()
@Nullable public java.lang.String getQueryValue(@Nonnull java.lang.String aKey)
@Nullable public java.lang.String getRef()
@Nullable public java.lang.String getRefValue(@Nonnull java.lang.String aKey)
public WebSite getSite()
@Nonnull public WebURL getSiteURL()
public boolean isFileSet()
public WebFile getFile()
protected WebFile getFileImpl()
@Nullable public WebFile createFile(boolean isDir)
public boolean isFileURL()
public boolean isStaticFileURL()
@Nonnull 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