|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensaml.XML
Utility classes for XML constants and optimizations
Nested Class Summary | |
static class |
XML.ParserPool
Nested class that provides XML parsers as a pooled resource |
Field Summary | |
protected SAMLConfig |
config
OpenSAML configuration |
static String |
OPENSAML_NS
OpenSAML XML namespace |
static XML.ParserPool |
parserPool
A global object to manage a pool of custom DOM parsers |
static String |
SAML_ARTIFACT_SOURCEID
|
static String |
SAML_NS
SAML XML namespace |
static String |
SAML_SCHEMA_ID
SAML XML Schema Identifier |
static String |
SAML10_PROTOCOL_ENUM
SAML 1.x Metadata Profile protocol indicators and namespace |
static String |
SAML11_PROTOCOL_ENUM
|
static String |
SAML11_SCHEMA_ID
SAML 1.1 XML Schema Identifier |
static String |
SAMLP_NS
SAML protocol XML namespace |
static String |
SAMLP_SCHEMA_ID
SAML protocol XML Schema Identifier |
static String |
SAMLP11_SCHEMA_ID
SAML 1.1 protocol XML Schema Identifier |
static String |
SOAP11ENV_NS
SOAP 1.1 Envelope XML namespace |
static String |
SOAP11ENV_SCHEMA_ID
SOAP 1.1 Envelope Schema Identifier |
static String |
XML_NS
XML core namespace |
static String |
XML_SCHEMA_ID
XML core schema identifier |
static String |
XMLNS_NS
XML namespace for xmlns attributes |
static String |
XMLSIG_NS
XML Signature namespace |
static String |
XMLSIG_SCHEMA_ID
XML Signature Schema Identifier |
static String |
XSD_NS
XML Schema Instance namespace |
static String |
XSI_NS
XML Schema Instance namespace |
Constructor Summary | |
XML()
|
Method Summary | |
static String |
assign(String s)
A "safe" assignment function for strings that blocks the empty string |
static Element |
getFirstChildElement(Node n)
Gets the first child Element of the node, skipping any Text nodes such as whitespace. |
static Element |
getFirstChildElement(Node n,
String ns,
String localName)
Gets the first child Element of the node of the given name, skipping any Text nodes such as whitespace. |
static Element |
getLastChildElement(Node n)
Gets the last child Element of the node, skipping any Text nodes such as whitespace. |
static Element |
getLastChildElement(Node n,
String ns,
String localName)
Gets the last child Element of the node of the given name, skipping any Text nodes such as whitespace. |
static String |
getNamespaceForPrefix(String prefix,
Element e)
Gets the XML namespace URI that is mapped to the specified prefix, in the context of the DOM element e |
static String |
getNamespaceForQName(String qname,
Element e)
Gets the XML namespace URI that is mapped to the prefix of a QName, in the context of the DOM element e |
static Element |
getNextSiblingElement(Node n)
Gets the next sibling Element of the node, skipping any Text nodes such as whitespace. |
static Element |
getNextSiblingElement(Node n,
String ns,
String localName)
Gets the next sibling Element of the node of the given name, skipping any Text nodes such as whitespace. |
static Element |
getPreviousSiblingElement(Node n)
Gets the previous sibling Element of the node, skipping any Text nodes such as whitespace. |
static Element |
getPreviousSiblingElement(Node n,
String ns,
String localName)
Gets the previous sibling Element of the node of the given name, skipping any Text nodes such as whitespace. |
static QName |
getQNameAttribute(Element e,
String namespace,
String name)
Builds a QName from a QName-valued attribute by evaluating it |
static QName |
getQNameTextNode(Text t)
Builds a QName from a QName-valued text node by evaluating it |
static boolean |
isElementNamed(Element e,
String ns,
String localName)
Shortcut for checking a DOM element node's namespace and local name |
static boolean |
isEmpty(String s)
A "safe" null/empty check for strings. |
static boolean |
safeCompare(String s1,
String s2)
Compares two strings for equality, allowing for nulls |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected SAMLConfig config
public static final String XML_NS
public static final String XMLNS_NS
public static final String XSI_NS
public static final String XSD_NS
public static final String OPENSAML_NS
public static final String SAML_NS
public static final String SAMLP_NS
public static final String SAML10_PROTOCOL_ENUM
public static final String SAML11_PROTOCOL_ENUM
public static final String SAML_ARTIFACT_SOURCEID
public static final String XMLSIG_NS
public static final String SOAP11ENV_NS
public static final String XML_SCHEMA_ID
public static final String SAML_SCHEMA_ID
public static final String SAMLP_SCHEMA_ID
public static final String SAML11_SCHEMA_ID
public static final String SAMLP11_SCHEMA_ID
public static final String XMLSIG_SCHEMA_ID
public static final String SOAP11ENV_SCHEMA_ID
public static XML.ParserPool parserPool
Constructor Detail |
public XML()
Method Detail |
public static boolean isEmpty(String s)
s
- The string to check
public static String assign(String s)
s
- The string to check
public static boolean safeCompare(String s1, String s2)
s1
- The first operands2
- The second operand
public static boolean isElementNamed(Element e, String ns, String localName)
e
- An element to compare againstns
- An XML namespace to comparelocalName
- A local name to compare
public static Element getFirstChildElement(Node n)
n
- The parent in which to search for children
public static Element getLastChildElement(Node n)
n
- The parent in which to search for children
public static Element getFirstChildElement(Node n, String ns, String localName)
n
- The parent in which to search for childrenns
- The namespace URI of the element to locatelocalName
- The local name of the element to locate
public static Element getLastChildElement(Node n, String ns, String localName)
n
- The parent in which to search for childrenns
- The namespace URI of the element to locatelocalName
- The local name of the element to locate
public static Element getNextSiblingElement(Node n)
n
- The sibling to start with
public static Element getPreviousSiblingElement(Node n)
n
- The sibling to start with
public static Element getNextSiblingElement(Node n, String ns, String localName)
n
- The sibling to start withns
- The namespace URI of the element to locatelocalName
- The local name of the element to locate
public static Element getPreviousSiblingElement(Node n, String ns, String localName)
n
- The sibling to start withns
- The namespace URI of the element to locatelocalName
- The local name of the element to locate
public static QName getQNameAttribute(Element e, String namespace, String name)
e
- The element containing the attributenamespace
- The namespace of the attributename
- The local name of the attribute
public static QName getQNameTextNode(Text t)
t
- The text node containing the QName value
public static String getNamespaceForQName(String qname, Element e)
qname
- The QName value to map a prefix frome
- The DOM element in which to calculate the prefix binding
public static String getNamespaceForPrefix(String prefix, Element e)
prefix
- The namespace prefix to mape
- The DOM element in which to calculate the prefix binding
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |