APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.util

public final Class AttributesProxy

extends Object
implements AttributeList, Attributes2
Class Inheritance
All Implemented Interfaces
org.xml.sax.ext.Attributes2, org.xml.sax.Attributes, org.xml.sax.AttributeList
Annotations
@SuppressWarnings:deprecation
Imports
com.sun.org.apache.xerces.internal.impl.Constants, com.sun.org.apache.xerces.internal.xni.XMLAttributes, org.xml.sax.AttributeList, org.xml.sax.ext.Attributes2

References Deprecated

AttributeList is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Wraps XMLAttributes and makes it look like AttributeList and Attributes.
Authors
Arnaud Le Hors, IBM, Andy Clark, IBM

Field Summary

Modifier and TypeField and Description
private XMLAttributes
fAttributes

XML attributes.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public XMLAttributes
public int
getIndex(String qName)

Implements org.xml.sax.Attributes.getIndex.

Look up the index of an attribute by XML qualified (prefixed) name.

public int
getIndex(String uri, String localPart)

Implements org.xml.sax.Attributes.getIndex.

Look up the index of an attribute by Namespace name.

public int
getLength()

Implements org.xml.sax.AttributeList.getLength, org.xml.sax.Attributes.getLength.

Return the number of attributes in this list.

public String
getLocalName(int index)

Implements org.xml.sax.Attributes.getLocalName.

Look up an attribute's local name by index.

public String
getName(int i)

Implements org.xml.sax.AttributeList.getName.

Return the name of an attribute in this list (by position).

public String
getQName(int index)

Implements org.xml.sax.Attributes.getQName.

Look up an attribute's XML qualified (prefixed) name by index.

public String
getType(int i)

Implements org.xml.sax.AttributeList.getType, org.xml.sax.Attributes.getType.

Return the type of an attribute in the list (by position).

public String
getType(String name)

Implements org.xml.sax.AttributeList.getType, org.xml.sax.Attributes.getType.

Return the type of an attribute in the list (by name).

public String
getType(String uri, String localName)

Implements org.xml.sax.Attributes.getType.

Look up an attribute's type by Namespace name.

public String
getURI(int index)

Implements org.xml.sax.Attributes.getURI.

Look up an attribute's Namespace URI by index.

public String
getValue(int i)

Implements org.xml.sax.AttributeList.getValue, org.xml.sax.Attributes.getValue.

Return the value of an attribute in the list (by position).

public String
getValue(String name)

Implements org.xml.sax.AttributeList.getValue, org.xml.sax.Attributes.getValue.

Return the value of an attribute in the list (by name).

public String
getValue(String uri, String localName)

Implements org.xml.sax.Attributes.getValue.

Look up an attribute's value by Namespace name.

public boolean
isDeclared(int index)

Implements org.xml.sax.ext.Attributes2.isDeclared.

Returns false unless the attribute was declared in the DTD.

public boolean
isDeclared(String qName)

Implements org.xml.sax.ext.Attributes2.isDeclared.

Returns false unless the attribute was declared in the DTD.

public boolean
isDeclared(String uri, String localName)

Implements org.xml.sax.ext.Attributes2.isDeclared.

Returns false unless the attribute was declared in the DTD.

public boolean
isSpecified(int index)

Implements org.xml.sax.ext.Attributes2.isSpecified.

Returns true unless the attribute value was provided by DTD defaulting.

public boolean
isSpecified(String qName)

Implements org.xml.sax.ext.Attributes2.isSpecified.

Returns true unless the attribute value was provided by DTD defaulting.

public boolean
isSpecified(String uri, String localName)

Implements org.xml.sax.ext.Attributes2.isSpecified.

Returns true unless the attribute value was provided by DTD defaulting.

public void
setAttributes(XMLAttributes attributes)

Sets the XML attributes to be wrapped.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fAttributesback to summary
private XMLAttributes fAttributes

XML attributes.

Constructor Detail

AttributesProxyback to summary
public AttributesProxy(XMLAttributes attributes)

Method Detail

getAttributesback to summary
public XMLAttributes getAttributes()
getIndexback to summary
public int getIndex(String qName)

Implements org.xml.sax.Attributes.getIndex.

Doc from org.xml.sax.Attributes.getIndex.

Look up the index of an attribute by XML qualified (prefixed) name.

getIndexback to summary
public int getIndex(String uri, String localPart)

Implements org.xml.sax.Attributes.getIndex.

Doc from org.xml.sax.Attributes.getIndex.

Look up the index of an attribute by Namespace name.

getLengthback to summary
public int getLength()

Implements org.xml.sax.AttributeList.getLength, org.xml.sax.Attributes.getLength.

Doc from org.xml.sax.AttributeList.getLength.

Return the number of attributes in this list.

The SAX parser may provide attributes in any arbitrary order, regardless of the order in which they were declared or specified. The number of attributes may be zero.

getLocalNameback to summary
public String getLocalName(int index)

Implements org.xml.sax.Attributes.getLocalName.

Doc from org.xml.sax.Attributes.getLocalName.

Look up an attribute's local name by index.

getNameback to summary
public String getName(int i)

Implements org.xml.sax.AttributeList.getName.

Doc from org.xml.sax.AttributeList.getName.

Return the name of an attribute in this list (by position).

