public class FixityResultImpl extends Object implements FixityResult
FixityResult.FixityState
Constructor and Description |
---|
FixityResultImpl(long size,
URI checksum)
Prepare a fixity result given the computed checksum and size
|
FixityResultImpl(String storeIdentifier,
long size,
URI checksum) |
FixityResultImpl(String storeIdentifier,
long size,
URI checksum,
String algorithm) |
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
|
String |
getUsedAlgorithm() |
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(String storeIdentifier, long size, URI checksum)
storeIdentifier
- the store identifiersize
- the sizechecksum
- the checksumpublic FixityResultImpl(String storeIdentifier, long size, URI checksum, String algorithm)
storeIdentifier
- the store identifiersize
- the sizechecksum
- the checksumalgorithm
- the algorithm used to calculate 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
public String getUsedAlgorithm()
getUsedAlgorithm
in interface FixityResult
Copyright © 2013–2017 DuraSpace, Inc.. All rights reserved.