亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? abstractnode.java

?? 本程序用于對(duì)頁面信息進(jìn)行提取并分析
?? JAVA
字號(hào):
// HTMLParser Library $Name: v1_6_20060319 $ - A java-based parser for HTML// http://sourceforge.org/projects/htmlparser// Copyright (C) 2004 Somik Raha//// Revision Control Information//// $Source: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/nodes/AbstractNode.java,v $// $Author: derrickoswald $// $Date: 2005/10/26 22:01:23 $// $Revision: 1.5 $//// This library is free software; you can redistribute it and/or// modify it under the terms of the GNU Lesser General Public// License as published by the Free Software Foundation; either// version 2.1 of the License, or (at your option) any later version.//// This library is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU// Lesser General Public License for more details.//// You should have received a copy of the GNU Lesser General Public// License along with this library; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA//package org.htmlparser.nodes;import java.io.Serializable;import org.htmlparser.Node;import org.htmlparser.NodeFilter;import org.htmlparser.lexer.Page;import org.htmlparser.util.NodeList;import org.htmlparser.util.ParserException;import org.htmlparser.visitors.NodeVisitor;/** * The concrete base class for all types of nodes (tags, text remarks). * This class provides basic functionality to hold the {@link Page}, the * starting and ending position in the page, the parent and the list of * {@link NodeList children}. */public abstract class AbstractNode implements Node, Serializable{    /**     * The page this node came from.     */    protected Page mPage;    /**     * The beginning position of the tag in the line     */    protected int nodeBegin;    /**     * The ending position of the tag in the line     */    protected int nodeEnd;    /**     * The parent of this node.     */    protected Node parent;    /**     * The children of this node.     */    protected NodeList children;    /**     * Create an abstract node with the page positions given.     * Remember the page and start & end cursor positions.     * @param page The page this tag was read from.     * @param start The starting offset of this node within the page.     * @param end The ending offset of this node within the page.     */    public AbstractNode (Page page, int start, int end)    {        mPage = page;        nodeBegin = start;        nodeEnd = end;        parent = null;        children = null;    }    /**     * Clone this object.     * Exposes java.lang.Object clone as a public method.     * @return A clone of this object.     * @exception CloneNotSupportedException This shouldn't be thrown since     * the {@link Node} interface extends Cloneable.     */    public Object clone() throws CloneNotSupportedException    {        return (super.clone ());    }    /**     * Returns a string representation of the node.     * It allows a simple string transformation     * of a web page, regardless of node type.<br>     * Typical application code (for extracting only the text from a web page)     * would then be simplified to:<br>     * <pre>     * Node node;     * for (Enumeration e = parser.elements (); e.hasMoreElements (); )     * {     *     node = (Node)e.nextElement();     *     System.out.println (node.toPlainTextString ());     *     // or do whatever processing you wish with the plain text string     * }     * </pre>     * @return The 'browser' content of this node.     */    public abstract String toPlainTextString ();    /**     * Return the HTML that generated this node.     * This method will make it easier when using html parser to reproduce html     * pages (with or without modifications).     * Applications reproducing html can use this method on nodes which are to     * be used or transferred as they were recieved, with the original html.     * @return The HTML code for this node.     */    public abstract String toHtml ();    /**     * Return a string representation of the node.     * Subclasses must define this method, and this is typically to be used in the manner<br>     * <pre>System.out.println(node)</pre>     * @return A textual representation of the node suitable for debugging     */    public abstract String toString ();    /**     * Collect this node and its child nodes (if-applicable) into the collectionList parameter, provided the node     * satisfies the filtering criteria.<P>     *      * This mechanism allows powerful filtering code to be written very easily,     * without bothering about collection of embedded tags separately.     * e.g. when we try to get all the links on a page, it is not possible to     * get it at the top-level, as many tags (like form tags), can contain     * links embedded in them. We could get the links out by checking if the     * current node is a {@link org.htmlparser.tags.CompositeTag}, and going through its children.     * So this method provides a convenient way to do this.<P>     *      * Using collectInto(), programs get a lot shorter. Now, the code to     * extract all links from a page would look like:     * <pre>     * NodeList collectionList = new NodeList();     * NodeFilter filter = new TagNameFilter ("A");     * for (NodeIterator e = parser.elements(); e.hasMoreNodes();)     *      e.nextNode().collectInto(collectionList, filter);     * </pre>     * Thus, collectionList will hold all the link nodes, irrespective of how     * deep the links are embedded.<P>     *      * Another way to accomplish the same objective is:     * <pre>     * NodeList collectionList = new NodeList();     * NodeFilter filter = new TagClassFilter (LinkTag.class);     * for (NodeIterator e = parser.elements(); e.hasMoreNodes();)     *      e.nextNode().collectInto(collectionList, filter);     * </pre>     * This is slightly less specific because the LinkTag class may be     * registered for more than one node name, e.g. &lt;LINK&gt; tags too.     * @param list The node list to collect acceptable nodes into.     * @param filter The filter to determine which nodes are retained.     */    public void collectInto (NodeList list, NodeFilter filter)    {        if (filter.accept (this))            list.add (this);    }    /**     * Get the page this node came from.     * @return The page that supplied this node.     */    public Page getPage ()    {        return (mPage);    }    /**     * Set the page this node came from.     * @param page The page that supplied this node.     */    public void setPage (Page page)    {        mPage = page;    }    /**     * 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;    }    /**     * Visit this node.     * @param visitor The visitor that is visiting this node.     */    public abstract void accept (NodeVisitor visitor);    /**     * Get the parent of this node.     * This will always return null when parsing without scanners,     * i.e. if semantic parsing was not performed.     * The object returned from this method can be safely cast to a <code>CompositeTag</code>.     * @return The parent of this node, if it's been set, <code>null</code> otherwise.     */    public Node getParent ()    {        return (parent);    }    /**     * Sets the parent of this node.     * @param node The node that contains this node. Must be a <code>CompositeTag</code>.     */    public void setParent (Node node)    {        parent = 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 (children);    }    /**     * Set the children of this node.     * @param children The new list of children this node contains.     */    public void setChildren (NodeList children)    {        this.children = children;    }        /**     * Get the first child of this node.     * @return The first child in the list of children contained by this node,     * <code>null</code> otherwise.     */    public Node getFirstChild ()    {        if (children == null)            return null;        if (children.size() == 0)            return null;        return children.elementAt(0);    }        /**     * Get the last child of this node.     * @return The last child in the list of children contained by this node,     * <code>null</code> otherwise.     */    public Node getLastChild ()    {        if (children == null)            return null;        int numChildren = children.size();        if (numChildren == 0)            return null;        return children.elementAt(numChildren - 1);    }        /**     * Get the previous sibling to this node.     * @return The previous sibling to this node if one exists,     * <code>null</code> otherwise.     */    public Node getPreviousSibling ()    {        Node parentNode = this.getParent();        if (parentNode == null)//root node            return null;        NodeList siblings = parentNode.getChildren();        if (siblings == null)//this should actually be an error            return null;        int numSiblings = siblings.size();        if (numSiblings < 2)//need at least one other node to have a chance of having any siblings            return null;        int positionInParent = -1;        for (int i = 0; i < numSiblings; i++)        {            if (siblings.elementAt(i) == this)            {                positionInParent = i;                break;            }        }        if (positionInParent < 1)//no previous siblings            return null;        return siblings.elementAt(positionInParent - 1);    }        /**     * Get the next sibling to this node.     * @return The next sibling to this node if one exists,     * <code>null</code> otherwise.     */    public Node getNextSibling ()    {        Node parentNode = this.getParent();        if (parentNode == null)//root node            return null;        NodeList siblings = parentNode.getChildren();        if (siblings == null)//this should actually be an error            return null;        int numSiblings = siblings.size();        if (numSiblings < 2)//need at least one other node to have a chance of having any siblings            return null;        int positionInParent = -1;        for (int i = 0; i < numSiblings; i++)        {            if (siblings.elementAt(i) == this)            {                positionInParent = i;                break;            }        }        if (positionInParent == -1)//this should actually be an error            return null;        if (positionInParent == (numSiblings - 1))//no next sibling            return null;        return siblings.elementAt(positionInParent + 1);    }    /**     * Returns the text of the node.     * @return The text of this node. The default is <code>null</code>.     */    public String getText ()    {        return null;    }    /**     * Sets the string contents of the node.     * @param text The new text for the node.     */    public void setText(String text)    {    }    /**     * Perform the meaning of this tag.     * The default action is to do nothing.     * @exception ParserException <em>Not used.</em> Provides for subclasses     * that may want to indicate an exceptional condition.     */    public void doSemanticAction ()        throws            ParserException    {    }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99精品一区二区| 奇米一区二区三区av| 欧美日韩亚洲丝袜制服| 蜜臀va亚洲va欧美va天堂| 久久九九99视频| 欧美在线啊v一区| 久久精品国产精品亚洲精品| 中文字幕乱码久久午夜不卡 | 国产一区在线视频| 最新高清无码专区| 99国产精品国产精品久久| 视频在线观看国产精品| 久久综合九色综合欧美亚洲| 91视频国产观看| 美日韩一区二区| 亚洲欧美日韩电影| 精品久久久网站| 久久精品国产秦先生| 久久久久一区二区三区四区| 91高清视频在线| 国产98色在线|日韩| 午夜精品久久久久久久久| 久久久久久久久久看片| 欧洲一区二区三区在线| 国产精品资源在线| 视频一区二区三区在线| 国产精品国产自产拍在线| 日韩一二三四区| 欧美午夜宅男影院| 欧美曰成人黄网| 97久久久精品综合88久久| 午夜视频在线观看一区二区三区| 欧美国产在线观看| 精品久久久久久久一区二区蜜臀| 欧美色图激情小说| 色综合夜色一区| 高清在线观看日韩| 久久不见久久见免费视频7| 亚洲影视在线播放| 中文字幕亚洲电影| 国产精品视频九色porn| 26uuu国产日韩综合| 欧美色综合影院| 91天堂素人约啪| 国产一区二区电影| 久久狠狠亚洲综合| 日韩 欧美一区二区三区| 一片黄亚洲嫩模| 亚洲精品视频免费看| 亚洲视频一区在线| 国产精品毛片大码女人| 久久只精品国产| 久久久久高清精品| 2024国产精品| 欧美成人a∨高清免费观看| 欧美疯狂做受xxxx富婆| 欧美探花视频资源| 欧美日韩国产一级二级| 97se亚洲国产综合自在线不卡| 成人性生交大合| 国产成人av电影免费在线观看| 国产在线精品一区在线观看麻豆| 一区二区成人在线观看| 亚洲成人动漫精品| 日韩国产欧美在线视频| 日韩av网站在线观看| 免费在线观看一区| 捆绑调教美女网站视频一区| 久久9热精品视频| 国产一区二区三区日韩| 久久国产精品99精品国产| 激情都市一区二区| 精品一区二区在线观看| 国产精品自拍在线| 99国内精品久久| 欧美影片第一页| 91免费在线视频观看| 91成人看片片| 这里只有精品视频在线观看| 日韩一区二区免费视频| 精品av综合导航| 中文字幕高清不卡| 亚洲黄色尤物视频| 热久久久久久久| 国产成人av一区二区三区在线| 成人成人成人在线视频| 色成年激情久久综合| 在线综合+亚洲+欧美中文字幕| 欧美老年两性高潮| 久久久不卡网国产精品二区| 亚洲欧洲精品成人久久奇米网| 亚洲日本在线a| 日韩电影免费一区| 国产精华液一区二区三区| 色系网站成人免费| 日韩一区和二区| 国产精品免费av| 亚洲成av人片一区二区三区| 精品一区二区三区在线视频| 国产很黄免费观看久久| 成人免费视频视频在线观看免费| 日本电影亚洲天堂一区| 欧美精品123区| 久久精品欧美一区二区三区不卡 | 精品中文av资源站在线观看| 99re在线视频这里只有精品| 欧美日韩在线电影| 国产日韩欧美精品综合| 亚洲国产一区二区三区青草影视| 麻豆精品在线视频| 一本大道av一区二区在线播放| 欧美一区二区在线看| 国产精品不卡在线观看| 蜜桃传媒麻豆第一区在线观看| 大桥未久av一区二区三区中文| 91久久精品一区二区三| 久久欧美一区二区| 亚欧色一区w666天堂| 国产成人精品网址| 欧美一级片在线| 中文字幕不卡的av| 亚洲精品水蜜桃| 处破女av一区二区| 日韩小视频在线观看专区| 亚洲精品视频免费观看| 国产老女人精品毛片久久| 欧美性欧美巨大黑白大战| 国产亚洲制服色| 日韩精品成人一区二区在线| 成人激情小说乱人伦| 欧美日韩久久一区| 国产欧美一区二区精品性| 人人爽香蕉精品| 欧美日韩你懂得| 亚洲视频综合在线| 成人免费视频播放| 久久久久久久久久看片| 麻豆国产精品777777在线| 欧美性三三影院| 亚洲三级小视频| 成人免费精品视频| 欧美高清在线精品一区| 狠狠色2019综合网| 日韩你懂的在线播放| 天堂在线亚洲视频| 欧美日韩你懂得| 亚洲大片精品永久免费| 色婷婷久久综合| 亚洲视频一二三| 91在线视频观看| 中文字幕在线不卡一区| 国产一区二区影院| 精品国产露脸精彩对白| 狠狠色丁香婷婷综合| 精品黑人一区二区三区久久| 婷婷成人激情在线网| 欧美日韩亚洲高清一区二区| 亚洲一区二区三区四区在线 | 亚洲一区二区三区视频在线播放 | 一本大道久久a久久综合| 亚洲成年人影院| 欧美一区二区三区播放老司机| 国产在线乱码一区二区三区| 中文字幕五月欧美| 欧美精品丝袜久久久中文字幕| 麻豆精品一区二区| 国产精品高潮呻吟| 欧美美女一区二区| 国产麻豆视频精品| 一区二区三区日韩精品| 欧美一区二区三区播放老司机| 国产盗摄一区二区| 午夜视频在线观看一区二区| 久久久久久久久久看片| 欧美综合一区二区| 韩国欧美国产一区| 夜夜操天天操亚洲| 久久久美女毛片| 欧美在线啊v一区| 国产99精品国产| 天堂一区二区在线免费观看| 国产欧美一区二区在线| 欧美日韩中文字幕一区| 国产一区在线精品| 亚洲一区二区三区四区中文字幕| 26uuu国产一区二区三区| 欧美在线播放高清精品| 国产成人精品一区二| 丝袜美腿高跟呻吟高潮一区| 国产精品亲子伦对白| 日韩一区二区三区精品视频 | 久久精品视频免费| 欧美剧情电影在线观看完整版免费励志电影| 狠狠色狠狠色综合系列| 亚洲超碰精品一区二区| 国产精品福利影院| 久久久影视传媒| 欧美疯狂做受xxxx富婆| 91久久人澡人人添人人爽欧美 | 91麻豆精品久久久久蜜臀|