|
BEA Systems, Inc. | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object weblogic.apache.xerces.dom.DOMNormalizer.XMLAttributesProxy
Field Summary | |
protected AttributeMap |
fAttributes
|
protected Vector |
fAugmentations
|
protected CoreDocumentImpl |
fDocument
|
protected ElementImpl |
fElement
|
Constructor Summary | |
protected |
DOMNormalizer.XMLAttributesProxy()
|
Method Summary | |
int |
addAttribute(QName attrQName,
String attrType,
String attrValue)
|
Augmentations |
getAugmentations(int attributeIndex)
|
Augmentations |
getAugmentations(String qName)
|
Augmentations |
getAugmentations(String uri,
String localPart)
|
int |
getIndex(String qName)
Look up the index of an attribute by XML 1.0 qualified name. |
int |
getIndex(String uri,
String localPart)
Look up the index of an attribute by Namespace name. |
int |
getLength()
Returns the number of attributes in the list. |
String |
getLocalName(int index)
Look up an attribute's local name by index. |
void |
getName(int attrIndex,
QName attrName)
|
String |
getNonNormalizedValue(int attrIndex)
Returns the non-normalized value of the attribute at the specified index. |
String |
getPrefix(int index)
Returns the prefix of the attribute at the specified index. |
String |
getQName(int index)
Look up an attribute's XML 1.0 qualified name by index. |
String |
getType(int index)
Look up an attribute's type by index. |
String |
getType(String qName)
Look up an attribute's type by XML 1.0 qualified name. |
String |
getType(String uri,
String localName)
Look up an attribute's type by Namespace name. |
String |
getURI(int index)
Look up an attribute's Namespace URI by index. |
String |
getValue(int index)
Look up an attribute's value by index. |
String |
getValue(String qName)
Look up an attribute's value by XML 1.0 qualified name. |
String |
getValue(String uri,
String localName)
Look up an attribute's value by Namespace name. |
boolean |
isSpecified(int attrIndex)
Returns true if the attribute is specified in the instance document. |
void |
removeAllAttributes()
Removes all of the attributes. |
void |
removeAttributeAt(int attrIndex)
Removes the attribute at the specified index. |
void |
setAttributes(AttributeMap attributes,
CoreDocumentImpl doc,
ElementImpl elem)
|
void |
setName(int attrIndex,
QName attrName)
|
void |
setNonNormalizedValue(int attrIndex,
String attrValue)
Sets the non-normalized value of the attribute at the specified index. |
void |
setSpecified(int attrIndex,
boolean specified)
Sets whether an attribute is specified in the instance document or not. |
void |
setType(int attrIndex,
String attrType)
Sets the type of the attribute at the specified index. |
void |
setValue(int attrIndex,
String attrValue)
Sets the value of the attribute at the specified index. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected AttributeMap fAttributes
protected final Vector fAugmentations
protected CoreDocumentImpl fDocument
protected ElementImpl fElement
Constructor Detail |
protected DOMNormalizer.XMLAttributesProxy()
Method Detail |
public int addAttribute(QName attrQName, String attrType, String attrValue)
XMLAttributes
setNonNormalizedValue
method. Also,
the added attribute will be marked as specified in the XML instance
document unless set otherwise using the setSpecified
method.
Note: If an attribute of the same name already exists, the old values for the attribute are replaced by the new values.
addAttribute
in interface XMLAttributes
attrQName
- The attribute name.attrType
- The attribute type. The type name is determined by
the type specified for this attribute in the DTD.
For example: "CDATA", "ID", "NMTOKEN", etc. However,
attributes of type enumeration will have the type
value specified as the pipe ('|') separated list of
the enumeration values prefixed by an open
parenthesis and suffixed by a close parenthesis.
For example: "(true|false)".attrValue
- The attribute value.
XMLAttributes.setNonNormalizedValue(int, java.lang.String)
,
XMLAttributes.setSpecified(int, boolean)
public Augmentations getAugmentations(int attributeIndex)
XMLAttributes
getAugmentations
in interface XMLAttributes
attributeIndex
- The attribute index.
public Augmentations getAugmentations(String qName)
XMLAttributes
getAugmentations
in interface XMLAttributes
qName
- The XML 1.0 qualified name.
public Augmentations getAugmentations(String uri, String localPart)
XMLAttributes
getAugmentations
in interface XMLAttributes
uri
- The Namespace URI, or the empty string if
the name has no Namespace URI.localPart
-
public int getIndex(String qName)
XMLAttributes
getIndex
in interface XMLAttributes
qName
- The qualified (prefixed) name.
public int getIndex(String uri, String localPart)
XMLAttributes
getIndex
in interface XMLAttributes
uri
- The Namespace URI, or the empty string if
the name has no Namespace URI.
public int getLength()
XMLAttributes
Once you know the number of attributes, you can iterate through the list.
getLength
in interface XMLAttributes
XMLAttributes.getURI(int)
,
XMLAttributes.getLocalName(int)
,
XMLAttributes.getQName(int)
,
XMLAttributes.getType(int)
,
XMLAttributes.getValue(int)
public String getLocalName(int index)
XMLAttributes
getLocalName
in interface XMLAttributes
index
- The attribute index (zero-based).
XMLAttributes.getLength()
public void getName(int attrIndex, QName attrName)
XMLAttributes
getName
in interface XMLAttributes
attrIndex
- The attribute index.attrName
- The attribute name structure to fill in.public String getNonNormalizedValue(int attrIndex)
XMLAttributes
getValue(int)
method.
getNonNormalizedValue
in interface XMLAttributes
attrIndex
- The attribute index.public String getPrefix(int index)
XMLAttributes
getPrefix
in interface XMLAttributes
index
- The index of the attribute.public String getQName(int index)
XMLAttributes
getQName
in interface XMLAttributes
index
- The attribute index (zero-based).
XMLAttributes.getLength()
public String getType(int index)
XMLAttributes
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".
getType
in interface XMLAttributes
index
- The attribute index (zero-based).
XMLAttributes.getLength()
public String getType(String qName)
XMLAttributes
See getType(int)
for a description
of the possible types.
getType
in interface XMLAttributes
qName
- The XML 1.0 qualified name.
public String getType(String uri, String localName)
XMLAttributes
See getType(int)
for a description
of the possible types.
getType
in interface XMLAttributes
uri
- The Namespace URI, or the empty String if the
name has no Namespace URI.localName
- The local name of the attribute.
public String getURI(int index)
XMLAttributes
getURI
in interface XMLAttributes
index
- The attribute index (zero-based).
XMLAttributes.getLength()
public String getValue(int index)
XMLAttributes
If the attribute value is a list of tokens (IDREFS, ENTITIES, or NMTOKENS), the tokens will be concatenated into a single string with each token separated by a single space.
getValue
in interface XMLAttributes
index
- The attribute index (zero-based).
XMLAttributes.getLength()
public String getValue(String qName)
XMLAttributes
See getValue(int)
for a description
of the possible values.
getValue
in interface XMLAttributes
qName
- The XML 1.0 qualified name.
public String getValue(String uri, String localName)
XMLAttributes
See getValue(int)
for a description
of the possible values.
getValue
in interface XMLAttributes
uri
- The Namespace URI, or the empty String if the
name has no Namespace URI.localName
- The local name of the attribute.
public boolean isSpecified(int attrIndex)
XMLAttributes
isSpecified
in interface XMLAttributes
attrIndex
- The attribute index.public void removeAllAttributes()
XMLAttributes
removeAllAttributes
in interface XMLAttributes
public void removeAttributeAt(int attrIndex)
XMLAttributes
Note: This operation changes the indexes of all attributes following the attribute at the specified index.
removeAttributeAt
in interface XMLAttributes
attrIndex
- The attribute index.public void setAttributes(AttributeMap attributes, CoreDocumentImpl doc, ElementImpl elem)
public void setName(int attrIndex, QName attrName)
XMLAttributes
setName
in interface XMLAttributes
attrIndex
- The attribute index.attrName
- The new attribute name.public void setNonNormalizedValue(int attrIndex, String attrValue)
XMLAttributes
setNonNormalizedValue
in interface XMLAttributes
attrIndex
- The attribute index.attrValue
- The new non-normalized attribute value.public void setSpecified(int attrIndex, boolean specified)
XMLAttributes
setSpecified
in interface XMLAttributes
attrIndex
- The attribute index.specified
- True if the attribute is specified in the instance
document.public void setType(int attrIndex, String attrType)
XMLAttributes
setType
in interface XMLAttributes
attrIndex
- The attribute index.attrType
- The attribute type. The type name is determined by
the type specified for this attribute in the DTD.
For example: "CDATA", "ID", "NMTOKEN", etc. However,
attributes of type enumeration will have the type
value specified as the pipe ('|') separated list of
the enumeration values prefixed by an open
parenthesis and suffixed by a close parenthesis.
For example: "(true|false)".public void setValue(int attrIndex, String attrValue)
XMLAttributes
setValue
in interface XMLAttributes
attrIndex
- The attribute index.attrValue
- The new attribute value.XMLAttributes.setNonNormalizedValue(int, java.lang.String)
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs91 Copyright 2005 BEA Systems Inc. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |