Record Class Identifier
java.lang.Object
java.lang.Record
is.galia.image.Identifier
- Record Components:
value
- Value.
- All Implemented Interfaces:
Comparable<Identifier>
Immutable application-unique source image file/object identifier.
This may be one component of a MetaIdentifier
, which may include
additional information, such as a page number.
Input
When identifiers are supplied to the application via URIs, they must go through some processing steps before they can be used (order is important):
- URI decoding
slash decoding
(fromURI(String)
will handle all of
this.)
Output
The input steps must be reversed for output. Note that requests can
supply a AbstractResource.PUBLIC_IDENTIFIER_HEADER
to suggest that the identifier supplied in a URI is different from the one
the user agent is seeing and supplying to a reverse proxy.
So, the steps for output are:
- Replace the URI identifier with the one from
AbstractResource.PUBLIC_IDENTIFIER_HEADER
, if present - Encode slashes
- URI encoding
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(Identifier identifier) final boolean
Indicates whether some other object is "equal to" this one.static Identifier
Translates the string in a raw URI path component or query into a new instance.final int
hashCode()
Returns a hash code value for this object.toString()
Returns a string representation of this record class.value()
Returns the value of thevalue
record component.
-
Constructor Details
-
Identifier
-
-
Method Details
-
fromURI
Translates the string in a raw URI path component or query into a new instance.- Parameters:
uriValue
- Raw URI path component or query.- See Also:
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Identifier>
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
value
-