@Component public class DatastreamService extends RepositoryService
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.VariablerepoCONTENT_DIGEST, CONTENT_SIZE, FCR_CONTENT, FEDORA_BINARY, FEDORA_DATASTREAM, FEDORA_OBJECT, FEDORA_RESOURCE, JCR_CREATED, JCR_CREATEDBY, JCR_LASTMODIFIED, ROOT| Constructor and Description |
|---|
DatastreamService() |
| Modifier and Type | Method and Description |
|---|---|
Datastream |
asDatastream(javax.jcr.Node node)
Retrieve a Datastream instance by pid and dsid
|
javax.jcr.Node |
createDatastreamNode(javax.jcr.Session session,
String dsPath,
String contentType,
InputStream requestBodyStream)
Create a new Datastream node in the JCR store
|
javax.jcr.Node |
createDatastreamNode(javax.jcr.Session session,
String dsPath,
String contentType,
InputStream requestBodyStream,
URI checksum)
Create a new Datastream node in the JCR store
|
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<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.
|
com.hp.hpl.jena.query.Dataset |
getFixityResultsModel(GraphSubjects subjects,
Datastream datastream)
Get the fixity results for the datastream as a RDF Dataset
|
Collection<FixityResult> |
runFixityAndFixProblems(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(PolicyDecisionPoint pdp)
Set the storage policy decision point
(if Spring didn't wire it in for us)
|
exists, getAllNodeTypes, getNamespaceRegistryGraph, getRepositoryNamespaces, getRepositoryObjectCount, getRepositorySize, searchRepository, setRepositoryfindOrCreateChild, 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 javax.jcr.Node createDatastreamNode(javax.jcr.Session session,
String dsPath,
String contentType,
InputStream requestBodyStream)
throws javax.jcr.RepositoryException,
IOException,
InvalidChecksumException
session - the jcr session to usedsPath - the absolute path to put the datastreamcontentType - the mime-type for the requestBodyStreamrequestBodyStream - binary payload for the datastreamjavax.jcr.RepositoryExceptionIOExceptionInvalidChecksumExceptionpublic javax.jcr.Node createDatastreamNode(javax.jcr.Session session,
String dsPath,
String contentType,
InputStream requestBodyStream,
URI checksum)
throws javax.jcr.RepositoryException,
IOException,
InvalidChecksumException
session - the jcr session to usedsPath - the absolute path to put the datastreamcontentType - the mime-type for the requestBodyStreamrequestBodyStream - binary payload for the datastreamchecksum - the digest for the binary payload (as urn:sha1:xyz)javax.jcr.RepositoryExceptionIOExceptionInvalidChecksumExceptionpublic javax.jcr.Node getDatastreamNode(javax.jcr.Session session,
String path)
throws javax.jcr.RepositoryException
path - javax.jcr.RepositoryExceptionpublic Datastream getDatastream(javax.jcr.Session session, String path) throws javax.jcr.RepositoryException
path - jcr path to the datastreamjavax.jcr.RepositoryExceptionpublic Datastream asDatastream(javax.jcr.Node node) throws javax.jcr.RepositoryException
node - datastream nodejavax.jcr.RepositoryExceptionpublic com.hp.hpl.jena.query.Dataset getFixityResultsModel(GraphSubjects subjects, Datastream datastream) throws javax.jcr.RepositoryException
subjects - datastream - javax.jcr.RepositoryExceptionpublic Collection<FixityResult> runFixityAndFixProblems(Datastream datastream) throws javax.jcr.RepositoryException
datastream - javax.jcr.RepositoryExceptionpublic Collection<FixityResult> getFixity(javax.jcr.Node resource, URI dsChecksum, long dsSize) throws javax.jcr.RepositoryException
resource - dsChecksum - -the checksum and algorithm represented as a URIdsSize - javax.jcr.RepositoryExceptionpublic void setLlStoreService(LowLevelStorageService llStoreService)
llStoreService - public void setStoragePolicyDecisionPoint(PolicyDecisionPoint pdp)
pdp - Copyright © 2013 DuraSpace, Inc.. All Rights Reserved.