annotate WebServiceToolWorkflow/lib/SAWADLParser/src/javax/xml/namespace/QName.java @ 0:d5cd409b8a18 default tip

Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
author ganjoo
date Tue, 07 Jun 2011 18:00:50 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
1 //$Id: QName.java,v 1.10 2004/02/09 23:41:21 jsuttor Exp $
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
2
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
3 /*
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
4 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
5 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
6 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
7
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
8 package javax.xml.namespace;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
9
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
10 import java.io.Serializable;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
11
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
12 import javax.xml.XMLConstants;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
13
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
14 /**
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
15 * <p><code>QName</code> represents a <strong>qualified name</strong>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
16 * as defined in the XML specifications: <a
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
17 * href="http://www.w3.org/TR/xmlschema-2/#QName">XML Schema Part2:
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
18 * Datatypes specification</a>, <a
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
19 * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">Namespaces
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
20 * in XML</a>, <a
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
21 * href="http://www.w3.org/XML/xml-names-19990114-errata">Namespaces
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
22 * in XML Errata</a>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
23 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
24 * <p>The value of a <code>QName</code> contains a <strong>Namespace
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
25 * URI</strong>, <strong>local part</strong> and
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
26 * <strong>prefix</strong>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
27 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
28 * <p>The prefix is included in <code>QName</code> to retain lexical
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
29 * information <strong><em>when present</em></strong> in an {@link
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
30 * javax.xml.transform.Source XML input source}. The prefix is
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
31 * <strong><em>NOT</em></strong> used in {@link #equals(Object)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
32 * QName.equals(Object)} or to compute the {@link #hashCode()
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
33 * QName.hashCode()}. Equality and the hash code are defined using
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
34 * <strong><em>only</em></strong> the Namespace URI and local part.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
35 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
36 * <p>If not specified, the Namespace URI is set to {@link
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
37 * javax.xml.XMLConstants#NULL_NS_URI XMLConstants.NULL_NS_URI}.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
38 * If not specified, the prefix is set to {@link
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
39 * javax.xml.XMLConstants#DEFAULT_NS_PREFIX
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
40 * XMLConstants.DEFAULT_NS_PREFIX}.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
41 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
42 * <p><code>QName</code> is immutable.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
43 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
44 * @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
45 * @version $Revision: 1.10 $, $Date: 2004/02/09 23:41:21 $
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
46 * @see <a href="http://www.w3.org/TR/xmlschema-2/#QName">XML Schema Part2: Datatypes specification</a>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
47 * @see <a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">Namespaces in XML</a>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
48 * @see <a href="http://www.w3.org/XML/xml-names-19990114-errata">Namespaces in XML Errata</a>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
49 * @since 1.5
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
50 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
51
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
52 public class QName implements Serializable {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
53
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
54 /**
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
55 * <p>Stream Unique Identifier.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
56 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
57 private static final long serialVersionUID = 4418622981026545151L;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
58
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
59 /**
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
60 * <p>Namespace URI of this <code>QName</code>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
61 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
62 private final String namespaceURI;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
63
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
64 /**
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
65 * <p>local part of this <code>QName</code>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
66 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
67 private final String localPart;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
68
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
69 /**
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
70 * <p>prefix of this <code>QName</code>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
71 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
72 private final String prefix;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
73
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
74 /**
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
75 * <p><code>QName</code> constructor specifying the Namespace URI
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
76 * and local part.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
77 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
78 * <p>If the Namespace URI is <code>null</code>, it is set to
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
79 * {@link javax.xml.XMLConstants#NULL_NS_URI
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
80 * XMLConstants.NULL_NS_URI}. This value represents no
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
81 * explicitly defined Namespace as defined by the <a
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
82 * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">Namespaces
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
83 * in XML</a> specification. This action preserves compatible
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
84 * behavior with QName 1.0. Explicitly providing the {@link
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
85 * javax.xml.XMLConstants#NULL_NS_URI
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
86 * XMLConstants.NULL_NS_URI} value is the preferred coding
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
87 * style.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
88 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
89 * <p>If the local part is <code>null</code> an
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
90 * <code>IllegalArgumentException</code> is thrown.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
91 * A local part of "" is allowed to preserve
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
92 * compatible behavior with QName 1.0. </p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
93 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
94 * <p>When using this constructor, the prefix is set to {@link
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
95 * javax.xml.XMLConstants#DEFAULT_NS_PREFIX
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
96 * XMLConstants.DEFAULT_NS_PREFIX}.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
97 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
98 * <p>The Namespace URI is not validated as a
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
99 * <a href="http://www.ietf.org/rfc/rfc2396.txt">URI reference</a>.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
100 * The local part is not validated as a
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
101 * <a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</a>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
102 * as specified in <a href="http://www.w3.org/TR/REC-xml-names/">Namespaces
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
103 * in XML</a>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
104 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
105 * @param namespaceURI Namespace URI of the <code>QName</code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
106 * @param localPart local part of the <code>QName</code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
107 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
108 * @see #QName(String namespaceURI, String localPart, String
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
109 * prefix) QName(String namespaceURI, String localPart, String
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
110 * prefix)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
111 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
112 public QName(final String namespaceURI, final String localPart) {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
113 this(namespaceURI, localPart, XMLConstants.DEFAULT_NS_PREFIX);
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
114 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
115
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
116 /**
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
117 * <p><code>QName</code> constructor specifying the Namespace URI,
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
118 * local part and prefix.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
119 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
120 * <p>If the Namespace URI is <code>null</code>, it is set to
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
121 * {@link javax.xml.XMLConstants#NULL_NS_URI
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
122 * XMLConstants.NULL_NS_URI}. This value represents no
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
123 * explicitly defined Namespace as defined by the <a
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
124 * href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">Namespaces
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
125 * in XML</a> specification. This action preserves compatible
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
126 * behavior with QName 1.0. Explicitly providing the {@link
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
127 * javax.xml.XMLConstants#NULL_NS_URI
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
128 * XMLConstants.NULL_NS_URI} value is the preferred coding
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
129 * style.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
130 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
131 * <p>If the local part is <code>null</code> an
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
132 * <code>IllegalArgumentException</code> is thrown.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
133 * A local part of "" is allowed to preserve
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
134 * compatible behavior with QName 1.0. </p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
135 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
136 * <p>If the prefix is <code>null</code>, an
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
137 * <code>IllegalArgumentException</code> is thrown. Use {@link
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
138 * javax.xml.XMLConstants#DEFAULT_NS_PREFIX
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
139 * XMLConstants.DEFAULT_NS_PREFIX} to explicitly indicate that no
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
140 * prefix is present or the prefix is not relevant.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
141 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
142 * <p>The Namespace URI is not validated as a
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
143 * <a href="http://www.ietf.org/rfc/rfc2396.txt">URI reference</a>.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
144 * The local part and prefix are not validated as a
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
145 * <a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</a>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
146 * as specified in <a href="http://www.w3.org/TR/REC-xml-names/">Namespaces
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
147 * in XML</a>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
148 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
149 * @param namespaceURI Namespace URI of the <code>QName<code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
150 * @param localPart local part of the <code>QName<code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
151 * @param prefix prefix of the <code>QName<code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
152 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
153 public QName(String namespaceURI, String localPart, String prefix) {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
154
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
155 // map null Namespace URI to default to preserve compatibility with QName 1.0
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
156 if (namespaceURI == null) {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
157 this.namespaceURI = XMLConstants.NULL_NS_URI;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
158 } else {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
159 this.namespaceURI = namespaceURI;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
160 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
161
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
162 // local part is required. "" is allowed to preserve compatibility with QName 1.0
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
163 if (localPart == null) {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
164 throw new IllegalArgumentException("local part cannot be \"null\" when creating a QName");
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
165 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
166 this.localPart = localPart;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
167
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
168 // prefix is required
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
169 if (prefix == null) {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
170 throw new IllegalArgumentException("prefix cannot be \"null\" when creating a QName");
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
171 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
172 this.prefix = prefix;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
173 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
174
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
175 /**
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
176 * <p><code>QName</code> constructor specifying the local part.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
177 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
178 * <p>If the local part is <code>null</code> an
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
179 * <code>IllegalArgumentException</code> is thrown.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
180 * A local part of "" is allowed to preserve
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
181 * compatible behavior with QName 1.0. </p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
182 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
183 * <p>When using this constructor, the Namespace URI is set to
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
184 * {@link javax.xml.XMLConstants#NULL_NS_URI
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
185 * XMLConstants.NULL_NS_URI} and the prefix is set to {@link
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
186 * javax.xml.XMLConstants#DEFAULT_NS_PREFIX
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
187 * XMLConstants.DEFAULT_NS_PREFIX}.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
188 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
189 * <p><em>In an XML context, all Element and Attribute names exist
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
190 * in the context of a Namespace. Making this explicit during the
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
191 * construction of a <code>QName</code> helps prevent hard to
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
192 * diagnosis XML validity errors. The constructors {@link
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
193 * #QName(String namespaceURI, String localPart) QName(String
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
194 * namespaceURI, String localPart)} and
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
195 * {@link #QName(String namespaceURI, String localPart, String prefix)}
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
196 * are preferred.</em></p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
197 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
198 * <p>The local part is not validated as a
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
199 * <a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</a>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
200 * as specified in <a href="http://www.w3.org/TR/REC-xml-names/">Namespaces
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
201 * in XML</a>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
202 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
203 * @param localPart local part of the <code>QName</code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
204 * @see #QName(String namespaceURI, String localPart) QName(String
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
205 * namespaceURI, String localPart)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
206 * @see #QName(String namespaceURI, String localPart, String
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
207 * prefix) QName(String namespaceURI, String localPart, String
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
208 * prefix)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
209 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
210 public QName(String localPart) {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
211 this(
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
212 XMLConstants.NULL_NS_URI,
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
213 localPart,
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
214 XMLConstants.DEFAULT_NS_PREFIX);
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
215 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
216
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
217 /**
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
218 * <p>Get the Namespace URI of this <code>QName</code>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
219 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
220 * @return Namespace URI of this <code>QName</code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
221 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
222 public String getNamespaceURI() {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
223 return namespaceURI;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
224 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
225
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
226 /**
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
227 * <p>Get the local part of this <code>QName</code>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
228 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
229 * @return local part of this <code>QName</code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
230 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
231 public String getLocalPart() {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
232 return localPart;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
233 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
234
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
235 /**
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
236 * <p>Get the prefix of this <code>QName</code>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
237 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
238 * <p>The prefix assigned to a <code>QName</code> might
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
239 * <strong><em>NOT</em></strong> be valid in a different
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
240 * context. For example, a <code>QName</code> may be assigned a
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
241 * prefix in the context of parsing a document but that prefix may
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
242 * be invalid in the context of a different document.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
243 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
244 * @return prefix of this <code>QName</code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
245 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
246 public String getPrefix() {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
247 return prefix;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
248 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
249
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
250 /**
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
251 * <p>Test this <code>QName</code> for equality with another
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
252 * <code>Object</code>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
253 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
254 * <p>If the <code>Object</code> to be tested is not a
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
255 * <code>QName</code> or is <code>null</code>, then this method
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
256 * returns <code>false</code>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
257 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
258 * <p>Two <code>QName</code>s are considered equal if and only if
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
259 * both the Namespace URI and local part are equal. This method
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
260 * uses <code>String.equals()</code> to check equality of the
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
261 * Namespace URI and local part. The prefix is
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
262 * <strong><em>NOT</em></strong> used to determine equality.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
263 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
264 * <p>This method satisfies the general contract of {@link
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
265 * java.lang.Object#equals(Object) Object.equals(Object)}</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
266 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
267 * @param objectToTest the <code>Object</code> to test for
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
268 * equality with this <code>QName</code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
269 * @return <code>true</code> if the given <code>Object</code> is
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
270 * equal to this <code>QName</code> else <code>false</code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
271 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
272 public final boolean equals(Object objectToTest) {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
273 if (objectToTest == null || !(objectToTest instanceof QName)) {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
274 return false;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
275 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
276
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
277 QName qName = (QName) objectToTest;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
278
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
279 return namespaceURI.equals(qName.namespaceURI)
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
280 && localPart.equals(qName.localPart);
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
281 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
282
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
283 /**
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
284 * <p>Generate the hash code for this <code>QName</code>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
285 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
286 * <p>The hash code is calculated using both the Namespace URI and
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
287 * the local part of the <code>QName</code>. The prefix is
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
288 * <strong><em>NOT</em></strong> used to calculate the hash
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
289 * code.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
290 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
291 * <p>This method satisfies the general contract of {@link
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
292 * java.lang.Object#hashCode() Object.hashCode()}.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
293 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
294 * @return hash code for this <code>QName</code> <code>Object</code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
295 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
296 public final int hashCode() {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
297 return namespaceURI.hashCode() ^ localPart.hashCode();
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
298 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
299
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
300 /**
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
301 * <p><code>String</code> representation of this
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
302 * <code>QName</code>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
303 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
304 * <p>The commonly accepted way of representing a <code>QName</code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
305 * as a <code>String</code> was <a href="http://jclark.com/xml/xmlns.htm">defined</a>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
306 * by James Clark. Although this is not a <em>standard</em>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
307 * specification, it is in common use, e.g. {@link javax.xml.transform.Transformer#setParameter(String name, Object value)}.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
308 * This implementation represents a <code>QName</code> as:
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
309 * "{" + Namespace URI + "}" + local part. If the Namespace URI
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
310 * <code>.equals(XMLConstants.NULL_NS_URI)</code>, only the
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
311 * local part is returned. An appropriate use of this method is
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
312 * for debugging or logging for human consumption.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
313 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
314 * <p>Note the prefix value is <strong><em>NOT</em></strong>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
315 * returned as part of the <code>String</code> representation.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
316 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
317 * <p>This method satisfies the general contract of {@link
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
318 * java.lang.Object#toString() Object.toString()}.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
319 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
320 * @return <code>String</code> representation of this <code>QName</code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
321 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
322 public String toString() {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
323 if (namespaceURI.equals(XMLConstants.NULL_NS_URI)) {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
324 return localPart;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
325 } else {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
326 return "{" + namespaceURI + "}" + localPart;
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
327 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
328 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
329
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
330 /**
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
331 * <p><code>QName</code> derived from parsing the formatted
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
332 * <code>String</code>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
333 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
334 * <p>If the <code>String</code> is <code>null</code> or does not conform to
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
335 * {@link #toString() QName.toString()} formatting, an
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
336 * <code>IllegalArgumentException</code> is thrown.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
337 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
338 * <p><em>The <code>String</code> <strong>MUST</strong> be in the
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
339 * form returned by {@link #toString() QName.toString()}.</em></p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
340
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
341 * <p>The commonly accepted way of representing a <code>QName</code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
342 * as a <code>String</code> was <a href="http://jclark.com/xml/xmlns.htm">defined</a>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
343 * by James Clark. Although this is not a <em>standard</em>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
344 * specification, it is in common use, e.g. {@link javax.xml.transform.Transformer#setParameter(String name, Object value)}.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
345 * This implementation parses a <code>String</code> formatted
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
346 * as: "{" + Namespace URI + "}" + local part. If the Namespace
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
347 * URI <code>.equals(XMLConstants.NULL_NS_URI)</code>, only the
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
348 * local part should be provided.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
349 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
350 * <p>The prefix value <strong><em>CANNOT</em></strong> be
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
351 * represented in the <code>String</code> and will be set to
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
352 * {@link javax.xml.XMLConstants#DEFAULT_NS_PREFIX
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
353 * XMLConstants.DEFAULT_NS_PREFIX}.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
354 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
355 * <p>This method does not do full validation of the resulting
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
356 * <code>QName</code>.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
357 * <p>The Namespace URI is not validated as a
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
358 * <a href="http://www.ietf.org/rfc/rfc2396.txt">URI reference</a>.
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
359 * The local part is not validated as a
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
360 * <a href="http://www.w3.org/TR/REC-xml-names/#NT-NCName">NCName</a>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
361 * as specified in
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
362 * <a href="http://www.w3.org/TR/REC-xml-names/">Namespaces in XML</a>.</p>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
363 *
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
364 * @param qNameAsString <code>String</code> representation
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
365 * of the <code>QName</code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
366 * @return <code>QName</code> corresponding to the given <code>String</code>
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
367 * @see #toString() QName.toString()
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
368 */
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
369 public static QName valueOf(String qNameAsString) {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
370
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
371 // null is not valid
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
372 if (qNameAsString == null) {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
373 throw new IllegalArgumentException("cannot create QName from \"null\" or \"\" String");
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
374 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
375
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
376 // "" local part is valid to preserve compatible behavior with QName 1.0
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
377 if (qNameAsString.length() == 0) {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
378 return new QName(
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
379 XMLConstants.NULL_NS_URI,
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
380 qNameAsString,
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
381 XMLConstants.DEFAULT_NS_PREFIX);
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
382 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
383
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
384 // local part only?
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
385 if (qNameAsString.charAt(0) != '{') {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
386 return new QName(
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
387 XMLConstants.NULL_NS_URI,
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
388 qNameAsString,
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
389 XMLConstants.DEFAULT_NS_PREFIX);
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
390 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
391
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
392 // Namespace URI improperly specified?
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
393 if (qNameAsString.startsWith("{" + XMLConstants.NULL_NS_URI + "}")) {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
394 throw new IllegalArgumentException(
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
395 "Namespace URI .equals(XMLConstants.NULL_NS_URI), "
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
396 + ".equals(\"" + XMLConstants.NULL_NS_URI + "\"), "
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
397 + "only the local part, "
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
398 + "\"" + qNameAsString.substring(2 + XMLConstants.NULL_NS_URI.length()) + "\", "
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
399 + "should be provided.");
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
400 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
401
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
402 // Namespace URI and local part specified
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
403 int endOfNamespaceURI = qNameAsString.indexOf('}');
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
404 if (endOfNamespaceURI == -1) {
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
405 throw new IllegalArgumentException(
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
406 "cannot create QName from \""
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
407 + qNameAsString
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
408 + "\", missing closing \"}\"");
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
409 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
410 return new QName(
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
411 qNameAsString.substring(1, endOfNamespaceURI),
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
412 qNameAsString.substring(endOfNamespaceURI + 1),
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
413 XMLConstants.DEFAULT_NS_PREFIX);
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
414 }
d5cd409b8a18 Migrated tool version 1.0.0 from old tool shed archive to new tool shed repository
ganjoo
parents:
diff changeset
415 }