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 package org.archive.crawler.framework;
26
27
28 /***
29 * A marker is a pointer to a place somewhere inside a frontier's list of
30 * pending URIs. URIFrontiers use them to allow outside classes (UI for
31 * example) to hold (effectively) pointers into the abstract list of pending
32 * URIs inside the frontier. If the crawl is not paused (i.e. running) the
33 * marker will instantly become out of date.
34 *
35 * @author Kristinn Sigurdsson
36 */
37 public interface FrontierMarker {
38
39 /***
40 * Returns the regular expression that this marker uses.
41 * @return the regular expression that this marker uses
42 */
43 public String getMatchExpression();
44
45 /***
46 * Returns the number of the next match after the marker.
47 * Alternatively this can be viewed as n-1, where n is the number of items
48 * found before the marker.
49 * @return the number of the next match after the marker
50 */
51 public long getNextItemNumber();
52
53 /***
54 * Returns false if no more URIs can be found matching the expression
55 * beyond those already covered. True otherwise.
56 * @return Are there any more matches.
57 */
58 public boolean hasNext();
59 }