-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCollect.java
More file actions
37 lines (28 loc) · 1.07 KB
/
Copy pathCollect.java
File metadata and controls
37 lines (28 loc) · 1.07 KB
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
package prog11;
import prog02.GUI;
import java.util.*;
public class Collect {
public static void main(String[] args) {
Browser browser = new BetterBrowser();
SearchEngine notGPT = new NotGPT();
List<String> startingURLs = new ArrayList<String>();
startingURLs.add("http://www.cs.miami.edu/home/vjm/csc220/google/mary.html");
List<String> temp = new ArrayList<String>();
for (int i = 0; i < startingURLs.size(); i++) {
temp.add(BetterBrowser.reversePathURL(startingURLs.get(i)));
}
startingURLs = temp;
notGPT.collect(browser, startingURLs);
NotGPT g = (NotGPT) notGPT;
System.out.println("map from URL to page index");
System.out.println(g.indexOfURL);
System.out.println("map from page index to page file");
System.out.println(g.pageDisk);
System.out.println("map from word to word index");
System.out.println(g.indexOfWord);
System.out.println("map from word index to word file");
System.out.println(g.wordDisk);
g.pageDisk.write("pagedisk.txt");
g.wordDisk.write("worddisk.txt");
}
}