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

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

?? namespace.java

?? The JDOM build system is based on Jakarta Ant, which is a Java building tool originally developed fo
?? JAVA
字號:
/*-- 

 $Id: Namespace.java,v 1.41 2004/02/27 11:32:57 jhunter Exp $

 Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
 are met:
 
 1. Redistributions of source code must retain the above copyright
    notice, this list of conditions, and the following disclaimer.
 
 2. Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions, and the disclaimer that follows 
    these conditions in the documentation and/or other materials 
    provided with the distribution.

 3. The name "JDOM" must not be used to endorse or promote products
    derived from this software without prior written permission.  For
    written permission, please contact <request_AT_jdom_DOT_org>.
 
 4. Products derived from this software may not be called "JDOM", nor
    may "JDOM" appear in their name, without prior written permission
    from the JDOM Project Management <request_AT_jdom_DOT_org>.
 
 In addition, we request (but do not require) that you include in the 
 end-user documentation provided with the redistribution and/or in the 
 software itself an acknowledgement equivalent to the following:
     "This product includes software developed by the
      JDOM Project (http://www.jdom.org/)."
 Alternatively, the acknowledgment may be graphical using the logos 
 available at http://www.jdom.org/images/logos.

 THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 DISCLAIMED.  IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT
 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 SUCH DAMAGE.

 This software consists of voluntary contributions made by many 
 individuals on behalf of the JDOM Project and was originally 
 created by Jason Hunter <jhunter_AT_jdom_DOT_org> and
 Brett McLaughlin <brett_AT_jdom_DOT_org>.  For more information
 on the JDOM Project, please see <http://www.jdom.org/>.
 
 */

package org.jdom;

import java.util.*;

/**
 * An XML namespace representation, as well as a factory for creating XML
 * namespace objects. Namespaces are not Serializable, however objects that use
 * namespaces have special logic to handle serialization manually. These classes
 * call the getNamespace() method on deserialization to ensure there is one
 * unique Namespace object for any unique prefix/uri pair.
 *
 * @version $Revision: 1.41 $, $Date: 2004/02/27 11:32:57 $
 * @author  Brett McLaughlin
 * @author  Elliotte Rusty Harold
 * @author  Jason Hunter
 * @author  Wesley Biggs
 */
public final class Namespace {

    // XXX May want to use weak references to keep the maps from growing 
    // large with extended use

    // XXX We may need to make the namespaces HashMap synchronized with
    // reader/writer locks or perhaps make Namespace no longer a flyweight.
    // As written, multiple put() calls may happen from different threads 
    // concurrently and cause a ConcurrentModificationException. See
    // http://lists.denveronline.net/lists/jdom-interest/2000-September/003009.html.
    // No one has ever reported this over the many years, so don't worry yet.

    private static final String CVS_ID =
      "@(#) $RCSfile: Namespace.java,v $ $Revision: 1.41 $ $Date: 2004/02/27 11:32:57 $ $Name: jdom_1_0 $";

    /** 
     * Factory list of namespaces. 
     * Keys are <i>prefix</i>&amp;<i>URI</i>. 
     * Values are Namespace objects 
     */
    private static HashMap namespaces;

    /** Define a <code>Namespace</code> for when <i>not</i> in a namespace */
    public static final Namespace NO_NAMESPACE = new Namespace("", "");

    /** Define a <code>Namespace</code> for the standard xml prefix. */
    public static final Namespace XML_NAMESPACE =
        new Namespace("xml", "http://www.w3.org/XML/1998/namespace");

    /** The prefix mapped to this namespace */
    private String prefix;

    /** The URI for this namespace */
    private String uri;

    /**
     * This static initializer acts as a factory contructor.
     * It sets up storage and required initial values.
     */
    static {
        namespaces = new HashMap();

        // Add the "empty" namespace
        namespaces.put("&", NO_NAMESPACE);
        namespaces.put("xml&http://www.w3.org/XML/1998/namespace",
                       XML_NAMESPACE);
    }

