KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > javacoding > jspider > api > model > Site


1 package net.javacoding.jspider.api.model;
2
3
4 import java.net.URL JavaDoc;
5
6
7 /**
8  *
9  * $Id: Site.java,v 1.23 2003/04/10 16:19:03 vanrogu Exp $
10  *
11  * @author Günther Van Roey
12  */

13 public interface Site {
14
15     /**
16      * if the site is newly discovered, we're not going to fetch resources
17      * until we have interpreted the site's robots.txt rules.
18      */

19     public static final int STATE_DISCOVERED = 0;
20
21     /**
22      * if the robots.txt was handled (interpreted or missing), we can
23      * fetch resources from it.
24      */

25     public static final int STATE_ROBOTSTXT_HANDLED = 1;
26
27     /**
28      * if robots.txt couldn't be fetched (but seems to be there), no resources
29      * will be fetched from the site!
30      */

31     public static final int STATE_ROBOTSTXT_ERROR = 2;
32
33     /**
34      * if robots.txt was not found, all resources can be fetched !
35      */

36     public static final int STATE_ROBOTSTXT_UNEXISTING = 3;
37
38     /**
39      * if robots.txt was skipped, all resources can be fetched !
40      */

41     public static final int STATE_ROBOTSTXT_SKIPPED = 4;
42
43
44     public int getState();
45
46     public String JavaDoc getHost();
47
48     public int getPort();
49
50     public boolean isRobotsTXTHandled();
51
52     public boolean getObeyRobotsTXT();
53
54     public boolean getFetchRobotsTXT();
55
56     public URL JavaDoc getURL();
57
58     public Folder[] getRootFolders();
59
60     public Folder getRootFolder(String JavaDoc name);
61
62     public Resource[] getRootResources();
63
64     public Resource[] getAllResources();
65
66     public Cookie[] getCookies();
67
68     public String JavaDoc getCookieString();
69
70     public boolean getUseCookies();
71
72     public boolean getUseProxy();
73
74     public String JavaDoc getUserAgent ( );
75
76     public boolean isBaseSite ( );
77
78     public boolean mustHandle ( );
79
80  }
81
Popular Tags