public class InternalFedoraBinary extends AbstractFedoraBinary
FedoraResourceImpl.RdfGenerator
org.modeshape.jcr.api.JcrTools.BasicOperation, org.modeshape.jcr.api.JcrTools.BrowseContent, org.modeshape.jcr.api.JcrTools.CountNodes, org.modeshape.jcr.api.JcrTools.NodeOperation, org.modeshape.jcr.api.JcrTools.Operation, org.modeshape.jcr.api.JcrTools.PrintNodes, org.modeshape.jcr.api.JcrTools.Variable
DEFAULT_MIME_TYPE
CONTAINER_WEBAC_ACL, contextMap, node
CONTENT_DIGEST, CONTENT_SIZE, DEFAULT_DIGEST_ALGORITHM, FCR_ACL, FCR_FIXITY, FCR_METADATA, FCR_VERSIONS, FEDORA_BINARY, FEDORA_CONTAINER, FEDORA_CREATED, FEDORA_CREATEDBY, FEDORA_LASTMODIFIED, FEDORA_LASTMODIFIEDBY, FEDORA_NON_RDF_SOURCE_DESCRIPTION, FEDORA_PAIRTREE, FEDORA_REPOSITORY_ROOT, FEDORA_RESOURCE, FEDORA_SKOLEM, FEDORA_TIME_MAP, FEDORA_TOMBSTONE, FEDORA_WEBAC_ACL, FILENAME, HAS_MIME_TYPE, LDP_BASIC_CONTAINER, LDP_CONTAINER, LDP_DIRECT_CONTAINER, LDP_HAS_MEMBER_RELATION, LDP_INDIRECT_CONTAINER, LDP_INSERTED_CONTENT_RELATION, LDP_IS_MEMBER_OF_RELATION, LDP_MEMBER_RESOURCE, LDP_NON_RDF_SOURCE, LDP_RDF_SOURCE, MEMENTO, MEMENTO_DATETIME, MEMENTO_ORIGINAL, PROXY_FOR, REDIRECTS_TO
Constructor and Description |
---|
InternalFedoraBinary(javax.jcr.Node node)
Construct InternalFedoraBinary
|
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() |
RdfStream |
getFixity(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator,
URI digestUri,
long size)
Get the fixity of this datastream in a given repository's binary store.
|
String |
getMimeType() |
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
|
delete, getContentDigest, getContentSize, getDescription, getDescriptionNode, getDescriptionNodeOrNull, getFilename, getFixity, getMimeTypeValue, getProxyURL, getRedirectURL, hasDescriptionProperty, setContentSize, setProxyURL, setRedirectURL
addType, convertMementoReferences, equals, findMementoByDatetime, findOrCreateAcl, fixDatesIfNecessary, getAcl, getChild, getChildren, getContainer, getCreatedDate, getDescribedResource, getEtagValue, getLastModifiedDate, getMementoDatetime, getNode, getOriginalResource, getPath, getProperty, getSession, getTimeMap, getTriples, getTriples, getTypes, hashCode, hasProperty, hasType, isAcl, isMemento, isNew, isOriginalResource, removeReferences, replaceProperties, toString, touch, updateProperties
findOrCreateChild, findOrCreateChild, findOrCreateNode, findOrCreateNode, findOrCreateNode, findOrCreateNode, getNode, getReadable, getStringValue, importContent, importContent, importContent, importContent, importContent, importContent, importContent, isDebug, onEachNode, onEachNodeBelow, print, printNode, printQuery, printQuery, printQuery, printQuery, printSubgraph, printSubgraph, printSubgraph, registerNodeTypes, removeAllChildren, removeAllChildren, repeatedlyWithSession, resourceUrl, setDebug, uploadFile, uploadFile, uploadFile, uploadFileAndBlock, uploadFileAndBlock, uploadFileAndBlock, uploadFilesAndBlock, var, vars, withSession
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getRedirectURI
addType, findMementoByDatetime, findOrCreateAcl, getAcl, getChild, getChildren, getChildren, getContainer, getCreatedDate, getDescribedResource, getEtagValue, getLastModifiedDate, getMementoDatetime, getOriginalResource, getPath, getTimeMap, getTriples, getTriples, getTypes, hasProperty, hasType, isAcl, isMemento, isNew, isOriginalResource, replaceProperties, updateProperties
public InternalFedoraBinary(javax.jcr.Node node)
node
- nodepublic InputStream getContent()
public void setExternalContent(String contentType, Collection<URI> checksums, String originalFileName, String externalHandling, String externalUrl)
FedoraBinary
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 resourcejpublic void setContent(InputStream content, String contentType, Collection<URI> checksums, String originalFileName, StoragePolicyDecisionPoint storagePolicyDecisionPoint) throws InvalidChecksumException
FedoraBinary
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 occurredpublic String getMimeType()
public RdfStream getFixity(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator, URI digestUri, long size)
FedoraBinary
idTranslator
- the id translatordigestUri
- the checksum to compare againstsize
- the expected size of the binarypublic Collection<URI> checkFixity(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator, Collection<String> algorithms) throws UnsupportedAlgorithmException
FedoraBinary
idTranslator
- the id translatoralgorithms
- the digest algorithms to be usedUnsupportedAlgorithmException
- if unsupported digest algorithm occurredpublic Boolean isRedirect()
isRedirect
in interface FedoraBinary
isRedirect
in class AbstractFedoraBinary
public Boolean isProxy()
isProxy
in interface FedoraBinary
isProxy
in class AbstractFedoraBinary
Copyright © 2013–2019 DuraSpace, Inc.. All rights reserved.