Package com.bea.xml.stream
Class AttributeBase
java.lang.Object
com.bea.xml.stream.AttributeBase
- All Implemented Interfaces:
Attribute
,XMLEvent
,Location
,XMLStreamConstants
- Direct Known Subclasses:
NamespaceBase
An implementation of the Attribute class.
-
Field Summary
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
ConstructorsConstructorDescriptionAttributeBase
(String prefix, String localName, String value) AttributeBase
(String prefix, String namespaceURI, String localName, String value, String attributeType) AttributeBase
(QName name, String value) -
Method Summary
Modifier and TypeMethodDescriptionint
int
int
int
getName()
getValue()
boolean
hasName()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
By default, all attributes are created as specified since RI doesn't handle attribute defaulting.boolean
boolean
boolean
void
recycle()
void
setCharacterOffset
(int c) void
setColumnNumber
(int col) void
setLineNumber
(int line) void
setLocationURI
(String uri) void
setNamespaceURI
(String uri) toString()
void
writeAsEncodedUnicode
(Writer writer) static void
writeEncodedChar
(Writer writer, char c)
-
Constructor Details
-
AttributeBase
-
AttributeBase
-
AttributeBase
-
-
Method Details
-
toString
-
getLineNumber
public int getLineNumber()- Specified by:
getLineNumber
in interfaceLocation
-
setLineNumber
public void setLineNumber(int line) -
getColumnNumber
public int getColumnNumber()- Specified by:
getColumnNumber
in interfaceLocation
-
setColumnNumber
public void setColumnNumber(int col) -
getCharacterOffset
public int getCharacterOffset()- Specified by:
getCharacterOffset
in interfaceLocation
-
setCharacterOffset
public void setCharacterOffset(int c) -
getLocationURI
-
setLocationURI
-
getEventType
public int getEventType()- Specified by:
getEventType
in interfaceXMLEvent
-
hasName
public boolean hasName() -
getName
-
isNamespaceDeclaration
public boolean isNamespaceDeclaration() -
getLocalName
-
getValue
-
getDTDType
- Specified by:
getDTDType
in interfaceAttribute
-
getNamespaceURI
-
setNamespaceURI
-
isSpecified
public boolean isSpecified()By default, all attributes are created as specified since RI doesn't handle attribute defaulting.- Specified by:
isSpecified
in interfaceAttribute
-
isStartElement
public boolean isStartElement()- Specified by:
isStartElement
in interfaceXMLEvent
-
isEndElement
public boolean isEndElement()- Specified by:
isEndElement
in interfaceXMLEvent
-
isEntityReference
public boolean isEntityReference()- Specified by:
isEntityReference
in interfaceXMLEvent
-
isProcessingInstruction
public boolean isProcessingInstruction()- Specified by:
isProcessingInstruction
in interfaceXMLEvent
-
isCharacters
public boolean isCharacters()- Specified by:
isCharacters
in interfaceXMLEvent
-
isAttribute
public boolean isAttribute()- Specified by:
isAttribute
in interfaceXMLEvent
-
isNamespace
public boolean isNamespace()- Specified by:
isNamespace
in interfaceXMLEvent
-
isStartDocument
public boolean isStartDocument()- Specified by:
isStartDocument
in interfaceXMLEvent
-
isEndDocument
public boolean isEndDocument()- Specified by:
isEndDocument
in interfaceXMLEvent
-
isEndEntity
public boolean isEndEntity() -
isStartEntity
public boolean isStartEntity() -
getPublicId
- Specified by:
getPublicId
in interfaceLocation
-
getSystemId
- Specified by:
getSystemId
in interfaceLocation
-
getLocation
- Specified by:
getLocation
in interfaceXMLEvent
-
asStartElement
- Specified by:
asStartElement
in interfaceXMLEvent
-
asEndElement
- Specified by:
asEndElement
in interfaceXMLEvent
-
asCharacters
- Specified by:
asCharacters
in interfaceXMLEvent
-
recycle
public void recycle() -
isDefault
public boolean isDefault() -
getSourceName
-
getSchemaType
- Specified by:
getSchemaType
in interfaceXMLEvent
-
writeAsEncodedUnicode
- Specified by:
writeAsEncodedUnicode
in interfaceXMLEvent
- Throws:
XMLStreamException
-
writeEncodedChar
- Throws:
IOException
-