Package com.adobe.xfa

Class Attribute

    • Constructor Detail

      • Attribute

        public Attribute​(String qName,
                         String value)
        Instantiates an attribute, with the given attribute value.
        Parameters:
        qName - the attribute name.
        value - the attribute value.
      • Attribute

        public Attribute​(String NS,
                         String localName,
                         String qName,
                         String value)
        Instantiates an attribute, with the given attribute parameters.
        Parameters:
        NS - the namespace of this attribute.
        localName - the local name of this attribute.
        qName - the qualified name of this attribute.
        value - the value of this attribute.
    • Method Detail

      • getAttrValue

        public final String getAttrValue()
        Gets this attribute's value.
        Returns:
        the attribute value.
      • getLocalName

        public final String getLocalName()
        Gets this attribute's local name.
        Returns:
        The local part of the name (everything after the ":")
      • getName

        public final String getName()
        Gets this attribute's local name.
        Returns:
        Returns the local name.
      • getNS

        public String getNS()
        Gets this attribute's namespace.
        Returns:
        Returns the namespace.
      • getPrefix

        public final String getPrefix()
        Gets this attribute's namespace prefix.
        Returns:
        the attribute namespace prefix.
      • getQName

        public final String getQName()
        Gets this attribute's qualified name.
        Returns:
        the qualified name.
      • isEmpty

        public final boolean isEmpty()
        Determines if this attribute's value is empty (or null).
        Returns:
        true if this attribute's value is empty and false otherwise.
      • isNameSpaceAttr

        public final boolean isNameSpaceAttr()
        Determines if this attribute is a name space attribute.
        Returns:
        true if this is a name space attribute and false otherwise.
      • isXSINilAttr

        public final boolean isXSINilAttr()
        the URI for xsi has many variants by date e.g. http://www.w3.org/[this section may vary]/XMLSchema-instance Pre-2001 used the "null" attribute, the 2001 version rename this to "nil" We recognize any combination of nil or null with any XMLSchema-instance namespace URI.
        Returns:
        true if this attribute represents the xsi:nil attribute, or one of its variants.
      • isSchemaAttr

        public boolean isSchemaAttr()
        Determine if an attribute is a schema attribute.
        Returns:
        true this is a schema attribute.
      • newAttribute

        public abstract Attribute newAttribute​(String value)
        Create a new attribute, given a new value
        Parameters:
        value - the string to use to create the new attribute
        Returns:
        a new attribute
      • newAttribute

        public abstract Attribute newAttribute​(String NS,
                                               String localName,
                                               String qName,
                                               String value)
        Create a new attribute, given all attribute parameters
        Parameters:
        NS - the namespace for this attribute
        localName - the local name for this attribute
        qName - the qualified name for this attribute
        value - the string to use to create the new attribute
        Returns:
        a new attribute
      • newAttribute

        public abstract Attribute newAttribute​(String NS,
                                               String localName,
                                               String qName,
                                               String value,
                                               boolean internSymbols)
        Create a new attribute, given all attribute parameters
        Parameters:
        NS - the namespace for this attribute
        localName - the local name for this attribute
        qName - the qualified name for this attribute
        value - the string to use to create the new attribute
        internSymbols - indicates whether the symbols in other parameters need to be interned.
        Returns:
        a new attribute
      • normalize

        public void normalize()
        Normalizes this attribute. This base class implementation simply does nothing, other than allow derived classes the opportunity to do something.