Skip to content

Commit

Permalink
Cleanup 'ObjectMetadata' class
Browse files Browse the repository at this point in the history
  • Loading branch information
doulikecookiedough committed Aug 13, 2024
1 parent 906ea73 commit ce07581
Showing 1 changed file with 3 additions and 71 deletions.
74 changes: 3 additions & 71 deletions src/main/java/org/dataone/hashstore/ObjectMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,78 +3,10 @@
import java.util.Map;

/**
* ObjectMetadata is a class that models a unique identifier for an object in the HashStore. It
* ObjectMetadata is a record that that contains metadata about 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.
* identifier (cid), size, and associated hash digest values.
*/
public record ObjectMetadata(String pid, String cid, long size, Map<String, String> hexDigests) {

}
// TODO Delete unused code
//public class ObjectMetadata {
// private String pid;
// private final String cid;
// private final long size;
// private final Map<String, String> hexDigests;
//
// /**
// * Creates a new instance of ObjectMetadata with the given properties.
// *
// * @param pid Authority based or persistent identifer, null by default
// * @param cid Unique identifier for the file
// * @param size Size of stored file
// * @param hexDigests A map of hash algorithm names to their hex-encoded digest values for the
// * file
// */
// public ObjectMetadata(String pid, String cid, long size, Map<String, String> hexDigests) {
// this.pid = pid;
// this.cid = cid;
// this.size = size;
// this.hexDigests = hexDigests;
// }
//
// /**
// * Get the persistent identifier
// *
// * @return pid
// */
// public String getPid() {
// return pid;
// }
//
// /**
// * Set the persistent identifier
// */
// public void setPid(String pid) {
// this.pid = pid;
// }
//
// /**
// * Return the cid (content identifier)
// *
// * @return cid
// */
// public String getCid() {
// return cid;
// }
//
// /**
// * Return the size
// *
// * @return size
// */
// public long getSize() {
// return size;
// }
//
// /**
// * Return a map of hex digests (checksums)
// *
// * @return hexDigests
// */
// public Map<String, String> getHexDigests() {
// return hexDigests;
// }
//}
}

0 comments on commit ce07581

Please sign in to comment.