Uniform Resource Name (URN)
More...
#include <base/net/Urn.h>
Inherits Object.
Uniform Resource Name (URN)
Implementation of Uniform Resource Name (URN) as specified by RFC 2141. Uniform Resource Names (URNs) are intended to serve as persistent, location-independent, resource identifiers. The components of the urn are stored internally in escaped format.
See https://en.wikipedia.org/wiki/Uniform_Resource_Name.
- Version
- 1.0
◆ Urn() [1/4]
Initializes urn as invalid.
◆ Urn() [2/4]
Urn::Urn |
( |
const String & |
urn | ) |
|
Initializes urn from a string representation.
- Parameters
-
urn | The string representation of the URN. |
◆ Urn() [3/4]
Initializes URN from nid and nss strings.
- Parameters
-
nid | The namespace identifier. |
nss | The namespace specific string. |
◆ Urn() [4/4]
Urn::Urn |
( |
const Urn & |
copy | ) |
|
|
noexcept |
Initializes urn from other urn.
◆ getNID()
const String& Urn::getNID |
( |
| ) |
const |
|
inlinenoexcept |
Returns the namespace identifier.
◆ getNSS()
const String& Urn::getNSS |
( |
| ) |
const |
|
inlinenoexcept |
Returns the namespace specific string.
◆ getUnescapedNSS()
String Urn::getUnescapedNSS |
( |
| ) |
const |
Returns the unescaped namespace specific string.
◆ getUrn()
Returns the URN in escaped format.
◆ isUrn()
static bool Urn::isUrn |
( |
const String & |
urn | ) |
|
|
staticnoexcept |
Returns true if the specified string is a valid urn.
◆ operator String()
Urn::operator String |
( |
| ) |
const |
|
inline |
Returns the URN in escaped format.
◆ operator=()
Urn& Urn::operator= |
( |
const Urn & |
assign | ) |
|
|
noexcept |
Assignment of URN by URN.
◆ operator==()
bool Urn::operator== |
( |
const Urn & |
compare | ) |
const |
|
noexcept |
Returns true if the URN are equal.
◆ setNID()
void Urn::setNID |
( |
const String & |
value | ) |
|
◆ setNSS()
void Urn::setNSS |
( |
const String & |
value | ) |
|
Sets the namespace specific string of the URN.