Package com.helger.xml.microdom
Interface IMicroAttribute
-
- All Superinterfaces:
com.helger.commons.lang.ICloneable<IMicroAttribute>,Serializable
- All Known Implementing Classes:
MicroAttribute
public interface IMicroAttribute extends Serializable, com.helger.commons.lang.ICloneable<IMicroAttribute>
Represents a single attribute within an element (=tag).- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default QNamegetAsXMLQName()default QNamegetAsXMLQName(String sPrefix)default StringgetAttributeName()Get the (local) name of the attribute.IMicroQNamegetAttributeQName()Get the qualified name of the attribute.StringgetAttributeValue()IMicroAttributegetClone()default StringgetNamespaceURI()Get the namespace URI of this attributedefault booleanhasNamespaceURI()Check if this attribute has a specified namespace URI.default booleanhasNamespaceURI(String sNamespaceURI)Check if this attribute has the specified namespace URI.default booleanhasNoNamespaceURI()Check if this attribute has no namespace URI.com.helger.commons.state.EChangesetAttributeValue(String sAttributeValue)Set the value of the attribute.
-
-
-
Method Detail
-
getNamespaceURI
@Nullable default String getNamespaceURI()
Get the namespace URI of this attribute- Returns:
- May be
nullif this attribute has no namespace URI.
-
hasNamespaceURI
default boolean hasNamespaceURI()
Check if this attribute has a specified namespace URI.- Returns:
trueif this attribute has a specified namespace URI,falseotherwise
-
hasNoNamespaceURI
default boolean hasNoNamespaceURI()
Check if this attribute has no namespace URI.- Returns:
trueif this attribute has no namespace URI,falseotherwise
-
hasNamespaceURI
default boolean hasNamespaceURI(@Nullable String sNamespaceURI)
Check if this attribute has the specified namespace URI.- Parameters:
sNamespaceURI- The namespace URI to check. May not benull.- Returns:
trueif this attribute has the specified namespace URI,falseotherwise
-
getAttributeName
@Nonnull default String getAttributeName()
Get the (local) name of the attribute. It never contains XML schema prefixes or the like.- Returns:
- The name of the attribute and never
null.
-
getAttributeQName
@Nonnull IMicroQName getAttributeQName()
Get the qualified name of the attribute. It never contains XML schema prefixes or the like.- Returns:
- The qualified name (namespace URI + local name) of the attribute
and never
null.
-
getAsXMLQName
@Nonnull default QName getAsXMLQName()
- Returns:
- The regular XML QName of this attribute using an empty prefix.
-
getAsXMLQName
@Nonnull default QName getAsXMLQName(@Nonnull String sPrefix)
- Parameters:
sPrefix- the namespace prefix to be used in the resulting object. May not benullbut maybe empty.- Returns:
- The regular XML QName of this attribute using the provided prefix.
-
getAttributeValue
@Nonnull String getAttributeValue()
- Returns:
- The value associated with this attribute. Never
null.
-
setAttributeValue
@Nonnull com.helger.commons.state.EChange setAttributeValue(@Nonnull String sAttributeValue)
Set the value of the attribute.- Parameters:
sAttributeValue- The new value to be set. May not benull.- Returns:
EChange.
-
getClone
@Nonnull IMicroAttribute getClone()
- Specified by:
getClonein interfacecom.helger.commons.lang.ICloneable<IMicroAttribute>
-
-