public class ARK extends StandardNumber implements java.lang.Cloneable, java.lang.Comparable<ARK>
ARK Archival Resource Key.
An ARK is a Uniform Resource Locator (URL) that is a multi-purpose identifier for information objects of any type. An ARK contains the label ark: after the hostname, an URL request terminated by '?' returns a brief metadata record, and an URL request terminated by '??' returns metadata that includes a commitment statement from the current service provider.
The ARK and its inflections ('?' and '??') gain access to three facets of a provider’s ability to provide persistence.
Implicit in the design of the ARK scheme is that persistence is purely a matter of service and not a property of a naming syntax.
See ARK IETF RFC, 10 years ARK
type, value
Constructor and Description |
---|
ARK() |
Modifier and Type | Method and Description |
---|---|
java.net.URI |
asURI() |
java.lang.Object |
clone()
Returns a clone if the implementation is cloneable.
|
int |
compareTo(ARK ark) |
ARK |
createChecksum(boolean checksum)
Indicate that a correct check sum should be computed.
|
boolean |
equals(java.lang.Object object) |
java.lang.String |
format()
Return a formatted value of this standard number
This is best for human-readable representation, but is
not necessarily a format for computation.
|
static StandardNumber |
getInstance(java.lang.Package thePackage,
java.lang.ClassLoader classLoader,
java.lang.String type) |
static StandardNumber |
getInstance(java.lang.String type) |
java.util.Collection<java.lang.String> |
getTypedVariants() |
int |
hashCode() |
boolean |
isValid()
Check this number for validity.
|
ARK |
normalize()
Normalize the value by removing all unwanted characters or
replacing characters with the ones required for verification.
|
java.lang.String |
normalizedValue()
Return normalized value of this standard number.
|
ARK |
reset() |
ARK |
set(java.lang.CharSequence value)
Set the input value of this standard number.
|
ARK |
verify()
No verification.
|
type
public ARK set(java.lang.CharSequence value)
StandardNumber
Set the input value of this standard number. The input must be normalized and verified before being accepted as valid.
set
in class StandardNumber
value
- the raw input valuepublic ARK createChecksum(boolean checksum)
StandardNumber
Indicate that a correct check sum should be computed.
createChecksum
in class StandardNumber
checksum
- if checksum is includedpublic ARK normalize()
StandardNumber
Normalize the value by removing all unwanted characters or replacing characters with the ones required for verification.
normalize
in class StandardNumber
public boolean isValid()
StandardNumber
Check this number for validity.
isValid
in class StandardNumber
public ARK verify()
No verification.
verify
in class StandardNumber
public java.lang.String normalizedValue()
StandardNumber
Return normalized value of this standard number. In most cases, this is also the canonical form of the standard number. This is a representation without unneccessary characters, useful for computation purposes, like comparing for equivalence.
normalizedValue
in class StandardNumber
public java.lang.String format()
StandardNumber
Return a formatted value of this standard number This is best for human-readable representation, but is not necessarily a format for computation.
format
in class StandardNumber
public java.net.URI asURI()
public ARK reset()
reset
in class StandardNumber
public java.util.Collection<java.lang.String> getTypedVariants()
getTypedVariants
in class StandardNumber
public int compareTo(ARK ark)
compareTo
in interface java.lang.Comparable<ARK>
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
- if this is called on an
implementation that does not support `Cloneable`public static StandardNumber getInstance(java.lang.String type) throws NoSuchStandardNumberException
NoSuchStandardNumberException
public static StandardNumber getInstance(java.lang.Package thePackage, java.lang.ClassLoader classLoader, java.lang.String type) throws NoSuchStandardNumberException
NoSuchStandardNumberException