    /**
     * This will retrieve (if in existence) or create (if not) a 
     * <code>Namespace</code> for the supplied prefix and URI.
     *
     * @param prefix <code>String</code> prefix to map to 
     *               <code>Namespace</code>.
     * @param uri <code>String</code> URI of new <code>Namespace</code>.
     * @return <code>Namespace</code> - ready to use namespace.
     * @throws IllegalNameException if the given prefix and uri make up
     *         an illegal namespace name.
     */
    public static Namespace getNamespace(String prefix, String uri) {
        // Sanity checking
        if ((prefix == null) || (prefix.trim().equals(""))) {
            prefix = "";
        }
        if ((uri == null) || (uri.trim().equals(""))) {
            uri = "";
        }

        // Return existing namespace if found. The preexisting namespaces
        // should all be legal. In other words, an illegal namespace won't
        // have been placed in this.  Thus we can do this test before
        // verifying the URI and prefix.
        String lookup = new StringBuffer(64)
            .append(prefix).append('&').append(uri).toString();
        Namespace preexisting = (Namespace) namespaces.get(lookup);
        if (preexisting != null) {
            return preexisting;
        }

        // Ensure proper naming
        String reason;
        if ((reason = Verifier.checkNamespacePrefix(prefix)) != null) {
            throw new IllegalNameException(prefix, "Namespace prefix", reason);
        }
        if ((reason = Verifier.checkNamespaceURI(uri)) != null) {
            throw new IllegalNameException(uri, "Namespace URI", reason);
        }

        // Unless the "empty" Namespace (no prefix and no URI), require a URI
        if ((!prefix.equals("")) && (uri.equals(""))) {
            throw new IllegalNameException("", "namespace",
                "Namespace URIs must be non-null and non-empty Strings");
        }

        // Handle XML namespace mislabels. If the user requested the correct
        // namespace and prefix -- xml, http://www.w3.org/XML/1998/namespace
        // -- then it was already returned from the preexisting namespaces.
        // Thus any use of the xml prefix or the
        // http://www.w3.org/XML/1998/namespace URI at this point must be
        // incorrect. 
        if (prefix.equals("xml")) {
            throw new IllegalNameException(prefix, "Namespace prefix",
             "The xml prefix can only be bound to " +
             "http://www.w3.org/XML/1998/namespace");        
        }
        // The erratum to Namespaces in XML 1.0 that suggests this 
        // next check is controversial. Not everyone accepts it. 
        if (uri.equals("http://www.w3.org/XML/1998/namespace")) {
            throw new IllegalNameException(uri, "Namespace URI",
             "The http://www.w3.org/XML/1998/namespace must be bound to " +
             "the xml prefix.");        
        }

        // Finally, store and return
        Namespace ns = new Namespace(prefix, uri);
        namespaces.put(lookup, ns);
        return ns;
    }

    /**
     * This will retrieve (if in existence) or create (if not) a 
     * <code>Namespace</code> for the supplied URI, and make it usable 
     * as a default namespace, as no prefix is supplied.
     *
     * @param uri <code>String</code> URI of new <code>Namespace</code>.
     * @return <code>Namespace</code> - ready to use namespace.
     */
    public static Namespace getNamespace(String uri) {
        return getNamespace("", uri);
    }

    /**
     * This constructor handles creation of a <code>Namespace</code> object
     * with a prefix and URI; it is intentionally left <code>private</code>
     * so that it cannot be invoked by external programs/code.
     *
     * @param prefix <code>String</code> prefix to map to this namespace.
     * @param uri <code>String</code> URI for namespace.
     */
    private Namespace(String prefix, String uri) {
        this.prefix = prefix;
        this.uri = uri;
    }

    /**
     * This returns the prefix mapped to this <code>Namespace</code>.
     *
     * @return <code>String</code> - prefix for this <code>Namespace</code>.
     */
    public String getPrefix() {
        return prefix;
    }

