1 package be
.nikiroo
.gofetch
.support
;
3 import org
.jsoup
.nodes
.Node
;
6 * Used to process an element into lines.
10 interface ElementProcessor
{
12 * Detect if this node is a quote and should be trated as such.
16 * @return TRUE if it is
18 public boolean detectQuote(Node node
);
21 * Process text content (will be called on each text element, allowing you
22 * to modify it if needed).
27 * @return the resulting text
29 public String
processText(String text
);
36 * @return TRUE if it has to be ignored
38 public boolean ignoreNode(Node node
);
41 * Manually process this node (and return the manual processing value) if so
44 * If the node is manually processed, it and its children will not be
45 * automatically processed.
48 * the node to optionally process
50 * @return NULL if not processed (will thus be automatically processed as
51 * usual), a {@link String} (may be empty) if we process it manually
52 * -- the given {@link String} will be used instead of the usual
53 * automatic processing if not NULL
55 public String
manualProcessing(Node node
);
58 * This {@link Node} is a subtitle and should be treated as such
64 * @return NULL if it is not a subtitle, the subtitle to use if it is
66 public String
isSubtitle(Node node
);