001package Torello.HTML.Tools.NewsSite; 002 003/** 004 * An enumeration of the various problem that could potentially flare up when downloading news 005 * article HTML. 006 * 007 * <BR /><BR /> 008 * This enumerated type is used by the {@code class ScrapeArticles} as a return-value. The 009 * different constants below are explained in the comments section of each constant. Only the 010 * constant named {@code 'SUCCESS'} indicates that a news {@code class 'Article'} was both 011 * successfully downloaded and also handled / saved by the {@code 'ScrapedArticleReceiver'} 012 * instance. All other constants are used to indicate something went wrong during either the 013 * download process or when attempting to save the {@code Article}. 014 */ 015public enum DownloadResult 016{ 017 /** The news-article was successfully downloaded. */ 018 SUCCESS, 019 020 /** 021 * The article's {@code URL} could not be instantiated, because the {@code URL} constructor 022 * threw an exception. 023 */ 024 BAD_ARTICLE_URL, 025 026 /** The HTTP-Download Connection failed. */ 027 COULD_NOT_DOWNLOAD, 028 029 /** The HTTP-Download Returned an empty {@code Vector}. */ 030 EMPTY_PAGE_VECTOR, 031 032 /** There was an "Article Get Exception" (Review the log for more details). */ 033 ARTICLE_GET_EXCEPTION, 034 035 /** The {@code ArticleGet} returned a null {@code Vector<HTMLNode>}. */ 036 ARTICLE_GET_RETURNED_NULL, 037 038 /** The {@code ArticleGet} returned an empty {@code Vector<HTMLNode>}. */ 039 ARTICLE_GET_RETURNED_EMPTY_VECTOR, 040 041 /** There were no images found, and "only articles with images" was requested. */ 042 NO_IMAGES_FOUND, 043 044 /** There were only banner images, but no real images. */ 045 NO_IMAGES_FOUND_ONLY_BANNERS, 046 047 /** There was an unknown exception. Review the log for more details. */ 048 UNKNOWN_EXCEPTION; 049}