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.Operation, org.modeshape.jcr.api.JcrTools.PrintNodes, org.modeshape.jcr.api.JcrTools.VariableDEFAULT_SUBJECT_FACTORY, nodeCONTENT_DIGEST, CONTENT_SIZE, FCR_CONTENT, FEDORA_BINARY, FEDORA_DATASTREAM, FEDORA_OBJECT, FEDORA_RESOURCE, JCR_CREATED, JCR_CREATEDBY, JCR_LASTMODIFIED, 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 |
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,
PolicyDecisionPoint storagePolicyDecisionPoint)
Sets the content of this Datastream.
|
addVersionLabel, getCreatedDate, getDatasetProblems, getLastModifiedDate, getModels, getNode, getPath, getPropertiesDataset, getPropertiesDataset, getPropertiesDataset, getVersionDataset, getVersionDataset, hasContent, isNew, updatePropertiesDataset, updatePropertiesDatasetfindOrCreateChild, findOrCreateChild, findOrCreateNode, findOrCreateNode, findOrCreateNode, findOrCreateNode, getNode, getReadable, getStringValue, importContent, importContent, importContent, importContent, importContent, importContent, importContent, isDebug, 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 objectjavax.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, PolicyDecisionPoint storagePolicyDecisionPoint) throws javax.jcr.RepositoryException, InvalidChecksumException
content - javax.jcr.RepositoryExceptionInvalidChecksumExceptionpublic void setContent(InputStream content) throws InvalidChecksumException, javax.jcr.RepositoryException
content - InvalidChecksumExceptionjavax.jcr.RepositoryExceptionpublic long getContentSize()
javax.jcr.RepositoryExceptionpublic 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 static boolean hasMixin(javax.jcr.Node node)
throws javax.jcr.RepositoryException
node - javax.jcr.RepositoryExceptionCopyright © 2013 DuraSpace, Inc.. All Rights Reserved.