public class Datastream extends FedoraResource implements FedoraJcrTypes
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, FCR_CONTENT, FEDORA_BINARY, FEDORA_DATASTREAM, FEDORA_OBJECT, FEDORA_RESOURCE, FROZEN_MIXIN_TYPES, FROZEN_NODE, JCR_CREATED, JCR_CREATEDBY, JCR_LASTMODIFIED, PREMIS_FILE_NAME, ROOT| Constructor and Description |
|---|
Datastream(javax.jcr.Node n)
The JCR node for this datastream
|
Datastream(javax.jcr.Session session,
String path)
Create or find a FedoraDatastream at the given path
|
Datastream(javax.jcr.Session session,
String path,
String nodeType)
Create or find a FedoraDatastream at the given path
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getContent() |
URI |
getContentDigest()
Get the pre-calculated content digest for the binary payload
|
long |
getContentSize() |
String |
getDsId() |
String |
getFilename()
Return the file name for the binary content
|
String |
getMimeType() |
FedoraObject |
getObject() |
long |
getSize()
Return the calculated size of the DS node
|
static boolean |
hasMixin(javax.jcr.Node node)
Check if the node has a fedora:datastream mixin
|
void |
setContent(InputStream content)
Set the content of this datastream
|
void |
setContent(InputStream content,
String contentType,
URI checksum,
String originalFileName,
StoragePolicyDecisionPoint storagePolicyDecisionPoint)
Sets the content of this Datastream.
|
addVersionLabel, getCreatedDate, getEtagValue, getHierarchyTriples, getLastModifiedDate, getModels, getNode, getPath, getPropertiesDataset, getPropertiesDataset, getTriples, getVersionTriples, hasContent, isFrozen, isNew, replaceProperties, updatePropertiesDatasetfindOrCreateChild, 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, uploadFile, uploadFile, uploadFile, uploadFileAndBlock, uploadFileAndBlock, uploadFileAndBlock, uploadFilesAndBlock, var, vars, withSessionpublic Datastream(javax.jcr.Node n)
n - an existing Nodepublic Datastream(javax.jcr.Session session,
String path,
String nodeType)
throws javax.jcr.RepositoryException
session - the JCR session to use to retrieve the objectpath - the absolute path to the objectnodeType - primary type to assign to nodejavax.jcr.RepositoryExceptionpublic Datastream(javax.jcr.Session session,
String path)
throws javax.jcr.RepositoryException
session - the JCR session to use to retrieve the objectpath - the absolute path to the objectjavax.jcr.RepositoryExceptionpublic InputStream getContent() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void setContent(InputStream content, String contentType, URI checksum, String originalFileName, StoragePolicyDecisionPoint storagePolicyDecisionPoint) throws javax.jcr.RepositoryException, InvalidChecksumException
content - 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)javax.jcr.RepositoryExceptionInvalidChecksumExceptionpublic void setContent(InputStream content) throws InvalidChecksumException, javax.jcr.RepositoryException
content - Binary content to be storedInvalidChecksumExceptionjavax.jcr.RepositoryExceptionpublic long getContentSize()
public URI getContentDigest() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic String getDsId() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic FedoraObject getObject() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic String getMimeType() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic long getSize()
throws javax.jcr.RepositoryException
getSize in class FedoraResourcejavax.jcr.RepositoryExceptionpublic String getFilename() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic static boolean hasMixin(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - node to checkjavax.jcr.RepositoryExceptionCopyright © 2013 DuraSpace, Inc.. All Rights Reserved.