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.Variable
node
CONTENT_DIGEST, CONTENT_SIZE, DEFAULT_DIGEST_ALGORITHM, 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_TOMBSTONE, 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
Constructor and Description |
---|
FedoraBinaryImpl(javax.jcr.Node node)
Wrap an existing Node as a Fedora Binary
|
Modifier and Type | Method and Description |
---|---|
void |
delete()
When deleting the binary, we also need to clean up the description document.
|
void |
disableVersioning()
Disable versioning
|
void |
enableVersioning()
Enable versioning
|
FedoraResource |
getBaseVersion()
Get the base version for the node
|
InputStream |
getContent() |
URI |
getContentDigest()
Get the pre-calculated content digest for the binary payload
|
long |
getContentSize() |
FedoraResource |
getDescription()
Get the description for this resource
|
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 digestUri,
long size)
Get the fixity of this datastream in a given repository's binary store.
|
String |
getMimeType() |
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,
Collection<URI> checksums,
String originalFileName,
StoragePolicyDecisionPoint storagePolicyDecisionPoint)
Sets the content of this Datastream.
|
equals, fixDatesIfNecessary, getChild, getChildren, getContainer, getCreatedDate, getDescribedResource, getEtagValue, getLastModifiedDate, getNode, getPath, getProperty, getSession, getTriples, getTriples, getTypes, getUnfrozenResource, getVersion, getVersionedAncestor, getVersionLabelOfFrozenResource, getVersionManager, getVersions, hashCode, hasProperty, hasType, isFrozenResource, isNew, 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
getChild, getChildren, getChildren, getContainer, getCreatedDate, getDescribedResource, getEtagValue, getLastModifiedDate, getPath, getTriples, getTriples, getTypes, getUnfrozenResource, getVersion, getVersionedAncestor, getVersionLabelOfFrozenResource, getVersions, hasProperty, hasType, isFrozenResource, isNew, replaceProperties, updateProperties
public FedoraBinaryImpl(javax.jcr.Node node)
node
- the nodepublic FedoraResource getDescription()
FedoraResource
getDescription
in interface FedoraResource
getDescription
in class FedoraResourceImpl
public InputStream getContent()
getContent
in interface FedoraBinary
public void setContent(InputStream content, String contentType, Collection<URI> checksums, String originalFileName, StoragePolicyDecisionPoint storagePolicyDecisionPoint) throws InvalidChecksumException
FedoraBinary
setContent
in interface 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 long getContentSize()
getContentSize
in interface FedoraBinary
public URI getContentDigest()
FedoraBinary
getContentDigest
in interface FedoraBinary
public String getMimeType()
getMimeType
in interface FedoraBinary
public String getFilename()
FedoraBinary
getFilename
in interface FedoraBinary
public RdfStream getFixity(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator)
FedoraBinary
getFixity
in interface FedoraBinary
idTranslator
- the id translatorpublic RdfStream getFixity(IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource> idTranslator, URI digestUri, long size)
FedoraBinary
getFixity
in interface FedoraBinary
idTranslator
- the id translatordigestUri
- the checksum to compare againstsize
- the expected size of the binarypublic void delete()
delete
in interface FedoraResource
delete
in class FedoraResourceImpl
public FedoraResource getBaseVersion()
FedoraResource
getBaseVersion
in interface FedoraResource
getBaseVersion
in class FedoraResourceImpl
public boolean isVersioned()
FedoraResource
isVersioned
in interface FedoraResource
isVersioned
in class FedoraResourceImpl
public void enableVersioning()
FedoraResource
enableVersioning
in interface FedoraResource
enableVersioning
in class FedoraResourceImpl
public void disableVersioning()
FedoraResource
disableVersioning
in interface FedoraResource
disableVersioning
in class FedoraResourceImpl
public static boolean hasMixin(javax.jcr.Node node)
node
- the given nodeCopyright © 2013–2018 DuraSpace, Inc.. All rights reserved.