1 27 package org.htmlparser.nodeDecorators; 28 29 import org.htmlparser.Node; 30 import org.htmlparser.Text; 31 import org.htmlparser.NodeFilter; 32 import org.htmlparser.lexer.Page; 33 import org.htmlparser.util.NodeList; 34 import org.htmlparser.util.ParserException; 35 import org.htmlparser.visitors.NodeVisitor; 36 37 public abstract class AbstractNodeDecorator implements Text 38 { 39 protected Text delegate; 40 41 protected AbstractNodeDecorator(Text delegate) 42 { 43 this.delegate = delegate; 44 } 45 46 53 public Object clone() throws CloneNotSupportedException 54 { 55 return (super.clone ()); 56 } 57 58 public void accept (NodeVisitor visitor) 59 { 60 delegate.accept (visitor); 61 } 62 63 public void collectInto(NodeList list, NodeFilter filter) { 64 delegate.collectInto(list, filter); 65 } 66 67 public int elementBegin() { 68 return delegate.elementBegin(); 69 } 70 71 public int elementEnd() { 72 return delegate.elementEnd(); 73 } 74 75 79 public int getStartPosition () 80 { 81 return (delegate.getStartPosition ()); 82 } 83 84 88 public void setStartPosition (int position) 89 { 90 delegate.setStartPosition (position); 91 } 92 93 97 public int getEndPosition () 98 { 99 return (delegate.getEndPosition ()); 100 } 101 102 106 public void setEndPosition (int position) 107 { 108 delegate.setEndPosition (position); 109 } 110 111 115 public Page getPage () 116 { 117 return (delegate.getPage ()); 118 } 119 120 124 public void setPage (Page page) 125 { 126 delegate.setPage (page); 127 } 128 129 public boolean equals(Object arg0) 130 { 131 return delegate.equals(arg0); 132 } 133 134 public Node getParent() { 135 return delegate.getParent(); 136 } 137 138 public String getText() { 139 return delegate.getText(); 140 } 141 142 public void setParent(Node node) { 143 delegate.setParent(node); 144 } 145 146 150 public NodeList getChildren () 151 { 152 return (delegate.getChildren ()); 153 } 154 155 159 public void setChildren (NodeList children) 160 { 161 delegate.setChildren (children); 162 } 163 164 public void setText(String text) { 165 delegate.setText(text); 166 } 167 168 public String toHtml() { 169 return delegate.toHtml(); 170 } 171 172 public String toPlainTextString() { 173 return delegate.toPlainTextString(); 174 } 175 176 public String toString() { 177 return delegate.toString(); 178 } 179 180 public void doSemanticAction () throws ParserException { 181 delegate.doSemanticAction (); 182 } 183 } 184 | Popular Tags |