Geen cache-versie.

Caching uitgeschakeld. Standaardinstelling voor deze pagina:ingeschakeld (code LNG204)
Als het scherm te langzaam is, kunt u de gebruikersmodus uitschakelen om de cacheversie te bekijken.
org.xml.sax.ext

Class Attributes2Impl

  • All Implemented Interfaces:
    Attributes, Attributes2

    public class Attributes2Impl
    extends AttributesImpl
    implements Attributes2
    SAX2 extension helper for additional Attributes information, implementing the Attributes2 interface.
    This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.

    This is not part of core-only SAX2 distributions.

    The specified flag for each attribute will always be true, unless it has been set to false in the copy constructor or using setSpecified(int, boolean). Similarly, the declared flag for each attribute will always be false, except for defaulted attributes (specified is false), non-CDATA attributes, or when it is set to true using setDeclared(int, boolean). If you change an attribute's type by hand, you may need to modify its declared flag to match.

    Since:
    SAX 2.0 (extensions 1.1 alpha)
    • Constructor Detail

      • Attributes2Impl

        public Attributes2Impl()
        Construct a new, empty Attributes2Impl object.
      • Attributes2Impl

        public Attributes2Impl(Attributes atts)
        Copy an existing Attributes or Attributes2 object. If the object implements Attributes2, values of the specified and declared flags for each attribute are copied. Otherwise the flag values are defaulted to assume no DTD was used, unless there is evidence to the contrary (such as attributes with type other than CDATA, which must have been declared).

        This constructor is especially useful inside a startElement event.

        Parameters:
        atts - The existing Attributes object.
    • Method Detail

      • isDeclared

        public boolean isDeclared(int index)
        Returns the current value of the attribute's "declared" flag.
        Specified by:
        isDeclared in interface Attributes2
        Parameters:
        index - The attribute index (zero-based).
        Returns:
        true if the attribute was declared in the DTD, false otherwise.
      • isDeclared

        public boolean isDeclared(String uri,
                         String localName)
        Returns the current value of the attribute's "declared" flag.
        Specified by:
        isDeclared in interface Attributes2
        Parameters:
        uri - The Namespace URI, or the empty string if the name has no Namespace URI.
        localName - The attribute's local name.
        Returns:
        true if the attribute was declared in the DTD, false otherwise.
      • isDeclared

        public boolean isDeclared(String qName)
        Returns the current value of the attribute's "declared" flag.
        Specified by:
        isDeclared in interface Attributes2
        Parameters:
        qName - The XML qualified (prefixed) name.
        Returns:
        true if the attribute was declared in the DTD, false otherwise.
      • isSpecified

        public boolean isSpecified(int index)
        Returns the current value of an attribute's "specified" flag.
        Specified by:
        isSpecified in interface Attributes2
        Parameters:
        index - The attribute index (zero-based).
        Returns:
        current flag value
        Throws:
        ArrayIndexOutOfBoundsException - When the supplied index does not identify an attribute.
      • isSpecified

        public boolean isSpecified(String uri,
                          String localName)
        Returns the current value of an attribute's "specified" flag.
        Specified by:
        isSpecified in interface Attributes2
        Parameters:
        uri - The Namespace URI, or the empty string if the name has no Namespace URI.
        localName - The attribute's local name.
        Returns:
        current flag value
        Throws:
        IllegalArgumentException - When the supplied names do not identify an attribute.
      • isSpecified

        public boolean isSpecified(String qName)
        Returns the current value of an attribute's "specified" flag.
        Specified by:
        isSpecified in interface Attributes2
        Parameters:
        qName - The XML qualified (prefixed) name.
        Returns:
        current flag value
        Throws:
        IllegalArgumentException - When the supplied name does not identify an attribute.
      • setAttributes

        public void setAttributes(Attributes atts)
        Copy an entire Attributes object. The "specified" flags are assigned as true, and "declared" flags as false (except when an attribute's type is not CDATA), unless the object is an Attributes2 object. In that case those flag values are all copied.
        Overrides:
        setAttributes in class AttributesImpl
        Parameters:
        atts - The attributes to copy.
        See Also:
        AttributesImpl.setAttributes(org.xml.sax.Attributes)
      • removeAttribute

        public void removeAttribute(int index)
        Description copied from class: AttributesImpl
        Remove an attribute from the list.
        Overrides:
        removeAttribute in class AttributesImpl
        Parameters:
        index - The index of the attribute (zero-based).
      • setDeclared

        public void setDeclared(int index,
                       boolean value)
        Assign a value to the "declared" flag of a specific attribute. This is normally needed only for attributes of type CDATA, including attributes whose type is changed to or from CDATA.
        Parameters:
        index - The index of the attribute (zero-based).
        value - The desired flag value.
        Throws:
        ArrayIndexOutOfBoundsException - When the supplied index does not identify an attribute.
        See Also:
        AttributesImpl.setType(int, java.lang.String)
      • setSpecified

        public void setSpecified(int index,
                        boolean value)
        Assign a value to the "specified" flag of a specific attribute. This is the only way this flag can be cleared, except clearing by initialization with the copy constructor.
        Parameters:
        index - The index of the attribute (zero-based).
        value - The desired flag value.
        Throws:
        ArrayIndexOutOfBoundsException - When the supplied index does not identify an attribute.

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-org/xml/sax/ext/attributes2impl.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.

Inhoudsopgave Haut