[Htmlparser-cvs] htmlparser/src/org/htmlparser/nodeDecorators AbstractNodeDecorator.java,1.4,1.5
Brought to you by:
derrickoswald
From: <der...@us...> - 2003-08-23 20:43:37
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/nodeDecorators In directory sc8-pr-cvs1:/tmp/cvs-serv20167/nodeDecorators Modified Files: AbstractNodeDecorator.java Log Message: Sixth drop for new i/o subsystem. Isolated htmllexer.jar file and made it compileable and runnable on JDK 1.1 systems. The build.xml file now has four new targets for separate compiling and jaring of the lexer and parser. Significantly refactored the existing Node interface and AbstractNode class to achieve isolation. They now support get/setChildren(), rather than CompositeTag. Various scanners that were directly accessing the childTags node list were affected. The get/setParent is now a generic Node rather than a CompositeTag. The visitor accept() signature was changed to Object to avoid dragging in visitors code. This was *not* changed on classes derived from Tag, although it could be. ChainedException now uses/returns a Vector. Removed the cruft from lexer nodes where possible. Index: AbstractNodeDecorator.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/nodeDecorators/AbstractNodeDecorator.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AbstractNodeDecorator.java 11 Aug 2003 00:18:28 -0000 1.4 --- AbstractNodeDecorator.java 23 Aug 2003 17:14:45 -0000 1.5 *************** *** 44,48 **** } ! public void accept(NodeVisitor visitor) { delegate.accept(visitor); } --- 44,48 ---- } ! public void accept(Object visitor) { delegate.accept(visitor); } *************** *** 68,72 **** } ! public CompositeTag getParent() { return delegate.getParent(); } --- 68,72 ---- } ! public Node getParent() { return delegate.getParent(); } *************** *** 76,82 **** } ! public void setParent(CompositeTag tag) { ! delegate.setParent(tag); } public void setText(String text) { --- 76,100 ---- } ! public void setParent(Node node) { ! delegate.setParent(node); } + + /** + * Get the children of this node. + * @return The list of children contained by this node, if it's been set, <code>null</code> otherwise. + */ + public NodeList getChildren () + { + return (delegate.getChildren ()); + } + + /** + * Set the children of this node. + * @param children The new list of children this node contains. + */ + public void setChildren (NodeList children) + { + delegate.setChildren (children); + } public void setText(String text) { |