|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sapportals.portal.prt.service.soap.types.AnyURI
A class to represent a Uniform Resource Identifier (URI). This class is designed to handle the parsing of URIs and provide access to the various components (scheme, host, port, userinfo, path, query string and fragment) that may constitute a URI.
| Constructor Summary | |
AnyURI()
Construct a new and uninitialized URI. |
|
AnyURI(java.lang.String p_uriSpec)
Construct a new URI from a URI specification string. |
|
AnyURI(java.lang.String p_scheme,
java.lang.String p_userinfo,
java.lang.String p_host,
int p_port,
java.lang.String p_path,
java.lang.String p_queryString,
java.lang.String p_fragment)
Construct a new URI that follows the generic URI syntax from its component parts. |
|
| Method Summary | |
void |
appendPath(java.lang.String p_addToPath)
Append to the end of the path of this URI. |
boolean |
equals(java.lang.Object p_test)
Determines if the passed-in Object is equivalent to this URI. |
java.lang.String |
getFragment()
Get the fragment for this URI. |
java.lang.String |
getHost()
Get the host for this URI. |
java.lang.String |
getPath()
Get the path for this URI. |
java.lang.String |
getPath(boolean p_includeQueryString,
boolean p_includeFragment)
Get the path for this URI (optionally with the query string and fragment). |
int |
getPort()
Get the port for this URI. |
java.lang.String |
getQueryString()
Get the query string for this URI. |
java.lang.String |
getScheme()
Get the scheme for this URI. |
java.lang.String |
getSchemeSpecificPart()
Get the scheme-specific part for this URI (everything following the scheme and the first colon). |
java.lang.String |
getUserinfo()
Get the userinfo for this URI. |
static boolean |
isConformantSchemeName(java.lang.String p_scheme)
Determine whether a scheme conforms to the rules for a scheme name. |
boolean |
isGenericURI()
Get the indicator as to whether this URI uses the "generic URI" syntax. |
static void |
main(java.lang.String[] args)
|
void |
setFragment(java.lang.String p_fragment)
Set the fragment for this URI. |
void |
setHost(java.lang.String p_host)
Set the host for this URI. |
void |
setPath(java.lang.String p_path)
Set the path for this URI. |
void |
setPort(int p_port)
Set the port for this URI. |
void |
setQueryString(java.lang.String p_queryString)
Set the query string for this URI. |
void |
setScheme(java.lang.String p_scheme)
Set the scheme for this URI. |
void |
setUserinfo(java.lang.String p_userinfo)
Set the userinfo for this URI. |
java.lang.String |
toString()
Get the URI as a string specification. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public AnyURI()
public AnyURI(java.lang.String p_uriSpec)
throws java.net.MalformedURLException
p_uriSpec - the URI specification string (cannot be null or
empty)java.net.MalformedURLException - if p_uriSpec violates any syntax
rules
public AnyURI(java.lang.String p_scheme,
java.lang.String p_userinfo,
java.lang.String p_host,
int p_port,
java.lang.String p_path,
java.lang.String p_queryString,
java.lang.String p_fragment)
throws java.net.MalformedURLException
p_scheme - the URI scheme (cannot be null or empty)p_userinfo - the URI userinfo (cannot be specified if host
is null)p_host - the hostname for the URIp_port - the URI port (may be -1 for "unspecified"; cannot
be specified if host is null)p_path - the URI pathp_queryString - the URI query string (cannot be specified
if path is null)p_fragment - the URI fragment (cannot be specified if path
is null)java.net.MalformedURLException - if any of the parameters violates
syntax rules or semantic rules| Method Detail |
public java.lang.String getScheme()
public java.lang.String getSchemeSpecificPart()
public java.lang.String getUserinfo()
public java.lang.String getHost()
public int getPort()
public java.lang.String getPath(boolean p_includeQueryString,
boolean p_includeFragment)
p_includeQueryString - if true (and query string is not null),
then a "?" followed by the query string
will be appendedp_includeFragment - if true (and fragment is not null),
then a "#" followed by the fragment
will be appendedpublic java.lang.String getPath()
public java.lang.String getQueryString()
public java.lang.String getFragment()
public void setScheme(java.lang.String p_scheme)
throws java.net.MalformedURLException
p_scheme - the scheme for this URI (cannot be null)java.net.MalformedURLException - if p_scheme is not a conformant
scheme name
public void setUserinfo(java.lang.String p_userinfo)
throws java.net.MalformedURLException
p_userinfo - the userinfo for this URIjava.net.MalformedURLException - if p_userinfo contains invalid
characters
public void setHost(java.lang.String p_host)
throws java.net.MalformedURLException
p_host - the host for this URIjava.net.MalformedURLException - if p_host is not a valid IP
address or DNS hostname.
public void setPort(int p_port)
throws java.net.MalformedURLException
p_port - the port number for this URIjava.net.MalformedURLException - if p_port is not -1 and not a
valid port number
public void setPath(java.lang.String p_path)
throws java.net.MalformedURLException
p_path - the path for this URI (may be null)java.net.MalformedURLException - if p_path contains invalid
characters
public void appendPath(java.lang.String p_addToPath)
throws java.net.MalformedURLException
p_addToPath - the new segment to be added to the current pathjava.net.MalformedURLException - if p_addToPath contains syntax
errors
public void setQueryString(java.lang.String p_queryString)
throws java.net.MalformedURLException
p_queryString - the query string for this URIjava.net.MalformedURLException - if p_queryString is not null and this
URI does not conform to the generic
URI syntax or if the path is null
public void setFragment(java.lang.String p_fragment)
throws java.net.MalformedURLException
p_fragment - the fragment for this URIjava.net.MalformedURLException - if p_fragment is not null and this
URI does not conform to the generic
URI syntax or if the path is nullpublic boolean equals(java.lang.Object p_test)
equals in class java.lang.Objectp_test - the Object to test for equality.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isGenericURI()
public static boolean isConformantSchemeName(java.lang.String p_scheme)
p_scheme - The sheme name to checkpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||