/*$Id: Constants.java 136 2007-11-09 12:45:21Z kfc $ * $Revision: 136 $ * $Author: kfc $ * $Date: 2007-11-09 13:45:21 +0100 (Fri, 09 Nov 2007) $ * * The Netarchive Suite - Software to harvest and preserve websites * Copyright 2004-2007 Det Kongelige Bibliotek and Statsbiblioteket, Denmark * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ package is.hi.bok.deduplicator; /** * Class adding statuscode to the base CrawlDataItem class. */ public class CrawlDataItemWithStatuscode extends CrawlDataItem{ protected String statuscode; /** * Constructor. Creates a new CrawlDataItemWithStatuscode with all its data initialized * to null. */ public CrawlDataItemWithStatuscode(){ super(); statuscode = null; } /** * Constructor. Creates a new CrawlDataItemWithStatuscode with all its data initialized * via the constructor. * * @param URL The URL for this CrawlDataItem * @param contentDigest A content digest of the document found at the URL * @param timestamp Date of when the content digest was valid for that URL. * Format: yyyyMMddHHmmssSSS * @param etag Etag for the URL * @param mimetype MIME type of the document found at the URL * @param origin The origin of the CrawlDataItem (the exact meaning of the * origin is outside the scope of this class and it may be * any String value) * @param duplicate True if this CrawlDataItem was marked as duplicate * @param statuscode The HTTP statuscode for the document (e.g. 200,401); */ public CrawlDataItemWithStatuscode(String URL, String contentDigest, String timestamp, String etag, String mimetype, String origin, boolean duplicate, String statuscode){ super(URL, contentDigest, timestamp, etag, mimetype, origin, duplicate); setStatuscode(statuscode); } /* * Returns the statuscode that was associated with the document. * @return the statuscode. */ public String getStatuscode(){ return statuscode; } /** * Associate a statuscode with the document. * @param statuscode a given statuscode */ public void setStatuscode(String statuscode){ this.statuscode = statuscode; } }