/*
 * Copyright 2016 Amherst College
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package edu.amherst.acdc.trellis.spi;

import java.util.Optional;

import edu.amherst.acdc.trellis.api.Session;
import org.apache.commons.rdf.api.IRI;

/**
 * @author acoburn
 */
public interface FixityService {

    /**
     * Compute the fixity of a resource
     * @param session the session
     * @param identifier the resource identifier
     * @param algorithm the algorithm to use
     * @return the digest
     */
    Optional<String> computeDigest(final Session session, final IRI identifier, final String algorithm);

}

@@ -659,16 +659,66 @@
 ional;%0A%0A
+import edu.amherst.acdc.trellis.api.FixityResult;%0A
 import e
@@ -754,16 +754,16 @@
 ession;%0A
-
 import o
@@ -1078,22 +1078,28 @@
 ptional%3C
-String
+FixityResult
 %3E comput
@@ -1177,10 +1177,313 @@
 ithm);%0A%0A
+    /**%0A     * Compute the fixity of a resource%0A     * @param session the session%0A     * @param identifier the resource identifier%0A     * @param result the fixity result%0A     * @return the digest%0A     */%0A    void addFixityResult(final Session session, final IRI identifier, final FixityResult result);%0A%0A
 %7D%0A

add method to fixity service