com.sun.xml.stream.events
Class AttributeImpl

java.lang.Object
  extended by com.sun.xml.stream.events.DummyEvent
      extended by com.sun.xml.stream.events.AttributeImpl
All Implemented Interfaces:
javax.xml.stream.events.Attribute, javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants
Direct Known Subclasses:
NamespaceImpl

public class AttributeImpl
extends DummyEvent
implements javax.xml.stream.events.Attribute

Implementation of Attribute Event.

Author:
Neeraj Bajaj, Sun Microsystems, K.Venugopal, Sun Microsystems

Field Summary
 
Fields inherited from class com.sun.xml.stream.events.DummyEvent
fLocation
 
Fields inherited from interface javax.xml.stream.XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT
 
Constructor Summary
AttributeImpl()
           
AttributeImpl(javax.xml.namespace.QName qname, java.lang.String value, java.lang.String nonNormalizedvalue, java.lang.String type, boolean isSpecified)
           
AttributeImpl(java.lang.String name, java.lang.String value)
           
AttributeImpl(java.lang.String prefix, java.lang.String name, java.lang.String value)
           
AttributeImpl(java.lang.String prefix, java.lang.String uri, java.lang.String localPart, java.lang.String value, java.lang.String type)
           
AttributeImpl(java.lang.String prefix, java.lang.String uri, java.lang.String localPart, java.lang.String value, java.lang.String nonNormalizedvalue, java.lang.String type, boolean isSpecified)
           
 
Method Summary
 java.lang.String getDTDType()
          Gets the type of this attribute, default is "CDATA
 javax.xml.namespace.QName getName()
           
 java.lang.String getNonNormalizedValue()
           
 java.lang.String getValue()
           
protected  void init()
           
 boolean isSpecified()
           
 void setAttributeType(java.lang.String attributeType)
           
 void setName(javax.xml.namespace.QName name)
           
 void setNonNormalizedValue(java.lang.String nonNormalizedvalue)
           
 void setSpecified(boolean isSpecified)
          is this attribute is specified in the instance document
 void setValue(java.lang.String value)
           
 java.lang.String toString()
           
protected  void writeAsEncodedUnicodeEx(java.io.Writer writer)
          Helper method in order to expose IOException.
 
Methods inherited from class com.sun.xml.stream.events.DummyEvent
asCharacters, asEndElement, asStartElement, charEncode, getEventType, getLocation, getSchemaType, isAttribute, isCharacterData, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, setEventType, writeAsEncodedUnicode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.xml.stream.events.XMLEvent
asCharacters, asEndElement, asStartElement, getEventType, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode
 

Constructor Detail

AttributeImpl

public AttributeImpl()

AttributeImpl

public AttributeImpl(java.lang.String name,
                     java.lang.String value)

AttributeImpl

public AttributeImpl(java.lang.String prefix,
                     java.lang.String name,
                     java.lang.String value)

AttributeImpl

public AttributeImpl(java.lang.String prefix,
                     java.lang.String uri,
                     java.lang.String localPart,
                     java.lang.String value,
                     java.lang.String type)

AttributeImpl

public AttributeImpl(java.lang.String prefix,
                     java.lang.String uri,
                     java.lang.String localPart,
                     java.lang.String value,
                     java.lang.String nonNormalizedvalue,
                     java.lang.String type,
                     boolean isSpecified)

AttributeImpl

public AttributeImpl(javax.xml.namespace.QName qname,
                     java.lang.String value,
                     java.lang.String nonNormalizedvalue,
                     java.lang.String type,
                     boolean isSpecified)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setName

public void setName(javax.xml.namespace.QName name)

getName

public javax.xml.namespace.QName getName()
Specified by:
getName in interface javax.xml.stream.events.Attribute

setValue

public void setValue(java.lang.String value)

getValue

public java.lang.String getValue()
Specified by:
getValue in interface javax.xml.stream.events.Attribute

setNonNormalizedValue

public void setNonNormalizedValue(java.lang.String nonNormalizedvalue)

getNonNormalizedValue

public java.lang.String getNonNormalizedValue()

setAttributeType

public void setAttributeType(java.lang.String attributeType)

getDTDType

public java.lang.String getDTDType()
Gets the type of this attribute, default is "CDATA

Specified by:
getDTDType in interface javax.xml.stream.events.Attribute

setSpecified

public void setSpecified(boolean isSpecified)
is this attribute is specified in the instance document


isSpecified

public boolean isSpecified()
Specified by:
isSpecified in interface javax.xml.stream.events.Attribute

writeAsEncodedUnicodeEx

protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
                                throws java.io.IOException
Description copied from class: DummyEvent
Helper method in order to expose IOException.

Specified by:
writeAsEncodedUnicodeEx in class DummyEvent
Parameters:
writer - The writer that will output the data
Throws:
java.io.IOException - if there is an IO error

init

protected void init()


Copyright ? 2002-2003 Apache XML Project. All Rights Reserved.