1 /***
2 *
3 */
4 package net.trajano.twiff.renderer;
5
6 /***
7 * A page data that contains a string.
8 *
9 * @author Archimedes Trajano
10 */
11 public class ProcessingInstructionElement implements PageElement {
12 /***
13 * Accepts a visitor that should visit the page data.
14 *
15 * @param visitor
16 * visitor.
17 */
18 public void accept(final PageElementVisitor visitor) {
19 visitor.visitProcessingInstructionElement(this, target, data);
20 }
21
22 /***
23 * Returns the content of the string page data.
24 *
25 * @return data.
26 */
27 public String getData() {
28 return data;
29 }
30
31 /***
32 * Constructs the element.
33 *
34 * @param target
35 * target
36 * @param data
37 * data
38 */
39 public ProcessingInstructionElement(final String target, final String data) {
40 this.data = data;
41 this.target = target;
42 }
43
44 /***
45 * Content of the PI data.
46 */
47 private final String data;
48
49 /***
50 * Content of the PI target.
51 */
52 private final String target;
53
54 /***
55 * @see net.trajano.twiff.renderer.PageElement#getColumnNumber()
56 */
57 public int getColumnNumber() {
58
59 return 0;
60 }
61
62 /***
63 * @see net.trajano.twiff.renderer.PageElement#getLineNumber()
64 */
65 public int getLineNumber() {
66
67 return 0;
68 }
69 }