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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? prototypicalnodefactory.java

?? 本程序用于對頁面信息進行提取并分析
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
// 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++)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线成人av影院| 日本在线不卡视频一二三区| 国产午夜精品久久久久久久| 欧美哺乳videos| 日韩一级片网站| 日韩一级片网站| 日韩精品一区二区三区在线| 欧美大片一区二区| 精品欧美乱码久久久久久| www国产成人免费观看视频 深夜成人网| 欧美一区二区在线不卡| 欧美一区二区观看视频| 日韩欧美一区二区视频| 精品国产伦一区二区三区观看方式 | 欧美国产成人精品| 久久久久国产精品厨房| 中文字幕免费一区| 中文字幕在线观看一区二区| 夜夜夜精品看看| 午夜日韩在线电影| 开心九九激情九九欧美日韩精美视频电影 | 日韩午夜在线观看| 精品国产一区二区三区久久影院| 久久这里只精品最新地址| 国产性做久久久久久| 国产精品久久久久一区二区三区 | 日本va欧美va欧美va精品| 男男gaygay亚洲| 国产精品一品视频| 99精品在线免费| 欧美调教femdomvk| 日韩精品一区二区三区视频在线观看| 久久久久久久av麻豆果冻| 国产精品婷婷午夜在线观看| 一区二区三区四区亚洲| 日日骚欧美日韩| 国产精品18久久久久久久久久久久| 成人app下载| 欧美日韩1234| 国产亚洲综合性久久久影院| 最新不卡av在线| 亚欧色一区w666天堂| 国产裸体歌舞团一区二区| 99国产精品国产精品久久| 欧美喷潮久久久xxxxx| 欧美tk丨vk视频| 亚洲视频在线观看一区| 日韩电影免费在线看| 国产福利91精品一区二区三区| 色婷婷综合久久久| 制服丝袜一区二区三区| 国产午夜精品一区二区三区嫩草| 一区二区三国产精华液| 看电视剧不卡顿的网站| 91美女片黄在线观看| 日韩一区二区三区观看| 国产精品国产三级国产普通话三级| 午夜成人免费电影| 国产成人免费网站| 欧美日韩1234| 亚洲视频综合在线| 经典三级视频一区| 色狠狠色狠狠综合| 久久这里只有精品6| 亚洲成人av一区二区| 国产成人精品免费| 欧美日韩国产综合草草| 日本一区二区三区dvd视频在线| 日韩精品欧美精品| 99国内精品久久| 337p粉嫩大胆色噜噜噜噜亚洲| 亚洲宅男天堂在线观看无病毒| 粉嫩嫩av羞羞动漫久久久| 91精品一区二区三区久久久久久| 成人欧美一区二区三区黑人麻豆| 老色鬼精品视频在线观看播放| 91老师片黄在线观看| 久久久久综合网| 全部av―极品视觉盛宴亚洲| 色88888久久久久久影院按摩 | 久久av资源网| 欧美日韩一区精品| 亚洲三级理论片| 夫妻av一区二区| 精品国产免费人成在线观看| 日精品一区二区三区| av一区二区三区| 国产日韩欧美麻豆| 久久国产剧场电影| 在线免费观看日本欧美| 中文字幕一区二区三区精华液| 国产美女av一区二区三区| 欧美哺乳videos| 蜜桃视频免费观看一区| 欧美老人xxxx18| 亚洲成人av资源| 欧美日韩免费一区二区三区| 亚洲精品国产品国语在线app| 成人免费毛片片v| 亚洲国产精品黑人久久久 | 日韩欧美国产午夜精品| 亚洲成人一区二区在线观看| 欧美性生交片4| 亚洲一区二区三区在线播放| 91极品视觉盛宴| 一区二区三区四区在线免费观看 | 91啦中文在线观看| 中文字幕一区二区不卡| 成人国产精品免费观看| 欧美韩日一区二区三区四区| 国产99久久久国产精品| 欧美激情资源网| 成人免费毛片app| 中文字幕一区二区在线观看| 色综合久久中文字幕| 亚洲人午夜精品天堂一二香蕉| 99re成人精品视频| 亚洲三级在线观看| 欧美午夜精品一区二区蜜桃 | 欧美在线观看视频一区二区| 亚洲一区二区三区国产| 欧美片网站yy| 蜜桃av噜噜一区| 国产亚洲午夜高清国产拍精品 | 欧美成人精品1314www| 久色婷婷小香蕉久久| 欧美精品一区二区久久婷婷| 国产高清不卡二三区| 国产精品久久福利| 91麻豆国产香蕉久久精品| 亚洲国产日韩a在线播放性色| 欧美一区二区三区日韩| 狠狠色狠狠色合久久伊人| 中文欧美字幕免费| 一本到不卡精品视频在线观看| 亚洲一区二区在线视频| 日韩一区二区在线看| 国产成人免费xxxxxxxx| 亚洲欧美在线视频观看| 欧美日韩精品一区二区天天拍小说 | 一本大道久久a久久精品综合| 一片黄亚洲嫩模| 欧美一二三四区在线| 国产福利一区二区三区| 亚洲影视在线观看| 精品久久久久久无| 不卡欧美aaaaa| 午夜av区久久| 欧美高清在线精品一区| 欧美日韩精品专区| 国产丶欧美丶日本不卡视频| 亚洲自拍偷拍av| 久久日韩粉嫩一区二区三区| 欧美亚洲国产bt| 国产精品综合视频| 一二三区精品福利视频| 久久这里只有精品6| 欧洲人成人精品| 国产精品中文字幕一区二区三区| 樱桃视频在线观看一区| 久久日韩粉嫩一区二区三区| 色吧成人激情小说| 国产美女精品人人做人人爽| 亚洲成人激情av| 国产精品无圣光一区二区| 欧美一级高清片| 在线视频你懂得一区| 国产在线日韩欧美| 亚洲一区二区在线观看视频| 国产欧美日韩另类一区| 欧美日本乱大交xxxxx| 粉嫩一区二区三区在线看| 免费日本视频一区| 亚洲视频在线一区二区| 国产亚洲精品7777| 欧美日韩欧美一区二区| 91丨porny丨首页| 国产一区二区伦理| 爽好久久久欧美精品| 18欧美亚洲精品| 国产日本欧美一区二区| 欧美一区二区久久久| 欧美色成人综合| 99视频国产精品| 国产成人午夜视频| 麻豆久久久久久久| 日韩国产欧美在线观看| 亚洲国产精品一区二区尤物区| 国产精品成人一区二区三区夜夜夜 | 日韩码欧中文字| 久久久国产精品不卡| 日韩一级完整毛片| 欧美电影在哪看比较好| 色乱码一区二区三区88| 不卡一卡二卡三乱码免费网站| 国产福利电影一区二区三区| 国产一区二区剧情av在线| 蜜臀久久久久久久| 无吗不卡中文字幕| 亚洲国产一区二区a毛片|