@Component public class DatastreamServiceImpl extends AbstractService implements org.fcrepo.kernel.services.DatastreamService
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.Variablerepo| Constructor and Description |
|---|
DatastreamServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
org.fcrepo.kernel.Datastream |
asDatastream(javax.jcr.Node node)
Retrieve a Datastream instance by pid and dsid
|
org.fcrepo.kernel.Datastream |
createDatastream(javax.jcr.Session session,
String dsPath)
Create a stub datastream without content
|
org.fcrepo.kernel.Datastream |
createDatastream(javax.jcr.Session session,
String dsPath,
String contentType,
String originalFileName,
InputStream requestBodyStream)
Create a new Datastream node in the JCR store
|
org.fcrepo.kernel.Datastream |
createDatastream(javax.jcr.Session session,
String dsPath,
String contentType,
String originalFileName,
InputStream requestBodyStream,
URI checksum)
Create a new Datastream node in the JCR store
|
org.fcrepo.kernel.Datastream |
getDatastream(javax.jcr.Session session,
String path)
Retrieve a Datastream instance by pid and dsid
|
javax.jcr.Node |
getDatastreamNode(javax.jcr.Session session,
String path)
Retrieve the JCR node for a Datastream by pid and dsid
|
Collection<org.fcrepo.kernel.utils.FixityResult> |
getFixity(javax.jcr.Node resource,
URI dsChecksum,
long dsSize)
Get the fixity results for this datastream's bitstream, and compare it
against the given checksum and size.
|
org.fcrepo.kernel.utils.iterators.RdfStream |
getFixityResultsModel(org.fcrepo.kernel.rdf.IdentifierTranslator subjects,
org.fcrepo.kernel.Datastream datastream)
Get the fixity results for the datastream as a RDF Dataset
|
Collection<org.fcrepo.kernel.utils.FixityResult> |
runFixityAndFixProblems(org.fcrepo.kernel.Datastream datastream)
Run the fixity check on the datastream and attempt to automatically
correct failures if additional copies of the bitstream are available
|
void |
setLlStoreService(LowLevelStorageService llStoreService)
Set the low-level storage service (if Spring didn't wire it in)
|
void |
setStoragePolicyDecisionPoint(org.fcrepo.kernel.services.policy.StoragePolicyDecisionPoint pdp)
Set the storage policy decision point (if Spring didn't wire it in for
us)
|
exists, setRepositoryfindOrCreateChild, 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 org.fcrepo.kernel.Datastream createDatastream(javax.jcr.Session session,
String dsPath)
throws javax.jcr.RepositoryException
createDatastream in interface org.fcrepo.kernel.services.DatastreamServicesession - dsPath - javax.jcr.RepositoryExceptionpublic org.fcrepo.kernel.Datastream createDatastream(javax.jcr.Session session,
String dsPath,
String contentType,
String originalFileName,
InputStream requestBodyStream)
throws javax.jcr.RepositoryException,
org.fcrepo.kernel.exception.InvalidChecksumException
createDatastream in interface org.fcrepo.kernel.services.DatastreamServicesession - the jcr session to usedsPath - the absolute path to put the datastreamcontentType - the mime-type for the requestBodyStreamrequestBodyStream - binary payload for the datastreamjavax.jcr.RepositoryExceptionorg.fcrepo.kernel.exception.InvalidChecksumExceptionpublic org.fcrepo.kernel.Datastream createDatastream(javax.jcr.Session session,
String dsPath,
String contentType,
String originalFileName,
InputStream requestBodyStream,
URI checksum)
throws javax.jcr.RepositoryException,
org.fcrepo.kernel.exception.InvalidChecksumException
createDatastream in interface org.fcrepo.kernel.services.DatastreamServicesession - the jcr session to usedsPath - the absolute path to put the datastreamcontentType - the mime-type for the requestBodyStreamoriginalFileName - the original file name for the input streamrequestBodyStream - binary payload for the datastreamchecksum - the digest for the binary payload (as urn:sha1:xyz) @returnjavax.jcr.RepositoryExceptionorg.fcrepo.kernel.exception.InvalidChecksumExceptionpublic javax.jcr.Node getDatastreamNode(javax.jcr.Session session,
String path)
throws javax.jcr.RepositoryException
getDatastreamNode in interface org.fcrepo.kernel.services.DatastreamServicepath - javax.jcr.RepositoryExceptionpublic org.fcrepo.kernel.Datastream getDatastream(javax.jcr.Session session,
String path)
throws javax.jcr.RepositoryException
getDatastream in interface org.fcrepo.kernel.services.DatastreamServicepath - jcr path to the datastreamjavax.jcr.RepositoryExceptionpublic org.fcrepo.kernel.Datastream asDatastream(javax.jcr.Node node)
asDatastream in interface org.fcrepo.kernel.services.DatastreamServicenode - datastream nodepublic org.fcrepo.kernel.utils.iterators.RdfStream getFixityResultsModel(org.fcrepo.kernel.rdf.IdentifierTranslator subjects,
org.fcrepo.kernel.Datastream datastream)
throws javax.jcr.RepositoryException
getFixityResultsModel in interface org.fcrepo.kernel.services.DatastreamServicesubjects - datastream - javax.jcr.RepositoryExceptionpublic Collection<org.fcrepo.kernel.utils.FixityResult> runFixityAndFixProblems(org.fcrepo.kernel.Datastream datastream) throws javax.jcr.RepositoryException
runFixityAndFixProblems in interface org.fcrepo.kernel.services.DatastreamServicedatastream - javax.jcr.RepositoryExceptionpublic Collection<org.fcrepo.kernel.utils.FixityResult> getFixity(javax.jcr.Node resource, URI dsChecksum, long dsSize) throws javax.jcr.RepositoryException
getFixity in interface org.fcrepo.kernel.services.DatastreamServiceresource - dsChecksum - -the checksum and algorithm represented as a URIdsSize - javax.jcr.RepositoryExceptionpublic void setLlStoreService(LowLevelStorageService llStoreService)
llStoreService - public void setStoragePolicyDecisionPoint(org.fcrepo.kernel.services.policy.StoragePolicyDecisionPoint pdp)
pdp - Copyright © 2013–2014 DuraSpace, Inc.. All rights reserved.