Class AttrValue


  • @API(type=EXTENDABLE,
         src=PUBLIC)
    public class AttrValue
    extends java.lang.Object
    Contains informations about an attribute value. WARNING: This class should be immutable. Objects of this class are sometimes cached in the AuthorDocumentHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static AttrValue EMPTY_VALUE
      Empty attribute value constant.
    • Constructor Summary

      Constructors 
      Constructor Description
      AttrValue​(java.lang.String specifiedValue)
      Constructor for the attribute value.
      AttrValue​(java.lang.String normalizedValue, java.lang.String rawValue, boolean isSpecified)
      Constructor for the attribute value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getRawValue()
      Get the attribute's raw value.
      java.lang.String getValue()
      Get the attribute normalized value.
      int hashCode()  
      boolean isSpecified()
      Checks if the attribute was specified in the XML document or comes as a default value from the schema, DTD, etc..
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • EMPTY_VALUE

        public static final AttrValue EMPTY_VALUE
        Empty attribute value constant.
    • Constructor Detail

      • AttrValue

        public AttrValue​(java.lang.String specifiedValue)
        Constructor for the attribute value.
        Parameters:
        specifiedValue - The simple attribute value which will be used both as raw value and normalized value.
      • AttrValue

        public AttrValue​(java.lang.String normalizedValue,
                         java.lang.String rawValue,
                         boolean isSpecified)
        Constructor for the attribute value.
        Parameters:
        normalizedValue - Attribute normalized value (with entities expanded and WS's collapsed).
        rawValue - Attribute raw value (as it is specified in text with no white space collapsed and entities not expanded).
        isSpecified - true if specified in XML, false if this is a default value.
    • Method Detail

      • getValue

        public java.lang.String getValue()
        Get the attribute normalized value.
        Returns:
        The attribute normalized value (with entities expanded and white spaces collapsed).
      • getRawValue

        public java.lang.String getRawValue()
        Get the attribute's raw value.
        Returns:
        Attribute raw value (as it is specified in text with no white space collapsed and entities not expanded).
      • isSpecified

        public boolean isSpecified()
        Checks if the attribute was specified in the XML document or comes as a default value from the schema, DTD, etc..
        Returns:
        true if the element is specified in XML, false if this is a default value.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()