001package org.apache.archiva.checksum; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022/** 023 * Simple POJO for storing the data parsed from a checksum file. 024 * 025 * @author Martin Stockhammer <martin_s@apache.org> 026 */ 027public class ChecksumFileContent 028{ 029 String checksum; 030 String fileReference; 031 boolean formatMatch = false; 032 033 public ChecksumFileContent() { 034 } 035 036 public ChecksumFileContent(String checksum, String fileReference, boolean formatMatch) { 037 this.checksum = checksum; 038 this.fileReference = fileReference; 039 this.formatMatch = formatMatch; 040 } 041 042 /** 043 * The checksum as hex string. 044 * 045 * @return 046 */ 047 public String getChecksum( ) 048 { 049 return checksum; 050 } 051 052 public void setChecksum( String checksum ) 053 { 054 this.checksum = checksum; 055 } 056 057 /** 058 * The name of the reference file as stored in the checksum file. 059 * @return 060 */ 061 public String getFileReference( ) 062 { 063 return fileReference; 064 } 065 066 public void setFileReference( String fileReference ) 067 { 068 this.fileReference = fileReference; 069 } 070 071 /** 072 * True, if the file content matches a known format 073 * @return 074 */ 075 public boolean isFormatMatch( ) 076 { 077 return formatMatch; 078 } 079 080 public void setFormatMatch( boolean formatMatch ) 081 { 082 this.formatMatch = formatMatch; 083 } 084}