Package io.polywrap.core.resolution
Class Uri
-
- All Implemented Interfaces:
public final class UriUri class for working with wrap URIs.
wrap://ipfs/QmHASH
wrap://fs/directory/file.txt
wrap://http/https://example.com
wrap://ens/sub.domain.eth
Breaking down the various parts of the URI, as it applies to the URI standard:
wrap:// - URI Scheme: differentiates Polywrap URIs.
ipfs/ - URI Authority: allows the Polywrap URI resolution algorithm to determine an authoritative URI resolver.
sub.domain.eth - URI Path: tells the Authority where the Wrapper resides.
The primary constructor consumes an FfiUri and deallocates its memory.
-
-
Method Summary
Modifier and Type Method Description final <Error class: unknown class>getUri()The string representation of the Uri final <Error class: unknown class>getAuthority()The authority component of the Uri final <Error class: unknown class>getPath()The path component of the Uri Booleanequals(Object other)StringtoString()IntegerhashCode()-
-
Constructor Detail
-
Uri
Uri(String uri)
Constructs a Uri instance from a wrap URI string.- Parameters:
uri- a string representation of a wrap URI
-
Uri
Uri(<Error class: unknown class> ffiUri)
Constructs a Uri instance from a wrap URI string.
-
-
Method Detail
-
getUri
final <Error class: unknown class> getUri()
The string representation of the Uri
-
getAuthority
final <Error class: unknown class> getAuthority()
The authority component of the Uri
-
getPath
final <Error class: unknown class> getPath()
The path component of the Uri
-
-
-
-