APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.xml.internal.stream.events

public Class AttributeImpl

extends DummyEvent
implements Attribute
Class Inheritance
All Implemented Interfaces
javax.xml.stream.events.Attribute, javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants
Known Direct Subclasses
com.sun.xml.internal.stream.events.NamespaceImpl
Imports
javax.xml.namespace.QName, javax.xml.stream.events.Attribute, .XMLEvent, java.io.Writer

Implementation of Attribute Event.
Authors
Neeraj Bajaj, Sun Microsystems, K.Venugopal, Sun Microsystems

Field Summary

Modifier and TypeField and Description
private String
private boolean
private String
private QName
private String
Inherited from com.sun.xml.internal.stream.events.DummyEvent:
fLocation

Constructor Summary

AccessConstructor and Description
public
public
public
AttributeImpl(String prefix, String name, String value)

public
AttributeImpl(String prefix, String uri, String localPart, String value, String type)

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

public
AttributeImpl(QName qname, String value, String nonNormalizedvalue, String type, boolean isSpecified)

Method Summary

Modifier and TypeMethod and Description
public String
getDTDType()

Implements javax.xml.stream.events.Attribute.getDTDType.

Gets the type of this attribute, default is "CDATA

public QName
getName()

Implements javax.xml.stream.events.Attribute.getName.

Returns the QName for this attribute.

public String
public String
getValue()

Implements javax.xml.stream.events.Attribute.getValue.

Gets the normalized value of this attribute.

protected void
init()

public boolean
isSpecified()

Implements javax.xml.stream.events.Attribute.isSpecified.

A flag indicating whether this attribute was actually specified in the start-tag of its element, or was defaulted from the schema.

public void
setAttributeType(String attributeType)

public void
setName(QName name)

public void
setNonNormalizedValue(String nonNormalizedvalue)

public void
setSpecified(boolean isSpecified)

is this attribute is specified in the instance document

public void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

protected void
writeAsEncodedUnicodeEx(Writer writer)

Implements abstract com.sun.xml.internal.stream.events.DummyEvent.writeAsEncodedUnicodeEx.

Helper method in order to expose IOException.

Inherited from com.sun.xml.internal.stream.events.DummyEvent:
asCharactersasEndElementasStartElementcharEncodegetEventTypegetLocationgetSchemaTypeisAttributeisCharacterDataisCharactersisEndDocumentisEndElementisEntityReferenceisNamespaceisProcessingInstructionisStartDocumentisStartElementsetEventTypesetLocationwriteAsEncodedUnicode

Field Detail

fAttributeTypeback to summary
private String fAttributeType
fIsSpecifiedback to summary
private boolean fIsSpecified
fNonNormalizedvalueback to summary
private String fNonNormalizedvalue
fQNameback to summary
private QName fQName
fValueback to summary
private String fValue

Constructor Detail

AttributeImplback to summary
public AttributeImpl()
AttributeImplback to summary
public AttributeImpl(String name, String value)
AttributeImplback to summary
public AttributeImpl(String prefix, String name, String value)
AttributeImplback to summary
public AttributeImpl(String prefix, String uri, String localPart, String value, String type)
AttributeImplback to summary
public AttributeImpl(String prefix, String uri, String localPart, String value, String nonNormalizedvalue, String type, boolean isSpecified)
AttributeImplback to summary
public AttributeImpl(QName qname, String value, String nonNormalizedvalue, String type, boolean isSpecified)

Method Detail

getDTDTypeback to summary
public String getDTDType()

Implements javax.xml.stream.events.Attribute.getDTDType.

Gets the type of this attribute, default is "CDATA

getNameback to summary
public QName getName()

Implements javax.xml.stream.events.Attribute.getName.

Doc from javax.xml.stream.events.Attribute.getName.

Returns the QName for this attribute.

getNonNormalizedValueback to summary
public String getNonNormalizedValue()
getValueback to summary
public String getValue()

Implements javax.xml.stream.events.Attribute.getValue.

Doc from javax.xml.stream.events.Attribute.getValue.

Gets the normalized value of this attribute.

initback to summary
protected void init()
isSpecifiedback to summary
public boolean isSpecified()

Implements javax.xml.stream.events.Attribute.isSpecified.

Doc from javax.xml.stream.events.Attribute.isSpecified.

A flag indicating whether this attribute was actually specified in the start-tag of its element, or was defaulted from the schema.

setAttributeTypeback to summary
public void setAttributeType(String attributeType)
setNameback to summary
public void setName(QName name)
setNonNormalizedValueback to summary
public void setNonNormalizedValue(String nonNormalizedvalue)
setSpecifiedback to summary
public void setSpecified(boolean isSpecified)

is this attribute is specified in the instance document

setValueback to summary
public void setValue(String value)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

writeAsEncodedUnicodeExback to summary
protected void writeAsEncodedUnicodeEx(Writer writer) throws IOException

Implements abstract com.sun.xml.internal.stream.events.DummyEvent.writeAsEncodedUnicodeEx.

Doc from com.sun.xml.internal.stream.events.DummyEvent.writeAsEncodedUnicodeEx.

Helper method in order to expose IOException.

Exceptions
IOException:
if there is an IO error