public class FixityResultImpl extends Object implements FixityResult
FixityResult.FixityState
Constructor and Description |
---|
FixityResultImpl(CacheEntry entry,
long size,
URI checksum)
Prepare a fixity result with the expected size and checksum
|
FixityResultImpl(long size,
URI checksum)
Prepare a fixity result given the computed checksum and size
|
FixityResultImpl(String storeIdentifier,
long size,
URI checksum) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
URI |
getComputedChecksum() |
long |
getComputedSize() |
Set<FixityResult.FixityState> |
getStatus(long size,
URI checksum) |
String |
getStoreIdentifier()
Get the identifier for the entry's store
|
int |
hashCode() |
boolean |
matches(long size)
Check if the fixity result matches the given size
|
boolean |
matches(long size,
URI checksum)
Does the fixity entry match the given size and checksum?
|
boolean |
matches(URI checksum)
Check if the fixity result matches the given checksum URI
|
String |
toString() |
public FixityResultImpl(long size, URI checksum)
size
- the given sizechecksum
- the given checksumpublic FixityResultImpl(CacheEntry entry, long size, URI checksum)
entry
- the entrysize
- the expected sizechecksum
- the checksumpublic FixityResultImpl(String storeIdentifier, long size, URI checksum)
storeIdentifier
- the store identifiersize
- the sizechecksum
- the checksumpublic String getStoreIdentifier()
getStoreIdentifier
in interface FixityResult
public boolean matches(URI checksum)
matches
in interface FixityResult
checksum
- the checksum uripublic boolean matches(long size)
matches
in interface FixityResult
size
- the sizepublic boolean matches(long size, URI checksum)
matches
in interface FixityResult
size
- bitstream size in byteschecksum
- checksum URI in the form urn:DIGEST:RESULTpublic Set<FixityResult.FixityState> getStatus(long size, URI checksum)
getStatus
in interface FixityResult
size
- the sizechecksum
- the checksum uripublic long getComputedSize()
getComputedSize
in interface FixityResult
public URI getComputedChecksum()
getComputedChecksum
in interface FixityResult
Copyright © 2013–2016 DuraSpace, Inc.. All rights reserved.