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 voidaddXMLBase(XMLObject xmlObject, String base) Adds axml:baseattribute to the given XML object.static voidAdds axml:idattribute to the given XML object.static voidaddXMLLang(XMLObject xmlObject, String lang) Adds axml:langattribute to the given XML object.static voidaddXMLSpace(XMLObject xmlObject, SpaceBearing.XMLSpaceEnum space) Adds axml:spaceattribute to the given XML object.static StringgetXMLBase(XMLObject xmlObject) Gets thexml:baseattribute from a given XML object.static StringGets thexml:idattribute from a given XML object.static StringgetXMLLang(XMLObject xmlObject) Gets thexml:langattribute from a given XML object.static SpaceBearing.XMLSpaceEnumgetXMLSpace(XMLObject xmlObject) Gets thexml:spaceattribute from a given XML object.
-
Constructor Details
-
XMLAttributeSupport
private XMLAttributeSupport()Private constructor.
-
-
Method Details
-
addXMLId
Adds axml:idattribute to the given XML object.- Parameters:
xmlObject- the XML object to which to add the attributeid- the Id value
-
getXMLId
Gets thexml:idattribute 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:langattribute to the given XML object.- Parameters:
xmlObject- the XML object to which to add the attributelang- the lang value
-
getXMLLang
Gets thexml:langattribute 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:baseattribute to the given XML object.- Parameters:
xmlObject- the XML object to which to add the attributebase- the base value
-
getXMLBase
Gets thexml:baseattribute 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
public static void addXMLSpace(@Nonnull XMLObject xmlObject, @Nonnull SpaceBearing.XMLSpaceEnum space) Adds axml:spaceattribute to the given XML object.- Parameters:
xmlObject- the XML object to which to add the attributespace- the space value
-
getXMLSpace
Gets thexml:spaceattribute 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
-