public interface FedoraBinary extends FedoraResource
Modifier and Type | Method and Description |
---|---|
Collection<URI> |
checkFixity(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator,
Collection<String> algorithms)
Digest this datastream with the digest algorithms provided
|
InputStream |
getContent() |
URI |
getContentDigest()
Get the pre-calculated content digest for the binary payload
|
long |
getContentSize() |
String |
getFilename()
Return the file name for the binary content
|
RdfStream |
getFixity(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator)
Get the fixity of this datastream compared to metadata stored in the repository
|
RdfStream |
getFixity(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator,
URI contentDigest,
long size)
Get the fixity of this datastream in a given repository's binary store.
|
String |
getMimeType() |
String |
getProxyURL()
Get the URL that this resource is a Proxy for
|
default URI |
getRedirectURI()
Get URL as a URI
|
String |
getRedirectURL()
Get the URL this resource should redirect to
|
Boolean |
isProxy() |
Boolean |
isRedirect() |
void |
setContent(InputStream content,
String contentType,
Collection<URI> checksums,
String originalFileName,
StoragePolicyDecisionPoint storagePolicyDecisionPoint)
Sets the content of this Datastream.
|
void |
setExternalContent(String contentType,
Collection<URI> checksums,
String originalFileName,
String externalHandling,
String externalUrl)
Sets the external content reference for this datastream
|
void |
setProxyURL(String url)
Set the URL that this resource is a proxy for
|
void |
setRedirectURL(String url)
Set the URL that this is a redirect to
|
addType, delete, findMementoByDatetime, findOrCreateAcl, getAcl, getChild, getChildren, getChildren, getContainer, getCreatedDate, getDescribedResource, getDescription, getEtagValue, getLastModifiedDate, getMementoDatetime, getOriginalResource, getPath, getTimeMap, getTriples, getTriples, getTypes, hasProperty, hasType, isAcl, isMemento, isNew, isOriginalResource, replaceProperties, updateProperties
InputStream getContent()
void setContent(InputStream content, String contentType, Collection<URI> checksums, String originalFileName, StoragePolicyDecisionPoint storagePolicyDecisionPoint) throws InvalidChecksumException
content
- InputStream of binary content to be storedcontentType
- MIME type of content (optional)checksums
- Collection of checksum URIs of the content (optional)originalFileName
- Original file name of the content (optional)storagePolicyDecisionPoint
- Policy decision point for storing the content (optional)InvalidChecksumException
- if invalid checksum exception occurredvoid setExternalContent(String contentType, Collection<URI> checksums, String originalFileName, String externalHandling, String externalUrl) throws InvalidChecksumException
contentType
- MIME type of content (optional)checksums
- Collection of checksum URIs of the content (optional)originalFileName
- Original file name of the content (optional)externalHandling
- What type of handling the external resource needs (proxy or redirect)externalUrl
- Url for the external resourcejInvalidChecksumException
- if invalid checksum exception occurredlong getContentSize()
URI getContentDigest()
Boolean isRedirect()
String getProxyURL()
void setProxyURL(String url)
url
- - the url of the resource this is a proxy forString getRedirectURL()
default URI getRedirectURI()
void setRedirectURL(String url)
url
- - the url of the resource this redirects toString getMimeType()
String getFilename()
RdfStream getFixity(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator)
idTranslator
- the id translatorRdfStream getFixity(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator, URI contentDigest, long size)
idTranslator
- the id translatorcontentDigest
- the checksum to compare againstsize
- the expected size of the binaryCollection<URI> checkFixity(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator, Collection<String> algorithms) throws UnsupportedAlgorithmException
idTranslator
- the id translatoralgorithms
- the digest algorithms to be usedUnsupportedAlgorithmException
- if unsupported digest algorithm occurredCopyright © 2013–2019 DuraSpace, Inc.. All rights reserved.