Lines Matching refs:QName
35 * <p><code>QName</code> represents a <strong>qualified name</strong>
37 * href="http://www.w3.org/TR/xmlschema-2/#QName">XML Schema Part2:
44 * <p>The value of a <code>QName</code> contains a <strong>Namespace
48 * <p>The prefix is included in <code>QName</code> to retain lexical
52 * QName.equals(Object)} or to compute the {@link #hashCode()
53 * QName.hashCode()}. Equality and the hash code are defined using
62 * <p><code>QName</code> is immutable.</p>
66 * @see <a href="http://www.w3.org/TR/xmlschema-2/#QName">
75 public class QName implements Serializable {
80 * <p>Due to a historical defect, QName was released with multiple
88 * <code>com.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0</code>
113 return System.getProperty("com.sun.xml.namespace.QName.useCompatibleSerialVersionUID");
132 * <p>Namespace URI of this <code>QName</code>.</p>
137 * <p>local part of this <code>QName</code>.</p>
142 * <p>prefix of this <code>QName</code>.</p>
147 * <p><code>QName</code> constructor specifying the Namespace URI
156 * behavior with QName 1.0. Explicitly providing the {@link
164 * compatible behavior with QName 1.0. </p>
177 * @param namespaceURI Namespace URI of the <code>QName</code>
178 * @param localPart local part of the <code>QName</code>
183 * @see #QName(String namespaceURI, String localPart, String
184 * prefix) QName(String namespaceURI, String localPart, String
187 public QName(final String namespaceURI, final String localPart) {
192 * <p><code>QName</code> constructor specifying the Namespace URI,
201 * behavior with QName 1.0. Explicitly providing the {@link
209 * compatible behavior with QName 1.0. </p>
224 * @param namespaceURI Namespace URI of the <code>QName</code>
225 * @param localPart local part of the <code>QName</code>
226 * @param prefix prefix of the <code>QName</code>
231 public QName(String namespaceURI, String localPart, String prefix) {
234 // to preserve compatibility with QName 1.0
242 // "" is allowed to preserve compatibility with QName 1.0
245 "local part cannot be \"null\" when creating a QName");
252 "prefix cannot be \"null\" when creating a QName");
258 * <p><code>QName</code> constructor specifying the local part.</p>
263 * compatible behavior with QName 1.0. </p>
273 * construction of a <code>QName</code> helps prevent hard to
275 * #QName(String namespaceURI, String localPart) QName(String
277 * {@link #QName(String namespaceURI, String localPart, String prefix)}
285 * @param localPart local part of the <code>QName</code>
290 * @see #QName(String namespaceURI, String localPart) QName(String
292 * @see #QName(String namespaceURI, String localPart, String
293 * prefix) QName(String namespaceURI, String localPart, String
296 public QName(String localPart) {
304 * <p>Get the Namespace URI of this <code>QName</code>.</p>
306 * @return Namespace URI of this <code>QName</code>
313 * <p>Get the local part of this <code>QName</code>.</p>
315 * @return local part of this <code>QName</code>
322 * <p>Get the prefix of this <code>QName</code>.</p>
324 * <p>The prefix assigned to a <code>QName</code> might
326 * context. For example, a <code>QName</code> may be assigned a
330 * @return prefix of this <code>QName</code>
337 * <p>Test this <code>QName</code> for equality with another
341 * <code>QName</code> or is <code>null</code>, then this method
344 * <p>Two <code>QName</code>s are considered equal if and only if
354 * equality with this <code>QName</code>
356 * equal to this <code>QName</code> else <code>false</code>
363 if (objectToTest == null || !(objectToTest instanceof QName)) {
367 QName qName = (QName) objectToTest;
374 * <p>Generate the hash code for this <code>QName</code>.</p>
377 * the local part of the <code>QName</code>. The prefix is
384 * @return hash code for this <code>QName</code> <code>Object</code>
392 * <code>QName</code>.</p>
394 * <p>The commonly accepted way of representing a <code>QName</code>
400 * This implementation represents a <code>QName</code> as:
412 * @return <code>String</code> representation of this <code>QName</code>
423 * <p><code>QName</code> derived from parsing the formatted
427 * {@link #toString() QName.toString()} formatting, an
431 * form returned by {@link #toString() QName.toString()}.</em></p>
433 * <p>The commonly accepted way of representing a <code>QName</code>
450 * <code>QName</code>.
459 * of the <code>QName</code>
464 * @return <code>QName</code> corresponding to the given <code>String</code>
465 * @see #toString() QName.toString()
467 public static QName valueOf(String qNameAsString) {
472 "cannot create QName from \"null\" or \"\" String");
475 // "" local part is valid to preserve compatible behavior with QName 1.0
477 return new QName(
485 return new QName(
507 "cannot create QName from \""
511 return new QName(