The names must be unique: the SAX parser shall not include the same attribute twice. Attributes without values (those declared #IMPLIED without a value specified in the start tag) will be omitted from the list.

If the attribute name has a namespace prefix, the prefix will still be attached.

getQNameback to summary
public String getQName(int index)

Implements org.xml.sax.Attributes.getQName.

Doc from org.xml.sax.Attributes.getQName.

Look up an attribute's XML qualified (prefixed) name by index.

getTypeback to summary
public String getType(int i)

Implements org.xml.sax.AttributeList.getType, org.xml.sax.Attributes.getType.

Doc from org.xml.sax.AttributeList.getType.

Return the type of an attribute in the list (by position).

The attribute type is one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" (always in upper case).

If the parser has not read a declaration for the attribute, or if the parser does not report attribute types, then it must return the value "CDATA" as stated in the XML 1.0 Recommentation (clause 3.3.3, "Attribute-Value Normalization").

For an enumerated attribute that is not a notation, the parser will report the type as "NMTOKEN".

getTypeback to summary
public String getType(String name)

Implements org.xml.sax.AttributeList.getType, org.xml.sax.Attributes.getType.

Doc from org.xml.sax.AttributeList.getType.

Return the type of an attribute in the list (by name).

The return value is the same as the return value for getType(int).

If the attribute name has a namespace prefix in the document, the application must include the prefix here.

getTypeback to summary
public String getType(String uri, String localName)

Implements org.xml.sax.Attributes.getType.

Doc from org.xml.sax.Attributes.getType.

Look up an attribute's type by Namespace name.

See getType(int) for a description of the possible types.

getURIback to summary
public String getURI(int index)

Implements org.xml.sax.Attributes.getURI.

Doc from org.xml.sax.Attributes.getURI.

Look up an attribute's Namespace URI by index.

getValueback to summary
public String getValue(int i)

Implements org.xml.sax.AttributeList.getValue, org.xml.sax.Attributes.getValue.

Doc from org.xml.sax.AttributeList.getValue.

Return the value of an attribute in the list (by position).

If the attribute value is a list of tokens (IDREFS, ENTITIES, or NMTOKENS), the tokens will be concatenated into a single string separated by whitespace.

getValueback to summary
public String getValue(String name)

Implements org.xml.sax.AttributeList.getValue, org.xml.sax.Attributes.getValue.

Doc from org.xml.sax.AttributeList.getValue.

Return the value of an attribute in the list (by name).

The return value is the same as the return value for getValue(int).

If the attribute name has a namespace prefix in the document, the application must include the prefix here.

getValueback to summary
public String getValue(String uri, String localName)

Implements org.xml.sax.Attributes.getValue.

Doc from org.xml.sax.Attributes.getValue.

Look up an attribute's value by Namespace name.

See getValue(int) for a description of the possible values.

isDeclaredback to summary
public boolean isDeclared(int index)

Implements org.xml.sax.ext.Attributes2.isDeclared.

Doc from org.xml.sax.ext.Attributes2.isDeclared.

Returns false unless the attribute was declared in the DTD. This helps distinguish two kinds of attributes that SAX reports as CDATA: ones that were declared (and hence are usually valid), and those that were not (and which are never valid).

isDeclaredback to summary
public boolean isDeclared(String qName)

Implements org.xml.sax.ext.Attributes2.isDeclared.

Doc from org.xml.sax.ext.Attributes2.isDeclared.

Returns false unless the attribute was declared in the DTD. This helps distinguish two kinds of attributes that SAX reports as CDATA: ones that were declared (and hence are usually valid), and those that were not (and which are never valid).

isDeclaredback to summary
public boolean isDeclared(String uri, String localName)

Implements org.xml.sax.ext.Attributes2.isDeclared.

Doc from org.xml.sax.ext.Attributes2.isDeclared.

Returns false unless the attribute was declared in the DTD. This helps distinguish two kinds of attributes that SAX reports as CDATA: ones that were declared (and hence are usually valid), and those that were not (and which are never valid).

Remember that since DTDs do not "understand" namespaces, the namespace URI associated with an attribute may not have come from the DTD. The declaration will have applied to the attribute's qName.

isSpecifiedback to summary
public boolean isSpecified(int index)

Implements org.xml.sax.ext.Attributes2.isSpecified.

Doc from org.xml.sax.ext.Attributes2.isSpecified.

Returns true unless the attribute value was provided by DTD defaulting.

isSpecifiedback to summary
public boolean isSpecified(String qName)

Implements org.xml.sax.ext.Attributes2.isSpecified.

Doc from org.xml.sax.ext.Attributes2.isSpecified.

Returns true unless the attribute value was provided by DTD defaulting.

isSpecifiedback to summary
public boolean isSpecified(String uri, String localName)

Implements org.xml.sax.ext.Attributes2.isSpecified.

Doc from org.xml.sax.ext.Attributes2.isSpecified.

Returns true unless the attribute value was provided by DTD defaulting.

Remember that since DTDs do not "understand" namespaces, the namespace URI associated with an attribute may not have come from the DTD. The declaration will have applied to the attribute's qName.

setAttributesback to summary
public void setAttributes(XMLAttributes attributes)

Sets the XML attributes to be wrapped.