File tree Expand file tree Collapse file tree 4 files changed +28
-10
lines changed Expand file tree Collapse file tree 4 files changed +28
-10
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ public class AddressUtility {
9
9
* This method check and return true if address is correct HTTP URL
10
10
* in other cases return false
11
11
*
12
- * @param String address
12
+ * @param address String
13
13
* @return boolean
14
14
*/
15
15
static public boolean isHttp (String address ) {
@@ -24,7 +24,7 @@ static public boolean isHttp(String address) {
24
24
/**
25
25
* This method check internal references for address
26
26
*
27
- * @param String address
27
+ * @param address String
28
28
* @return boolean
29
29
*/
30
30
static public boolean isInternalRef (String address ) {
@@ -34,7 +34,7 @@ static public boolean isInternalRef(String address) {
34
34
/**
35
35
* This method can replace addresses started to www. on domain address URL
36
36
*
37
- * @param String address
37
+ * @param address String
38
38
* @return String
39
39
*/
40
40
static public String clearHttpAddress (String address ) {
Original file line number Diff line number Diff line change 1
1
package stdBot ;
2
2
3
3
4
- public class App
5
- {
6
- public static void main ( String [] args )
7
- {
4
+ public class App {
5
+ public static void main (String [] args ) {
8
6
RemoteMapper remoteMapper = new RemoteMapper ();
9
7
10
8
remoteMapper .start ("http://www.wggios.agh.edu.pl/" , CollectorTypeEnum .Map , 2 );
11
9
12
10
SiteMap siteMap = remoteMapper .getResult ();
13
11
14
- // siteMap.print();
15
- // siteMap.printInternalLinksNumber();
12
+ siteMap .print ();
13
+ siteMap .printInternalLinksNumber ();
16
14
siteMap .printRelationsGraph ();
17
15
siteMap .printInternalLinksNumber ();
18
16
}
Original file line number Diff line number Diff line change 4
4
* This class implements CollectableRemotely interface
5
5
*/
6
6
public class RemoteHyperLinksMap implements CollectableRemotely {
7
+ /**
8
+ *
9
+ * @param address
10
+ */
7
11
@ Override
8
12
public void setEntryPoint (String address ) {
9
13
10
14
}
11
15
16
+ /**
17
+ *
18
+ * @param handler This parameter is used to set adequate RemoteHandler
19
+ */
12
20
@ Override
13
21
public void collectOne (RemoteHandler handler ) {
14
22
}
15
23
24
+ /**
25
+ *
26
+ * @return This returns null
27
+ */
16
28
@ Override
17
29
public SiteMap getMap () {
18
30
return null ;
19
31
}
20
32
33
+ /**
34
+ *
35
+ * @return This returns predefined boolean which is false
36
+ */
21
37
@ Override
22
38
public boolean hasFinished () {
23
39
return false ;
24
40
}
25
41
42
+ /**
43
+ *
44
+ * @param level This param sets the maximum depth of recursion search
45
+ */
26
46
@ Override
27
47
public void setMaxRecursionLevel (int level ) {
28
48
}
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ public void print() {
37
37
38
38
/**
39
39
* @return String This returns is literally all data extracted from assigned starting url
40
+ * in the form of the URL
40
41
*/
41
42
public String toHTML () {
42
43
StringBuilder stringBuilder = new StringBuilder ();
@@ -50,7 +51,6 @@ public String toHTML() {
50
51
stringBuilder .append ("<li><a href=\" " + relation .getKey () + "\" >" + relation .getKey () + "</a> --> <a href=\" " + relation .getValue () + "\" >" + relation .getValue () + "</a></li>" );
51
52
52
53
return stringBuilder .toString ();
53
-
54
54
}
55
55
56
56
/**
You can’t perform that action at this time.
0 commit comments