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
38
39
40
41
42
43
44
45
46 | package Torello.HTML.Tools.NewsSite;
import Torello.HTML.HTMLNode;
import java.util.Vector;
import java.net.URL;
/**
* A simple Java function-pointer / lambda-target that may be used to modify or alter
* Vectorized-HTML, in any way that the programmer has deemed necessary.
*
* <EMBED CLASS='external-html' DATA-FILE-ID=HTML_MODIFIER>
*/
@FunctionalInterface
public interface HTMLModifier
{
/** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDFI> */
public static final long serialVersionUID = 1;
/**
* <EMBED CLASS='external-html' DATA-FILE-ID=FUNC_INTER_METH>
*
* @param html This is the vectorized-{@code HTML} news-article
*
* @param originalPageURL This is the original {@code URL} from whence the page was
* downloaded. It is provided to this method, merely for convenience.
*
* @param sectionNum Each article that is downloaded belonged to a particular news
* section. News sections are listed by their position in a Java {@code Vector},
* and the index into ths {@code Vector} is treated as a the {@code 'ID'}, or the
* {@code 'number'} of the section.
*
* <BR /><BR />This value is provided here to this method just for convenience. When
* {@code '.html'} files are saved (as {@code '.dat'} files) - their save location is
* of the form of {@code 'directoryName/fileName.dat'} - where the {@code String
* 'directoryName'} is this Section Number provided here.
*
* @param articleNum Each article that is downloaded is given a number that is merely the
* order of the {@code Article} in the download process. The 5th {@code Article} to be
* downloaded in a given / particular section would have filename {@code '005.dat'}.
*
* <BR /><BR />This value is provided here to this method just for convenience.
*/
public void modifyOrRetrieve
(Vector<HTMLNode> html, URL originalPageURL, int sectionNum, int articleNum);
}
|