1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | package Torello.HTML.Tools.NewsSite; /** * An enumeration of the various problem that could potentially flare up when downloading news * article HTML. * * <BR /><BR /> * This enumerated type is used by the {@code class ScrapeArticles} as a return-value. The * different constants below are explained in the comments section of each constant. Only the * constant named {@code 'SUCCESS'} indicates that a news {@code class 'Article'} was both * successfully downloaded and also handled / saved by the {@code 'ScrapedArticleReceiver'} * instance. All other constants are used to indicate something went wrong during either the * download process or when attempting to save the {@code Article}. */ public enum DownloadResult { /** The news-article was successfully downloaded. */ SUCCESS, /** * The article's {@code URL} could not be instantiated, because the {@code URL} constructor * threw an exception. */ BAD_ARTICLE_URL, /** The HTTP-Download Connection failed. */ COULD_NOT_DOWNLOAD, /** The HTTP-Download Returned an empty {@code Vector}. */ EMPTY_PAGE_VECTOR, /** There was an "Article Get Exception" (Review the log for more details). */ ARTICLE_GET_EXCEPTION, /** The {@code ArticleGet} returned a null {@code Vector<HTMLNode>}. */ ARTICLE_GET_RETURNED_NULL, /** The {@code ArticleGet} returned an empty {@code Vector<HTMLNode>}. */ ARTICLE_GET_RETURNED_EMPTY_VECTOR, /** There were no images found, and "only articles with images" was requested. */ NO_IMAGES_FOUND, /** There were only banner images, but no real images. */ NO_IMAGES_FOUND_ONLY_BANNERS, /** There was an unknown exception. Review the log for more details. */ UNKNOWN_EXCEPTION; } |