Methods' Summary |
getUriReference |
returns the textual representation of the complete URI reference.
|
isAbsolute |
returns whether this URI reference is absolute or relative.
|
getScheme |
returns the scheme part of this (absolute) URI reference.
|
getSchemeSpecificPart |
returns the scheme-specific part of this URI reference.
|
isHierarchical |
[ DEPRECATED ]
returns whether this URI reference is hierarchical or opaque, in the sense of RFC 2396.
|
hasAuthority |
returns whether this URI reference has an authority part.
|
getAuthority |
returns the authority part of this URI reference.
|
getPath |
returns the path part of this URI reference.
|
hasRelativePath |
returns whether this URI reference has a relative path.
|
getPathSegmentCount |
returns the number of path segments of this URI reference.
|
getPathSegment |
returns a given path segment of this URI reference.
|
hasQuery |
returns whether this URI reference has a query part.
|
getQuery |
returns the query part of this URI reference.
|
hasFragment |
returns whether this URI reference has a fragment part.
|
getFragment |
returns the fragment part of this URI reference.
|
setFragment |
sets the fragment part of this URI reference.
|
clearFragment |
clears the fragment part of this URI reference.
|
Methods' Details |
getUriReference
string |
getUriReference(); |
- Description
- returns the textual representation of the complete URI reference.
- Returns
- the textual representation of the complete URI reference. The exact
spelling of the URI reference is retained.
|
|
isAbsolute
- Description
- returns whether this URI reference is absolute or relative.
A URI is absolute if it has a scheme.
- Returns
- `TRUE` if this URI reference is absolute, `FALSE` if it is relative.
|
|
getScheme
- Description
- returns the scheme part of this (absolute) URI reference.
- Returns
- the textual representation of the scheme part (with the exact spelling
retained; without the delimiting “
: ”), if this
is an absolute URI reference; otherwise, an empty `string` is
returned.
|
|
getSchemeSpecificPart
string |
getSchemeSpecificPart(); |
- Description
- returns the scheme-specific part of this URI reference.
For an absolute URI reference, the scheme-specific part is everything
after the scheme part and the delimiting “: ”,
and before the optional “# ” and fragment part.
For a relative URI reference, the scheme-specific part is everything
before the optional “# ” and fragment part.
- Returns
- the textual representation of the scheme-specific part (with the exact
spelling retained).
|
|
isHierarchical
boolean |
isHierarchical(); |
- Usage Restrictions
- deprecated
- Deprecation Info
- RFC 3986 no longer differentiates between hierarchical and opaque URIs.
- Description
- returns whether this URI reference is hierarchical or opaque, in the sense of RFC 2396.
An absolute URI reference is hierarchical if its scheme-specific part
starts with “/ ”. A relative URI reference is
always hierarchical.
- Returns
- `TRUE` if this URI reference is hierarchical, `FALSE` if it is opaque.
|
|
hasAuthority
- Description
- returns whether this URI reference has an authority part.
- Returns
- `TRUE` if this URI reference has an authority part.
|
|
getAuthority
- Description
- returns the authority part of this URI reference.
- Returns
- the textual representation of the authority part (with the exact spelling
retained), if this is a URI reference that has an authority
part; otherwise, an empty `string` is returned.
|
|
getPath
- Description
- returns the path part of this URI reference.
- Returns
- the textual representation of the path part (with the exact spelling
retained).
|
|
hasRelativePath
boolean |
hasRelativePath(); |
- Description
- returns whether this URI reference has a relative path.
- Returns
- `TRUE` if this URI reference has a relative path.
|
|
getPathSegmentCount
long |
getPathSegmentCount(); |
- Description
- returns the number of path segments of this URI reference.
For a URI reference with
an empty path, the number of path segments is zero. For a
URI reference with an absolute, non-empty path, the number of path
segments equals the number of “/ ” delimiters.
For a URI reference with a relative, non-empty path, the
number of path segments equals the number of “/ ”
delimiters, plus one.
- Returns
- the number of path segments.
|
|
getPathSegment
string |
getPathSegment( |
[in] long |
index ); |
- Description
- returns a given path segment of this URI reference.
- Parameter index
- the index of the path segment, starting at zero.
- Returns
- the textual representation of the given path segment (with the exact
spelling retained, without any delimiting “
/ ”),
if this URI reference has that many path segments;
otherwise, and in particular if index is negative, an empty
`string` is returned.
|
|
hasQuery
- Description
- returns whether this URI reference has a query part.
- Returns
- `TRUE` if this URI reference has a query part.
|
|
getQuery
- Description
- returns the query part of this URI reference.
- Returns
- the textual representation of the query part (with the exact spelling
retained; without the delimiting “
? ”), if this
is a URI reference that has a query part; otherwise, an
empty `string` is returned.
|
|
hasFragment
- Description
- returns whether this URI reference has a fragment part.
- Returns
- `TRUE` if this URI reference has a fragment part.
|
|
getFragment
- Description
- returns the fragment part of this URI reference.
- Returns
- the textual representation of the fragment part (with the exact spelling
retained; without the delimiting “
# ”), if this
is a URI reference that has a fragment part; otherwise, an empty
`string` is returned.
|
|
setFragment
void |
setFragment( |
[in] string |
fragment ); |
- Description
- sets the fragment part of this URI reference.
- Parameter fragment
- the textual representation of the new fragment part. The exact spelling
will be preserved, and no escaping is performed.
|
|
clearFragment
- Description
- clears the fragment part of this URI reference.
|
|
Copyright © 2020, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.