Class Did
-
- All Implemented Interfaces:
public final class DidDID provides a way to parse and handle Decentralized Identifier (DID) URIs according to the W3C DID Core specification (https://www.w3.org/TR/did-core/).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDid.ParserParser object used to Parse a DID URI into a DID object.
-
Field Summary
Fields Modifier and Type Field Description private final Stringuriprivate final Stringurlprivate final Stringmethodprivate final Stringidprivate final Map<String, String>paramsprivate final Stringpathprivate final Stringqueryprivate final Stringfragmentpublic final static Did.ParserParser
-
Method Summary
Modifier and Type Method Description final StringgetUri()represents the complete Decentralized Identifier (DID) URI. final StringgetUrl()represents the DID URI + A network location identifier for a specific resource Spec: https://www.w3. final StringgetMethod()specifies the DID method in the URI, which indicates the underlying method-specific identifier scheme (e.g., jwk, dht, key, etc.). final StringgetId()is the method-specific identifier in the DID URI. final Map<String, String>getParams()is a map containing optional parameters present in the DID URI. final StringgetPath()is an optional path component in the DID URI. final StringgetQuery()is an optional query component in the DID URI, used to express a request for a specific representation or resource related to the DID. final StringgetFragment()is an optional fragment component in the DID URI, used to reference a specific part of a DID document. StringtoString()final ByteArraymarshalText()Marshal text into byteArray. final DidunmarshalText(ByteArray byteArray)Unmarshal byteArray into a DID. -
-
Method Detail
-
getUri
final String getUri()
represents the complete Decentralized Identifier (DID) URI. Spec: https://www.w3.org/TR/did-core/#did-syntax
-
getUrl
final String getUrl()
represents the DID URI + A network location identifier for a specific resource Spec: https://www.w3.org/TR/did-core/#did-url-syntax
-
getMethod
final String getMethod()
specifies the DID method in the URI, which indicates the underlying method-specific identifier scheme (e.g., jwk, dht, key, etc.). Spec: https://www.w3.org/TR/did-core/#method-schemes
-
getId
final String getId()
is the method-specific identifier in the DID URI. Spec: https://www.w3.org/TR/did-core/#method-specific-id
-
getParams
final Map<String, String> getParams()
is a map containing optional parameters present in the DID URI. These parameters are method-specific. Spec: https://www.w3.org/TR/did-core/#did-parameters
-
getPath
final String getPath()
is an optional path component in the DID URI. Spec: https://www.w3.org/TR/did-core/#path
-
getQuery
final String getQuery()
is an optional query component in the DID URI, used to express a request for a specific representation or resource related to the DID. Spec: https://www.w3.org/TR/did-core/#query
-
getFragment
final String getFragment()
is an optional fragment component in the DID URI, used to reference a specific part of a DID document. Spec: https://www.w3.org/TR/did-core/#fragment
-
marshalText
final ByteArray marshalText()
Marshal text into byteArray.
- Returns:
ByteArray of the DID object
-
unmarshalText
final Did unmarshalText(ByteArray byteArray)
Unmarshal byteArray into a DID.
- Returns:
DID object
-
-
-
-