SummaryInternal.java
上传用户:qing5858
上传日期:2015-10-27
资源大小:6056k
文件大小:2k
源码类别:

搜索引擎

开发平台:

Java

  1. package net.javacoding.jspider.core.model;
  2. import net.javacoding.jspider.api.model.Summary;
  3. /**
  4.  * $Id: SummaryInternal.java,v 1.2 2003/03/24 16:58:35 vanrogu Exp $
  5.  */
  6. public class SummaryInternal implements Summary {
  7.     protected int known;
  8.     protected int parsed;
  9.     protected int ignoredForFetching;
  10.     protected int ignoredForParsing;
  11.     protected int fetchErrors;
  12.     protected int parseErrors;
  13.     protected int forbidden;
  14.     protected int unvisited;
  15.     public SummaryInternal ( int known, int parsed, int ignoredForFetching, int ignoredForParsing, int fetchErrors, int parseErrors, int forbidden, int unvisited) {
  16.         this.known = known;
  17.         this.parsed = parsed;
  18.         this.ignoredForFetching = ignoredForFetching;
  19.         this.ignoredForParsing = ignoredForParsing;
  20.         this.fetchErrors = fetchErrors;
  21.         this.parseErrors = parseErrors;
  22.         this.forbidden = forbidden;
  23.         this.unvisited = unvisited;
  24.     }
  25.     public int getKnown() {
  26.         return known;
  27.     }
  28.     public int getVisited() {
  29.         return (getParsed() + getIgnoredForParsing() + getParseErrors());
  30.     }
  31.     public int getNotVisited() {
  32.         return (getKnown() - (getParsed() + getIgnoredForParsing() + getParseErrors()));
  33.     }
  34.     public int getParsed() {
  35.         return parsed;
  36.     }
  37.     public int getIgnoredForFetching() {
  38.         return ignoredForFetching;
  39.     }
  40.     public int getIgnoredForParsing() {
  41.         return ignoredForParsing;
  42.     }
  43.     public int getFetchErrors() {
  44.         return fetchErrors;
  45.     }
  46.     public int getParseErrors() {
  47.         return parseErrors;
  48.     }
  49.     public int getForbidden() {
  50.         return forbidden;
  51.     }
  52.     public int getUnvisited() {
  53.         return unvisited;
  54.     }
  55. }