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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncid()Returns the value of thecidrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thehexDigestsrecord component.pid()Returns the value of thepidrecord component.longsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ObjectInfo
Creates an instance of aObjectInforecord class.- Parameters:
pid- the value for thepidrecord componentcid- the value for thecidrecord componentsize- the value for thesizerecord componenthexDigests- the value for thehexDigestsrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
pid
Returns the value of thepidrecord component.- Returns:
- the value of the
pidrecord component
-
cid
Returns the value of thecidrecord component.- Returns:
- the value of the
cidrecord component
-
size
public long size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
hexDigests
-