Nebula
Loading...
Searching...
No Matches
IO::URN Class Reference

#include <urn.h>

Detailed Description

A URN (Uniform Resource Name) is a URI (Uniform Resource Identifier) that uses the "urn" scheme.

URNs are intended to serve as persistent, location-independent resource identifiers and are defined in RFC 8141. A URN is typically used to identify a resource by name rather than by location, and is often used in contexts where the resource may not be directly accessible, such as in metadata or as a unique identifier for an asset.

Public Member Functions

 URN ()
 default constructor
 URN (const Util::String &s)
 init constructor
 URN (const char *s)
 init constructor
 URN (const URN &rhs)
 copy constructor
void operator= (const URN &rhs)
 assignmnent operator
bool operator== (const URN &rhs) const
 equality operator
bool operator!= (const URN &rhs) const
 inequality operator
void Set (const Util::String &s)
 set complete URI string
Util::String AsString () const
 return as concatenated string
bool IsEmpty () const
 return true if the URI is empty
bool IsValid () const
 return true if the URI is not empty
void Clear ()
 clear the URI
void SetNamespace (const Util::String &s)
 set Namespace component
const Util::StringGetNamespace () const
 get Namespace component
void SetSpecific (const Util::String &s)
 set Specific component
const Util::StringGetSpecific () const
 get Specific component (can be empty)
void SetQuery (const Util::String &s)
 set query component
const Util::StringGetQuery () const
 get query component (can be empty)
void SetFragment (const Util::String &s)
 set fragment component
const Util::StringGetFragment () const
 get fragment component (can be empty)

Private Member Functions

bool Split (const Util::String &s)
 split string into components
Util::String Build () const
 build string from components

Private Attributes

bool isEmpty
Util::String nid
Util::String nss
Util::String query
Util::String fragment

Constructor & Destructor Documentation

◆ URN() [1/4]

IO::URN::URN ( )
inline

default constructor

◆ URN() [2/4]

IO::URN::URN ( const Util::String & s)
inline

init constructor

◆ URN() [3/4]

IO::URN::URN ( const char * s)
inline

init constructor

◆ URN() [4/4]

IO::URN::URN ( const URN & rhs)
inline

copy constructor

Member Function Documentation

◆ AsString()

Util::String IO::URN::AsString ( ) const
inline

return as concatenated string

◆ Build()

String IO::URN::Build ( ) const
private

build string from components

This builds an URI string from its components.

◆ Clear()

void IO::URN::Clear ( )
inline

clear the URI

◆ GetFragment()

const Util::String & IO::URN::GetFragment ( ) const
inline

get fragment component (can be empty)

◆ GetNamespace()

const Util::String & IO::URN::GetNamespace ( ) const
inline

get Namespace component

◆ GetQuery()

const Util::String & IO::URN::GetQuery ( ) const
inline

get query component (can be empty)

◆ GetSpecific()

const Util::String & IO::URN::GetSpecific ( ) const
inline

get Specific component (can be empty)

◆ IsEmpty()

bool IO::URN::IsEmpty ( ) const
inline

return true if the URI is empty

◆ IsValid()

bool IO::URN::IsValid ( ) const
inline

return true if the URI is not empty

◆ operator!=()

bool IO::URN::operator!= ( const URN & rhs) const
inline

inequality operator

◆ operator=()

void IO::URN::operator= ( const URN & rhs)
inline

assignmnent operator

◆ operator==()

bool IO::URN::operator== ( const URN & rhs) const
inline

equality operator

◆ Set()

void IO::URN::Set ( const Util::String & s)
inline

set complete URI string

◆ SetFragment()

void IO::URN::SetFragment ( const Util::String & s)
inline

set fragment component

◆ SetNamespace()

void IO::URN::SetNamespace ( const Util::String & s)
inline

set Namespace component

◆ SetQuery()

void IO::URN::SetQuery ( const Util::String & s)
inline

set query component

◆ SetSpecific()

void IO::URN::SetSpecific ( const Util::String & s)
inline

set Specific component

◆ Split()

bool IO::URN::Split ( const Util::String & s)
private

split string into components

Resolve assigns and split URN string into its components.

Member Data Documentation

◆ fragment

Util::String IO::URN::fragment
private

◆ isEmpty

bool IO::URN::isEmpty
private

◆ nid

Util::String IO::URN::nid
private

◆ nss

Util::String IO::URN::nss
private

◆ query

Util::String IO::URN::query
private

The documentation for this class was generated from the following files:
  • /github/workspace/code/foundation/io/urn.h
  • /github/workspace/code/foundation/io/urn.cc