public class FedoraBinaryImpl extends FedoraResourceImpl implements FedoraBinary
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.VariablenodeCONTENT_DIGEST, CONTENT_SIZE, EXPOSED_PROTECTED_JCR_TYPES, FCR_METADATA, FCR_VERSIONS, FEDORA_BINARY, FEDORA_BLANKNODE, FEDORA_CONTAINER, FEDORA_NON_RDF_SOURCE_DESCRIPTION, FEDORA_PAIRTREE, FEDORA_RESOURCE, FEDORA_TOMBSTONE, FROZEN_MIXIN_TYPES, FROZEN_NODE, JCR_CREATED, JCR_CREATEDBY, JCR_FROZEN_NODE, JCR_LASTMODIFIED, JCR_MIXIN_TYPES, JCR_PRIMARY_TYPE, JCR_UUID, LDP_BASIC_CONTAINER, LDP_DIRECT_CONTAINER, LDP_HAS_MEMBER_RELATION, LDP_INDIRECT_CONTAINER, LDP_INSERTED_CONTENT_RELATION, LDP_IS_MEMBER_OF_RELATION, LDP_MEMBER_RESOURCE, PREMIS_FILE_NAME, ROOT, VERSIONABLE| Constructor and Description |
|---|
FedoraBinaryImpl(javax.jcr.Node node)
Wrap an existing Node as a Fedora Binary
|
| Modifier and Type | Method and Description |
|---|---|
void |
addVersionLabel(String label)
Tag the current version of the Node with a version label that
can be retrieved by name later.
|
void |
delete()
When deleting the binary, we also need to clean up the description document.
|
void |
disableVersioning()
Disable versioning
|
void |
enableVersioning()
Enable versioning
|
javax.jcr.Binary |
getBinaryContent() |
InputStream |
getContent() |
URI |
getContentDigest()
Get the pre-calculated content digest for the binary payload
|
long |
getContentSize() |
NonRdfSourceDescription |
getDescription()
Get the description for this binary
|
String |
getFilename()
Return the file name for the binary content
|
RdfStream |
getFixity(IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> idTranslator)
Get the fixity of this datastream compared to metadata stored in the repository
|
RdfStream |
getFixity(IdentifierConverter<com.hp.hpl.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() |
javax.jcr.version.VersionHistory |
getVersionHistory()
Get JCR VersionHistory for the node.
|
static boolean |
hasMixin(javax.jcr.Node node)
Check if the given node is a Fedora binary
|
boolean |
isVersioned()
Check if a resource is versioned
|
void |
setContent(InputStream content,
String contentType,
URI checksum,
String originalFileName,
StoragePolicyDecisionPoint storagePolicyDecisionPoint)
Sets the content of this Datastream.
|
equals, getBaseVersion, getChild, getChildren, getContainer, getCreatedDate, getEtagValue, getLastModifiedDate, getNode, getNodeVersion, getPath, getProperty, getSession, getTriples, getTriples, getUnfrozenResource, getVersionedAncestor, hashCode, hasProperty, hasType, isFrozenResource, isNew, replaceProperties, toString, updatePropertiesfindOrCreateChild, 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, withSessionclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetBaseVersion, getChild, getChildren, getContainer, getCreatedDate, getEtagValue, getLastModifiedDate, getNode, getNodeVersion, getPath, getProperty, getTriples, getTriples, getUnfrozenResource, getVersionedAncestor, hasProperty, hasType, isFrozenResource, isNew, replaceProperties, updatePropertiespublic FedoraBinaryImpl(javax.jcr.Node node)
node - public NonRdfSourceDescription getDescription()
NonRdfSourcegetDescription in interface NonRdfSourcepublic InputStream getContent()
getContent in interface FedoraBinarypublic javax.jcr.Binary getBinaryContent()
getBinaryContent in interface FedoraBinarypublic void setContent(InputStream content, String contentType, URI checksum, String originalFileName, StoragePolicyDecisionPoint storagePolicyDecisionPoint) throws InvalidChecksumException
FedoraBinarysetContent in interface FedoraBinarycontent - InputStream of binary content to be storedcontentType - MIME type of content (optional)checksum - Checksum URI of the content (optional)originalFileName - Original file name of the content (optional)storagePolicyDecisionPoint - Policy decision point for storing the content (optional)InvalidChecksumExceptionpublic long getContentSize()
getContentSize in interface FedoraBinarypublic URI getContentDigest()
FedoraBinarygetContentDigest in interface FedoraBinarypublic String getMimeType()
getMimeType in interface FedoraBinarypublic String getFilename()
FedoraBinarygetFilename in interface FedoraBinarypublic RdfStream getFixity(IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> idTranslator)
FedoraBinarygetFixity in interface FedoraBinarypublic RdfStream getFixity(IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> idTranslator, URI digestUri, long size)
FedoraBinarygetFixity in interface FedoraBinarydigestUri - the checksum to compare againstsize - the expected size of the binarypublic void delete()
delete in interface FedoraResourcedelete in class FedoraResourceImplpublic void addVersionLabel(String label)
FedoraResourceaddVersionLabel in interface FedoraResourceaddVersionLabel in class FedoraResourceImplpublic javax.jcr.version.VersionHistory getVersionHistory()
FedoraResourcegetVersionHistory in interface FedoraResourcegetVersionHistory in class FedoraResourceImplpublic boolean isVersioned()
FedoraResourceisVersioned in interface FedoraResourceisVersioned in class FedoraResourceImplpublic void enableVersioning()
FedoraResourceenableVersioning in interface FedoraResourceenableVersioning in class FedoraResourceImplpublic void disableVersioning()
FedoraResourcedisableVersioning in interface FedoraResourcedisableVersioning in class FedoraResourceImplpublic static boolean hasMixin(javax.jcr.Node node)
node - Copyright © 2013-2014 DuraSpace, Inc.. All Rights Reserved.