[Htmlparser-cvs] htmlparser/src/org/htmlparser AbstractNode.java,1.15,1.16 Node.java,1.40,1.41
Brought to you by:
derrickoswald
From: <der...@us...> - 2003-10-05 13:50:17
|
Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser In directory sc8-pr-cvs1:/tmp/cvs-serv9618 Modified Files: AbstractNode.java Node.java Log Message: Add bean like accessors for positions on Node, AbstractNode and AbstractNodeDecorator. Handle null page in Cursor. Add smartquotes mode in Lexer and CompositeTagScannerHelper. Add simple name constructor in Attribute. Remove emptyxmltag member, replace with computing accessors in TagNode. Removed ScriptScannerHelper and moved scanning logic to ScriptScanner. Reworked extractImageLocn in ImageScanner Implement extractXMLData in TagScanner. Made virtual tags zero length in TagData. Added push() to IteratorImpl. Added single node constructor to NodeList. Numerous and various test adjustments. Still 133 failures. Index: AbstractNode.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/AbstractNode.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** AbstractNode.java 28 Sep 2003 15:33:57 -0000 1.15 --- AbstractNode.java 5 Oct 2003 13:49:40 -0000 1.16 *************** *** 176,179 **** --- 176,215 ---- } + /** + * Gets the starting position of the node. + * @return The start position. + */ + public int getStartPosition () + { + return (nodeBegin); + } + + /** + * Sets the starting position of the node. + * @param position The new start position. + */ + public void setStartPosition (int position) + { + nodeBegin = position; + } + + /** + * Gets the ending position of the node. + * @return The end position. + */ + public int getEndPosition () + { + return (nodeEnd); + } + + /** + * Sets the ending position of the node. + * @param position The new end position. + */ + public void setEndPosition (int position) + { + nodeEnd = position; + } + public abstract void accept(Object visitor); Index: Node.java =================================================================== RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/Node.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** Node.java 22 Sep 2003 02:39:58 -0000 1.40 --- Node.java 5 Oct 2003 13:49:40 -0000 1.41 *************** *** 120,129 **** --- 120,156 ---- /** * Returns the beginning position of the tag. + * <br>deprecated Use {@link #getEndPosition} */ public abstract int elementBegin(); + /** * Returns the ending position fo the tag + * <br>deprecated Use {@link #getEndPosition} */ public abstract int elementEnd(); + + /** + * Gets the starting position of the node. + * @return The start position. + */ + public abstract int getStartPosition (); + + /** + * Sets the starting position of the node. + * @param position The new start position. + */ + public abstract void setStartPosition (int position); + + /** + * Gets the ending position of the node. + * @return The end position. + */ + public abstract int getEndPosition (); + + /** + * Sets the ending position of the node. + * @param position The new end position. + */ + public abstract void setEndPosition (int position); public abstract void accept(Object visitor); |