|
Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10680-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.xmlsec.util.QName
public class QName
Class representing an XML qualified name of the form [prefix:]localName
, encapsulating a local name, namespace URI, and optional namespace prefix.
QName instances are immutable.
Constructor Summary | |
---|---|
QName(java.lang.String localPart, java.lang.String namespace, java.lang.String prefix) Creates a new QName instance with the given local name, prefix and namespace URI. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj) Compares this QName to the given object. |
static boolean |
equals(java.lang.String qn1, org.w3c.dom.Node context1, java.lang.String qn2, org.w3c.dom.Node context2) Compares the two given QName strings. |
static QName |
getInstance(java.lang.String qnameValue, XMLElement element) Returns a QName object based on the qnamevalue and the element where the qnamevalue was included. |
java.lang.String |
getLocalPart() Returns this QName's local name. |
static java.lang.String |
getLocalPart(java.lang.String qname) Returns the local name for the given QName string. |
java.lang.String |
getNamespace() Returns this QName's namespace URI. |
java.lang.String |
getPrefix() Returns this QName's namespace prefix. |
static java.lang.String |
getPrefixPart(java.lang.String qname) Returns the namespace prefix for the given QName string. |
int |
hashCode() |
static java.lang.String |
resolvePrefix(java.lang.String qname, org.w3c.dom.Node context) Returns the namespace URI that is in scope for the given QName 's prefix part, in the context of the given node. |
static void |
setQNameValue(org.w3c.dom.Node node, QName qname) Set the QName value on the Node passed as a parameter. |
java.lang.String |
toString() Returns a string representation of this QName of the form [prefix:]localName. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QName(java.lang.String localPart, java.lang.String namespace, java.lang.String prefix)
QName
instance with the given local name, prefix and namespace URI.
localPart
- This QName's name string.namespace
- This QName's namespace URI.prefix
- This QName's namespace prefix (optional).Method Detail |
---|
public java.lang.String getLocalPart()
public java.lang.String getNamespace()
public java.lang.String getPrefix()
public boolean equals(java.lang.Object obj)
QName
to the given object.equals
in class java.lang.Object
obj
- The object to compare to this QName
.true
if obj is a QName
instance with the same local name and namespace URI as this QName
; otherwise returns false
. Note: Namespace prefixes are ignored for purposes of determining equality of QNames.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
QName
of the form [prefix:]localName.toString
in class java.lang.Object
public static boolean equals(java.lang.String qn1, org.w3c.dom.Node context1, java.lang.String qn2, org.w3c.dom.Node context2)
qn1
- The first QName.context1
- The context node to use for resolving the namespace of qn1.qn2
- The second QName.context2
- The context node to use for resolving the namespace of qn2.true
if the given QNames have the same local names and namespace URIs; otherwise returns false
. Namespace prefixes are resolved with respect to the given context nodes for the comparison.public static java.lang.String resolvePrefix(java.lang.String qname, org.w3c.dom.Node context)
QName
's prefix part, in the context of the given node.null
if none could be resolved. Returns the default namespace in scope if this QName
has no prefix part.public static java.lang.String getPrefixPart(java.lang.String qname)
qname
- A qualified name string of the form [prefix:]localName
.""
if none is present).public static java.lang.String getLocalPart(java.lang.String qname)
qname
- A qualified name string of the form [prefix:]localName
.public static void setQNameValue(org.w3c.dom.Node node, QName qname)
node
- The XML Node where the QName has to be included (AttributeNode, ElementNode...).qname
- The QName object containing the value to be added.org.w3c.dom.DOMException
- if the prefix and namespace from the QName object are inconsistent with the node where the QName value should be addedpublic static QName getInstance(java.lang.String qnameValue, XMLElement element)
qnameValue
- The QName value to parse.element
- The XML Element where the QName value is extracted from.
|
Oracle Fusion Middleware XML Security Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10680-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |