Skip navigation links

Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10680-03


oracle.security.xmlsec.util
Class QNameNode

java.lang.Object
  extended by oracle.security.xmlsec.util.XMLNode
      extended by oracle.security.xmlsec.util.QNameNode


public class QNameNode
extends XMLNode

Class representing an XML Text node with the format [prefix:]localName.

Since:
2.2

Field Summary

 

Fields inherited from class oracle.security.xmlsec.util.XMLNode
node, systemId

 

Constructor Summary
QNameNode(org.w3c.dom.Document owner, java.lang.String qname)
          Creates a new QNameNode in the given document from the specified qualified name string.
QNameNode(org.w3c.dom.Document owner, java.lang.String prefix, java.lang.String localName)
          Creates a new QNameNode in the given document from the specified prefix and local name.
QNameNode(org.w3c.dom.Text node)
          Creates a new QNameNode to wrap the given org.w3c.dom.Text node, whose value must be a valid XML qualified name.

 

Method Summary
 boolean equals(java.lang.Object obj)
          Compares this QNameNode to the given object.
 java.lang.String getLocalPart()
          Returns the local name for this QNameNode's value.
 java.lang.String getPrefixPart()
          Returns the namespace prefix for this QNameNode's value.
 int hashCode()
          Returns a hashcode for this QNameNode.
 java.lang.String resolvePrefix()
          Returns the namespace URI that is in scope for this QNameNode's prefix part.
 void setLocalPart(java.lang.String localName)
          Sets the local name for this QNameNode's value.
 void setPrefixPart(java.lang.String prefix)
          Sets the namespace prefix for this QNameNode's value.
 QName toQName()
          Creates a new QName instance with this QNameNode's local name, namespace URI and prefix.

 

Methods inherited from class oracle.security.xmlsec.util.XMLNode
appendChild, appendChild, appendTo, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNode, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getSystemId, hasAttributes, hasChildNodes, insertBefore, insertBefore, isSupported, normalize, removeChild, removeChild, replaceChild, replaceChild, setNodeValue, setPrefix, setSystemId, toBytesXML, toStringXML

 

Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

QNameNode

public QNameNode(org.w3c.dom.Text node)
          throws org.w3c.dom.DOMException
Creates a new QNameNode to wrap the given org.w3c.dom.Text node, whose value must be a valid XML qualified name.
Parameters:
node - A text node containing an XML qualified name.
Throws:
org.w3c.dom.DOMException

QNameNode

public QNameNode(org.w3c.dom.Document owner,
                 java.lang.String prefix,
                 java.lang.String localName)
          throws org.w3c.dom.DOMException
Creates a new QNameNode in the given document from the specified prefix and local name.
Parameters:
owner - The owner document for the new QNameNode.
prefix - The namespace prefix.
localName - The local part of the qualified name.
Throws:
org.w3c.dom.DOMException

QNameNode

public QNameNode(org.w3c.dom.Document owner,
                 java.lang.String qname)
          throws org.w3c.dom.DOMException
Creates a new QNameNode in the given document from the specified qualified name string.
Parameters:
owner - The owner document for the new QNameNode.
qname - A qualified name string of the form [prefix:]localName.
Throws:
org.w3c.dom.DOMException

Method Detail

setPrefixPart

public void setPrefixPart(java.lang.String prefix)
                   throws org.w3c.dom.DOMException
Sets the namespace prefix for this QNameNode's value.
Parameters:
prefix - The namespace prefix for this QNameNode's value. To remove this QNameNode's prefix, set it to "" or null.
Throws:
org.w3c.dom.DOMException

getPrefixPart

public java.lang.String getPrefixPart()
Returns the namespace prefix for this QNameNode's value.
Returns:
The namespace prefix for this QNameNode's value ("" if none is present).

setLocalPart

public void setLocalPart(java.lang.String localName)
                  throws org.w3c.dom.DOMException
Sets the local name for this QNameNode's value.
Parameters:
localName - The local name for this QNameNode's value (may not be "" or null).
Throws:
org.w3c.dom.DOMException

getLocalPart

public java.lang.String getLocalPart()
                              throws org.w3c.dom.DOMException
Returns the local name for this QNameNode's value.
Returns:
The local name for this QNameNode's value.
Throws:
org.w3c.dom.DOMException

resolvePrefix

public java.lang.String resolvePrefix()
Returns the namespace URI that is in scope for this QNameNode's prefix part.
Returns:
A URI string, or null if none could be resolved. Returns the default namespace in scope if this QNameNode has no prefix part.

toQName

public QName toQName()
Creates a new QName instance with this QNameNode's local name, namespace URI and prefix.
Returns:
A QName instance.
Since:
2.3.0

equals

public boolean equals(java.lang.Object obj)
Compares this QNameNode to the given object.
Overrides:
equals in class java.lang.Object
Parameters:
obj - The object to compare to this QNameNode.
Returns:
true if the given object is a QNameNode that has the same local name and the same namespace URI as this QNameNode; otherwise returns false. Namespace prefixes are resolved for the comparison.
Since:
2.1

hashCode

public int hashCode()
Returns a hashcode for this QNameNode.
Overrides:
hashCode in class java.lang.Object
Since:
2.1

Skip navigation links

Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10680-03


Copyright © 2005, 2011 , Oracle. All rights reserved.