Urn

final case class Urn(path: UrnPath)(implicit config: UriConfig) extends Uri

Represents a URN. See RFC 2141 and RFC 8141

URNs will be in the form urn:nid:nss

Companion:
object
trait Uri
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Type members

Value members

Concrete methods

def equalsUnordered(other: Uri): Boolean

For URNs this method is exactly the same as ==

For URNs this method is exactly the same as ==

def nid: String
def nss: String
def scheme: String
def schemeOption: Option[String]
def self: Self
def toUrl: Url
def toUrn: Urn
def withConfig(config: UriConfig): Urn
def withScheme(scheme: String): UrlWithoutAuthority

Converts this URN into a URL with the given scheme. The NID and NSS will be made path segments of the URL.

Converts this URN into a URL with the given scheme. The NID and NSS will be made path segments of the URL.

Value parameters:
scheme

the new scheme to set

Returns:

a new Uri with the specified scheme

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product
def toJavaURI: URI

Converts to a java.net.URI

Converts to a java.net.URI

This involves a toString and URI.parse because the specific java.net.URI constructors do not deal properly with encoded elements

Returns:

a java.net.URI matching this io.lemonlabs.uri.Uri

Inherited from:
Uri
override def toString: String
Definition Classes
Uri -> Any
Inherited from:
Uri
def toStringRaw: String

Returns the path with no encoders taking place (e.g. non ASCII characters will not be percent encoded)

Returns the path with no encoders taking place (e.g. non ASCII characters will not be percent encoded)

Returns:

String containing the raw path for this Uri

Inherited from:
Uri

Implicits

Implicits

implicit val config: UriConfig