Package org.opensaml.core.xml.util
Class XMLAttributeSupport
java.lang.Object
org.opensaml.core.xml.util.XMLAttributeSupport
Helper methods for working with global attributes from the XML namespace. These are namely:
- xml:id
- xml:lang
- xml:base
- xml:space
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addXMLBase
(XMLObject xmlObject, String base) Adds axml:base
attribute to the given XML object.static void
Adds axml:id
attribute to the given XML object.static void
addXMLLang
(XMLObject xmlObject, String lang) Adds axml:lang
attribute to the given XML object.static void
addXMLSpace
(XMLObject xmlObject, SpaceBearing.XMLSpaceEnum space) Adds axml:space
attribute to the given XML object.static String
getXMLBase
(XMLObject xmlObject) Gets thexml:base
attribute from a given XML object.static String
Gets thexml:id
attribute from a given XML object.static String
getXMLLang
(XMLObject xmlObject) Gets thexml:lang
attribute from a given XML object.static SpaceBearing.XMLSpaceEnum
getXMLSpace
(XMLObject xmlObject) Gets thexml:space
attribute from a given XML object.
-
Constructor Details
-
XMLAttributeSupport
private XMLAttributeSupport()Private constructor.
-
-
Method Details
-
addXMLId
Adds axml:id
attribute to the given XML object.- Parameters:
xmlObject
- the XML object to which to add the attributeid
- the Id value
-
getXMLId
Gets thexml:id
attribute from a given XML object.- Parameters:
xmlObject
- the XML object from which to extract the attribute- Returns:
- the value of the xml:id attribute, or null if not present
-
addXMLLang
Adds axml:lang
attribute to the given XML object.- Parameters:
xmlObject
- the XML object to which to add the attributelang
- the lang value
-
getXMLLang
Gets thexml:lang
attribute from a given XML object.- Parameters:
xmlObject
- the XML object from which to extract the attribute- Returns:
- the value of the xml:lang attribute, or null if not present
-
addXMLBase
Adds axml:base
attribute to the given XML object.- Parameters:
xmlObject
- the XML object to which to add the attributebase
- the base value
-
getXMLBase
Gets thexml:base
attribute from a given XML object.- Parameters:
xmlObject
- the XML object from which to extract the attribute- Returns:
- the value of the xml:base attribute, or null if not present
-
addXMLSpace
Adds axml:space
attribute to the given XML object.- Parameters:
xmlObject
- the XML object to which to add the attributespace
- the space value
-
getXMLSpace
Gets thexml:space
attribute from a given XML object.- Parameters:
xmlObject
- the XML object from which to extract the attribute- Returns:
- the value of the xml:space attribute, or null if not present
-