001/* 002 * Copyright 2015 DuraSpace, Inc. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.fcrepo.migration; 017 018/** 019 * A default implementation of ContentDigest that accepts 020 * values at construction time. 021 * @author mdurbin 022 */ 023public class DefaultContentDigest implements ContentDigest { 024 025 private String type; 026 027 private String digest; 028 029 /** 030 * default content digest. 031 * @param type the type 032 * @param digest the digest 033 */ 034 public DefaultContentDigest(final String type, final String digest) { 035 this.type = type; 036 this.digest = digest; 037 } 038 039 @Override 040 public String getType() { 041 return type; 042 } 043 044 @Override 045 public String getDigest() { 046 return digest; 047 } 048}