    /**
     * This returns the namespace URI for this <code>Namespace</code>.
     *
     * @return <code>String</code> - URI for this <code>Namespace</code>.
     */
    public String getURI() {
        return uri;
    }

    /**
     * This tests for equality - Two <code>Namespaces</code>
     * are equal if and only if their URIs are byte-for-byte equals.
     *
     * @param ob <code>Object</code> to compare to this <code>Namespace</code>.
     * @return <code>boolean</code> - whether the supplied object is equal to
     *         this <code>Namespace</code>.
     */
    public boolean equals(Object ob) {
        if (this == ob) {
            return true;
        }
        if (ob instanceof Namespace) {  // instanceof returns false if null
            return uri.equals(((Namespace)ob).uri);
        }
        return false;
    }

    /**
     * This returns a <code>String</code> representation of this 
     * <code>Namespace</code>, suitable for use in debugging.
     *
     * @return <code>String</code> - information about this instance.
     */
    public String toString() {
        return "[Namespace: prefix \"" + prefix + "\" is mapped to URI \"" + 
               uri + "\"]";
    }

    /**
     * This returns a probably unique hash code for the <code>Namespace</code>.
     * If two namespaces have the same URI, they are equal and have the same
     * hash code, even if they have different prefixes.
     *
     * @return <code>int</code> - hash code for this <code>Namespace</code>.
     */
    public int hashCode() {
        return uri.hashCode();
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91丨porny丨国产入口| 在线欧美日韩国产| 亚洲国产日韩a在线播放| 欧美大度的电影原声| 日本高清免费不卡视频| 国产精品99久久久久久似苏梦涵 | 亚洲美女精品一区| 精品少妇一区二区三区视频免付费| 丰满白嫩尤物一区二区| 另类小说图片综合网| 7777精品久久久大香线蕉| 99久久夜色精品国产网站| 蜜臀av一区二区在线免费观看 | 日本高清不卡一区| 国产成人免费在线视频| 麻豆精品精品国产自在97香蕉| ㊣最新国产の精品bt伙计久久| 精品国产自在久精品国产| 欧美色视频一区| 91蜜桃网址入口| 国产成人精品www牛牛影视| 久久精品久久99精品久久| 亚洲一区二区精品视频| 亚洲人成精品久久久久| 中文字幕乱码一区二区免费| 精品国产91久久久久久久妲己| 欧美一区二区三区婷婷月色 | 色综合久久88色综合天天6| 国产一区二区在线看| 久久se精品一区二区| 日韩激情视频网站| 亚洲无线码一区二区三区| 亚洲女爱视频在线| 亚洲天天做日日做天天谢日日欢 | 国产剧情一区在线| 久久精品免费观看| 欧美挠脚心视频网站| 91亚洲精华国产精华精华液| 国产iv一区二区三区| 国产精品自拍网站| 国产成人在线色| 国产ts人妖一区二区| 成人午夜激情片| 成人小视频免费在线观看| 成人精品视频网站| av综合在线播放| 99r精品视频| 色丁香久综合在线久综合在线观看| 91在线你懂得| 欧美做爰猛烈大尺度电影无法无天| 色婷婷激情久久| 欧美色男人天堂| 欧美一区二区日韩一区二区| 欧美一二区视频| 久久先锋影音av鲁色资源| 欧美精品一区二区三区很污很色的| 久久久久免费观看| 国产欧美日韩精品在线| 日韩美女视频19| 亚洲1区2区3区视频| 久久69国产一区二区蜜臀| 国产在线视视频有精品| jlzzjlzz亚洲女人18| 在线观看区一区二| 538prom精品视频线放| 精品人在线二区三区| 国产三级一区二区三区| 亚洲视频在线一区二区| 性做久久久久久久久| 精品一区二区综合| 不卡一区二区中文字幕| 欧美熟乱第一页| 精品国产乱码久久久久久久| 国产精品每日更新| 亚洲va欧美va人人爽午夜| 国产综合久久久久久久久久久久| 成年人网站91| 欧美高清性hdvideosex| 久久久久久免费| 亚洲精品国产成人久久av盗摄| 性感美女久久精品| 国产电影精品久久禁18| 欧美一a一片一级一片| 91精品国产一区二区三区| 国产亲近乱来精品视频| 亚洲午夜在线视频| 狠狠色狠狠色综合| 91福利视频网站| 国产色产综合产在线视频| 五月天欧美精品| www.亚洲色图| 精品国产乱码久久久久久影片| 国产精品福利av| 老司机精品视频线观看86| 99久久婷婷国产综合精品| 日韩欧美的一区| 悠悠色在线精品| 国产成人鲁色资源国产91色综| 欧美偷拍一区二区| 国产精品美女久久福利网站| 老司机精品视频在线| 精品视频1区2区3区| 亚洲国产高清不卡| 免费观看日韩电影| 色天天综合色天天久久| 国产视频不卡一区| 美国毛片一区二区三区| 国产精品你懂的| 国模一区二区三区白浆| 欧美日韩精品二区第二页| 亚洲图片你懂的| 国产成人在线免费| 337p日本欧洲亚洲大胆精品| 天天操天天综合网| 色狠狠av一区二区三区| 国产精品久久久久久久久图文区| 国精产品一区一区三区mba视频| 欧美久久一二区| 亚洲一区二区五区| 99国产精品久久久久| 国产精品伦理一区二区| 国产一区二区三区四区五区入口 | 精品久久久久久久久久久久包黑料| 亚洲精品国产品国语在线app| a级精品国产片在线观看| 久久久久国色av免费看影院| 美女网站在线免费欧美精品| 欧美一卡二卡在线| 视频一区二区欧美| 欧美日韩三级一区二区| 亚洲国产欧美另类丝袜| 一本在线高清不卡dvd| 综合色天天鬼久久鬼色| 99精品欧美一区二区三区小说| 国产欧美精品一区二区三区四区 | 国产白丝网站精品污在线入口| 欧美精品一区二区久久久 | 欧美三级在线看| 亚洲国产日韩精品| 欧美日韩国产系列| 午夜久久久久久久久| 欧美电影一区二区三区| 免费人成在线不卡| 日韩欧美亚洲一区二区| 久久9热精品视频| 精品成人一区二区| 国产精品自在欧美一区| 国产精品免费aⅴ片在线观看| av成人免费在线| 亚洲综合图片区| 欧美日韩精品欧美日韩精品一| 免费成人结看片| 国产日韩欧美综合在线| 不卡的看片网站| 亚洲国产精品一区二区久久恐怖片 | 另类成人小视频在线| 久久久久久夜精品精品免费| 成人免费va视频| 尤物av一区二区| 欧美一区二区视频在线观看2020| 久久精品999| 中文字幕一区二区三区在线播放| 色综合av在线| 日韩高清不卡在线| 26uuu亚洲综合色| 91在线观看一区二区| 日日夜夜精品免费视频| 亚洲精品一区二区三区99| av资源网一区| 五月天视频一区| 国产日韩精品视频一区| 一本色道久久综合精品竹菊| 香蕉乱码成人久久天堂爱免费| 欧美精品一区二区三区蜜桃| 国产欧美综合色| 91福利国产精品| 国产综合久久久久影院| 夜夜嗨av一区二区三区| 日韩一区二区免费在线电影| 国产 欧美在线| 亚洲高清视频在线| 久久久www免费人成精品| 91极品美女在线| 国产一区二区三区观看| 亚洲精品中文字幕乱码三区| 精品欧美一区二区在线观看| 91久久久免费一区二区| 极品美女销魂一区二区三区免费| 亚洲精品视频在线| 26uuu亚洲| 欧美日韩国产片| 成人av网站在线| 九一久久久久久| 性做久久久久久| 亚洲欧美在线视频| 精品国产免费久久| 欧美日韩国产首页在线观看| a亚洲天堂av| 国产一区不卡在线| 奇米在线7777在线精品|