Skip to content

Commit

Permalink
javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed May 22, 2013
1 parent ff7cdd2 commit 330289e
Showing 1 changed file with 51 additions and 32 deletions.
Expand Up @@ -151,34 +151,12 @@ public Datastream asDatastream(final Node node)
}

/**
* Check if a datastream exists in the repository
*
* @param session jcr session
* @param path
* @return
* Get the fixity results for the datastream as a RDF Dataset
* @param factory
* @param datastream
* @return
* @throws RepositoryException
*/
public boolean exists(final Session session, final String path) throws RepositoryException {
return session.nodeExists(path);
}

public void setStoragePolicyDecisionPoint(PolicyDecisionPoint pdp) {
this.storagePolicyDecisionPoint = pdp;
}


/**
* Get the Policy Decision Point for this service. Initialize it if Spring didn't wire it in for us.
* @return a PolicyDecisionPoint
*/
private PolicyDecisionPoint getStoragePolicyDecisionPoint() {
if(storagePolicyDecisionPoint == null) {
storagePolicyDecisionPoint = new PolicyDecisionPoint();
}

return storagePolicyDecisionPoint;
}

public Dataset getFixityResultsModel(final GraphSubjects factory, final Datastream datastream) throws RepositoryException {


Expand All @@ -190,11 +168,14 @@ public Dataset getFixityResultsModel(final GraphSubjects factory, final Datastre
return GraphStoreFactory.create(model).toDataset();
}

public void setLlStoreService(final LowLevelStorageService llStoreService) {
this.llStoreService = llStoreService;
}


/**
* Run the fixity check on the datastream and attempt to automatically correct failures if additional copies
* of the bitstream are available
*
* @param datastream
* @return
* @throws RepositoryException
*/
public Collection<FixityResult> runFixityAndFixProblems(
final Datastream datastream) throws RepositoryException {
Set<FixityResult> fixityResults;
Expand Down Expand Up @@ -259,7 +240,16 @@ public boolean apply(org.fcrepo.utils.FixityResult input) {
return fixityResults;
}


/**
* Get the fixity results for this datastream's bitstream, and compare it against the given checksum and size
*
* @param resource
* @param digest
* @param dsChecksum
* @param dsSize
* @return
* @throws RepositoryException
*/
public Collection<FixityResult> getFixity(final Node resource, final MessageDigest digest,
final URI dsChecksum, final long dsSize)
throws RepositoryException {
Expand All @@ -269,4 +259,33 @@ public Collection<FixityResult> getFixity(final Node resource, final MessageDige
.getCheckCacheFixityFunction(digest, dsChecksum, dsSize));
}

/**
* Set the low-level storage service (if Spring didn't wire it in)
* @param llStoreService
*/
public void setLlStoreService(final LowLevelStorageService llStoreService) {
this.llStoreService = llStoreService;
}


/**
* Set the storage policy decision point (if Spring didn't wire it in for us)
* @param pdp
*/
public void setStoragePolicyDecisionPoint(PolicyDecisionPoint pdp) {
this.storagePolicyDecisionPoint = pdp;
}

/**
* Get the Policy Decision Point for this service. Initialize it if Spring didn't wire it in for us.
* @return a PolicyDecisionPoint
*/
private PolicyDecisionPoint getStoragePolicyDecisionPoint() {
if(storagePolicyDecisionPoint == null) {
storagePolicyDecisionPoint = new PolicyDecisionPoint();
}

return storagePolicyDecisionPoint;
}

}

0 comments on commit 330289e

Please sign in to comment.