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

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

?? prototypicalnodefactory.java

?? 本程序用于對(duì)頁面信息進(jìn)行提取并分析
?? JAVA
?? 第 1 頁 / 共 2 頁
字號(hào):
// HTMLParser Library $Name: v1_6_20060319 $ - A java-based parser for HTML// http://sourceforge.org/projects/htmlparser// Copyright (C) 2003 Derrick Oswald//// Revision Control Information//// $Source: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/PrototypicalNodeFactory.java,v $// $Author: derrickoswald $// $Date: 2006/03/19 15:01:24 $// $Revision: 1.19 $//// 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;import java.io.Serializable;import java.util.Hashtable;import java.util.Locale;import java.util.Map;import java.util.Set;import java.util.Vector;import org.htmlparser.lexer.Page;import org.htmlparser.nodes.TextNode;import org.htmlparser.nodes.RemarkNode;import org.htmlparser.nodes.TagNode;import org.htmlparser.tags.AppletTag;import org.htmlparser.tags.BaseHrefTag;import org.htmlparser.tags.BodyTag;import org.htmlparser.tags.Bullet;import org.htmlparser.tags.BulletList;import org.htmlparser.tags.DefinitionList;import org.htmlparser.tags.DefinitionListBullet;import org.htmlparser.tags.Div;import org.htmlparser.tags.DoctypeTag;import org.htmlparser.tags.FormTag;import org.htmlparser.tags.FrameSetTag;import org.htmlparser.tags.FrameTag;import org.htmlparser.tags.HeadingTag;import org.htmlparser.tags.HeadTag;import org.htmlparser.tags.Html;import org.htmlparser.tags.ImageTag;import org.htmlparser.tags.InputTag;import org.htmlparser.tags.JspTag;import org.htmlparser.tags.LabelTag;import org.htmlparser.tags.LinkTag;import org.htmlparser.tags.MetaTag;import org.htmlparser.tags.ObjectTag;import org.htmlparser.tags.OptionTag;import org.htmlparser.tags.ParagraphTag;import org.htmlparser.tags.ProcessingInstructionTag;import org.htmlparser.tags.ScriptTag;import org.htmlparser.tags.SelectTag;import org.htmlparser.tags.Span;import org.htmlparser.tags.StyleTag;import org.htmlparser.tags.TableColumn;import org.htmlparser.tags.TableHeader;import org.htmlparser.tags.TableRow;import org.htmlparser.tags.TableTag;import org.htmlparser.tags.TextareaTag;import org.htmlparser.tags.TitleTag;/** * A node factory based on the prototype pattern. * This factory uses the prototype pattern to generate new nodes. * These are cloned as needed to form new {@link Text}, {@link Remark} and * {@link Tag} nodes. * <p>Text and remark nodes are generated from prototypes accessed * via the {@link #setTextPrototype(Text) textPrototype} and * {@link #setRemarkPrototype(Remark) remarkPrototype} properties respectively. * Tag nodes are generated as follows: * <p>Prototype tags, in the form of undifferentiated tags, are held in a hash * table. On a request for a tag, the attributes are examined for the name * of the tag to be created. If a prototype of that name has been registered * (exists in the hash table), it is cloned and the clone is given the * characteristics ({@link Attribute Attributes}, start and end position) * of the requested tag.</p> * <p>In the case that no tag has been registered under that name, * a generic tag is created from the prototype acessed via the * {@link #setTagPrototype(Tag) tagPrototype} property.</p> * <p>The hash table of registered tags can be automatically populated with * all the known tags from the {@link org.htmlparser.tags} package when * the factory is constructed, or it can start out empty and be populated * explicitly.</p> * <p>Here is an example of how to override all text issued from * {@link org.htmlparser.nodes.TextNode#toPlainTextString() * Text.toPlainTextString()}, * in this case decoding (converting character references), * which illustrates the use of setting the text prototype: * <pre> * PrototypicalNodeFactory factory = new PrototypicalNodeFactory (); * factory.setTextPrototype ( *     // create a inner class that is a subclass of TextNode *     new TextNode () { *         public String toPlainTextString() *         { *             String original = super.toPlainTextString (); *             return (org.htmlparser.util.Translate.decode (original)); *         } *     }); * Parser parser = new Parser (); * parser.setNodeFactory (factory); * </pre></p> * <p>Here is an example of using a custom link tag, in this case just * printing the URL, which illustrates registering a tag: * <pre> * * class PrintingLinkTag extends LinkTag * { *     public void doSemanticAction () *         throws *             ParserException *     { *         System.out.println (getLink ()); *     } * } * PrototypicalNodeFactory factory = new PrototypicalNodeFactory (); * factory.registerTag (new PrintingLinkTag ()); * Parser parser = new Parser (); * parser.setNodeFactory (factory); * </pre></p> */public class PrototypicalNodeFactory    implements        Serializable,        NodeFactory{    /**     * The prototypical text node.     */    protected Text mText;    /**     * The prototypical remark node.     */    protected Remark mRemark;    /**     * The prototypical tag node.     */    protected Tag mTag;    /**     * The list of tags to return.     * The list is keyed by tag name.     */    protected Map mBlastocyst;    /**     * Create a new factory with all tags registered.     * Equivalent to     * {@link #PrototypicalNodeFactory() PrototypicalNodeFactory(false)}.     */    public PrototypicalNodeFactory ()    {        this (false);    }    /**     * Create a new factory.     * @param empty If <code>true</code>, creates an empty factory,     * otherwise create a new factory with all tags registered.     */    public PrototypicalNodeFactory (boolean empty)    {        clear ();        mText = new TextNode (null, 0, 0);        mRemark = new RemarkNode (null, 0, 0);        mTag = new TagNode (null, 0, 0, null);        if (!empty)            registerTags ();    }    /**     * Create a new factory with the given tag as the only registered tag.     * @param tag The single tag to register in the otherwise empty factory.     */    public PrototypicalNodeFactory (Tag tag)    {        this (true);        registerTag (tag);    }    /**     * Create a new factory with the given tags registered.     * @param tags The tags to register in the otherwise empty factory.     */    public PrototypicalNodeFactory (Tag[] tags)    {        this (true);        for (int i = 0; i < tags.length; i++)            registerTag (tags[i]);    }    /**     * Adds a tag to the registry.     * @param id The name under which to register the tag.     * <strong>For proper operation, the id should be uppercase so it     * will be matched by a Map lookup.</strong>     * @param tag The tag to be returned from a {@link #createTagNode} call.     * @return The tag previously registered with that id if any,     * or <code>null</code> if none.     */    public Tag put (String id, Tag tag)    {        return ((Tag)mBlastocyst.put (id, tag));    }    /**     * Gets a tag from the registry.     * @param id The name of the tag to return.     * @return The tag registered under the <code>id</code> name,     * or <code>null</code> if none.     */    public Tag get (String id)    {        return ((Tag)mBlastocyst.get (id));    }    /**     * Remove a tag from the registry.     * @param id The name of the tag to remove.     * @return The tag that was registered with that <code>id</code>,     * or <code>null</code> if none.     */    public Tag remove (String id)    {        return ((Tag)mBlastocyst.remove (id));    }    /**     * Clean out the registry.     */    public void clear ()    {        mBlastocyst = new Hashtable ();    }    /**     * Get the list of tag names.     * @return The names of the tags currently registered.     */    public Set getTagNames ()    {        return (mBlastocyst.keySet ());    }    /**     * Register a tag.     * Registers the given tag under every {@link Tag#getIds() id} that the     * tag has (i.e. all names returned by {@link Tag#getIds() tag.getIds()}.     * <p><strong>For proper operation, the ids are converted to uppercase so     * they will be matched by a Map lookup.</strong>     * @param tag The tag to register.     */    public void registerTag (Tag tag)    {        String[] ids;        ids = tag.getIds ();        for (int i = 0; i < ids.length; i++)

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲欧美在线| 中文字幕一区日韩精品欧美| 成人黄色国产精品网站大全在线免费观看| 亚洲精品精品亚洲| 2020国产精品自拍| 欧美亚洲国产一卡| 成人黄色电影在线| 国产伦精品一区二区三区免费迷| 亚洲精品乱码久久久久久黑人| 精品久久一区二区三区| 欧美性猛交一区二区三区精品| 精品影院一区二区久久久| 亚洲老妇xxxxxx| 国产一区二区三区蝌蚪| 日韩精品专区在线影院重磅| 亚洲高清三级视频| 国产精品乱子久久久久| 欧美日韩精品免费| 亚洲日本一区二区三区| av一区二区三区在线| 日韩制服丝袜先锋影音| 久久―日本道色综合久久| 成人午夜视频福利| 亚洲自拍偷拍图区| 日韩亚洲欧美成人一区| 五月综合激情日本mⅴ| 欧洲生活片亚洲生活在线观看| 一区二区三区精品视频在线| 7777精品伊人久久久大香线蕉的 | 国产精品美女久久福利网站| 精品一区二区三区影院在线午夜| 91精品国产一区二区人妖| 自拍偷拍国产精品| 欧美性xxxxxxxx| 亚洲精品国产无天堂网2021| 色婷婷久久一区二区三区麻豆| 亚洲激情自拍视频| 日韩三级视频在线观看| 国产一区二区三区免费观看| 精品国产一区二区三区四区四| 91精品国产免费| 91网站最新地址| 人人狠狠综合久久亚洲| 国产三级久久久| 91精品国产91久久综合桃花 | 国产精品久久夜| 亚洲妇熟xx妇色黄| 精品久久免费看| 一区二区久久久| 日本一区二区三区高清不卡| 国产人妖乱国产精品人妖| 国产麻豆成人精品| 国产露脸91国语对白| 国产大陆亚洲精品国产| 成人国产精品免费观看视频| 色综合久久久久综合体桃花网| 日本韩国精品一区二区在线观看| 日本精品视频一区二区三区| 欧美日韩视频不卡| 日韩久久久久久| 国产三级精品三级| 亚洲精品国产a| 日产国产高清一区二区三区| 国内精品久久久久影院薰衣草| 国产露脸91国语对白| 91麻豆国产福利在线观看| 欧美日韩国产bt| 久久一留热品黄| 亚洲日本在线看| 免费欧美日韩国产三级电影| 国产成人一区二区精品非洲| 91美女蜜桃在线| 日韩欧美中文一区| 亚洲国产高清在线观看视频| 亚洲一区二区欧美日韩| 狠狠狠色丁香婷婷综合激情| eeuss国产一区二区三区| 欧美日韩五月天| 国产欧美综合色| 偷拍亚洲欧洲综合| 国产精品中文字幕欧美| 日本高清视频一区二区| 欧美不卡一区二区三区四区| 国产精品三级电影| 丝袜美腿亚洲一区| 99国产精品99久久久久久| 7777精品伊人久久久大香线蕉 | 欧洲亚洲精品在线| 欧美刺激午夜性久久久久久久| 中文字幕一区二区三中文字幕| 婷婷综合五月天| 91在线免费看| 精品国产乱码久久久久久老虎| 18欧美乱大交hd1984| 狠狠色综合播放一区二区| 欧美图区在线视频| 亚洲国产成人一区二区三区| 蜜桃视频一区二区三区在线观看| www.亚洲免费av| 久久免费看少妇高潮| 午夜精品一区二区三区免费视频| 成人不卡免费av| 2024国产精品| 日韩不卡免费视频| 色综合视频在线观看| 久久精品一区二区三区不卡牛牛| 五月激情丁香一区二区三区| 91在线精品一区二区三区| 精品动漫一区二区三区在线观看| 亚洲福利一区二区三区| 91免费精品国自产拍在线不卡| 国产校园另类小说区| 麻豆视频观看网址久久| 欧美老人xxxx18| 亚洲综合色婷婷| 色综合色综合色综合| 国产精品视频一二| 国产乱理伦片在线观看夜一区| 91精品国产日韩91久久久久久| 一区二区三区四区激情| 成人av免费网站| 国产精品欧美一区喷水| 国产成人午夜片在线观看高清观看| 777欧美精品| 日韩电影一区二区三区四区| 欧美日韩黄色一区二区| 亚洲一本大道在线| 欧美怡红院视频| 亚洲影院免费观看| 色噜噜狠狠一区二区三区果冻| 国产精品卡一卡二卡三| caoporen国产精品视频| 国产精品视频观看| av色综合久久天堂av综合| 中文字幕欧美激情| a4yy欧美一区二区三区| 亚洲欧洲日本在线| 日本久久一区二区| 亚洲午夜精品网| 91精品国产综合久久香蕉的特点| 天堂一区二区在线| 91麻豆精品国产| 激情深爱一区二区| 久久久久久99久久久精品网站| 国产91精品久久久久久久网曝门 | 777xxx欧美| 久久99久久久久久久久久久| 日韩欧美国产wwwww| 韩日欧美一区二区三区| 中文字幕高清不卡| 一本到三区不卡视频| 亚洲一区二区三区四区在线免费观看| 在线一区二区视频| 日韩精品色哟哟| 久久色中文字幕| a级高清视频欧美日韩| 怡红院av一区二区三区| 欧美疯狂做受xxxx富婆| 国模娜娜一区二区三区| 国产精品毛片久久久久久久| 色八戒一区二区三区| 午夜精品福利视频网站| 日韩免费一区二区| 高清不卡在线观看| 亚洲一级二级三级在线免费观看| 91精品国产综合久久精品app| 国产一区二区三区| 亚洲乱码日产精品bd| 日韩一区二区三区高清免费看看| 国产一二精品视频| 亚洲黄色小视频| 精品国产成人系列| 97se狠狠狠综合亚洲狠狠| 日韩成人精品在线观看| 国产免费久久精品| 欧美日韩视频第一区| 国产成人在线视频网站| 亚洲一区电影777| 久久人人爽人人爽| 欧美日韩视频在线观看一区二区三区| 久久国产精品99精品国产 | 亚洲伦在线观看| 日韩午夜小视频| 97成人超碰视| 久久国内精品自在自线400部| 亚洲色图在线视频| 日韩精品最新网址| 在线观看91精品国产入口| 国产一区二区在线观看视频| 一区二区三区在线观看欧美| 精品国产电影一区二区| 欧洲av一区二区嗯嗯嗯啊| 国产精品18久久久久久久久 | 欧美日韩亚洲综合在线| 国产69精品一区二区亚洲孕妇| 亚洲国产成人tv| 亚洲欧洲色图综合| 久久久久久久久久久久久女国产乱 | 综合欧美一区二区三区| 精品日韩99亚洲|