Package edu.ucsb.nceas.metacat.storage
Record Class ObjectInfo
java.lang.Object
java.lang.Record
edu.ucsb.nceas.metacat.storage.ObjectInfo
public record ObjectInfo(String pid, String cid, long size, Map<String,String> hexDigests)
extends Record
This is the Metacat version of the ObjectMetadata of Hashstore
ObjectMetadata is a class that models a unique identifier for an object in the HashStore. It
encapsulates information about a file's authority-based/persistent identifier (pid), content
identifier (cid), size, and associated hash digest values. By using ObjectMetadata objects,
client code can easily obtain metadata of a store object in HashStore without needing to know the
underlying file system details.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncid()
Returns the value of thecid
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of thehexDigests
record component.pid()
Returns the value of thepid
record component.long
size()
Returns the value of thesize
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ObjectInfo
Creates an instance of aObjectInfo
record class.- Parameters:
pid
- the value for thepid
record componentcid
- the value for thecid
record componentsize
- the value for thesize
record componenthexDigests
- the value for thehexDigests
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
pid
Returns the value of thepid
record component.- Returns:
- the value of the
pid
record component
-
cid
Returns the value of thecid
record component.- Returns:
- the value of the
cid
record component
-
size
public long size()Returns the value of thesize
record component.- Returns:
- the value of the
size
record component
-
hexDigests
Returns the value of thehexDigests
record component.- Returns:
- the value of the
hexDigests
record component
-