|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.bea.xml.stream.AttributeBase
public class AttributeBase
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 | |
|---|---|
AttributeBase(javax.xml.namespace.QName name,
java.lang.String value)
|
|
AttributeBase(java.lang.String prefix,
java.lang.String localName,
java.lang.String value)
|
|
AttributeBase(java.lang.String prefix,
java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String value,
java.lang.String attributeType)
|
|
| Method Summary | |
|---|---|
javax.xml.stream.events.Characters |
asCharacters()
Returns this event as Characters, may result in a class cast exception if this event is not Characters. |
javax.xml.stream.events.EndElement |
asEndElement()
Returns this event as an end element event, may result in a class cast exception if this event is not a end element. |
javax.xml.stream.events.StartElement |
asStartElement()
Returns this event as a start element event, may result in a class cast exception if this event is not a start element. |
int |
getCharacterOffset()
Return the byte or character offset into the input source this location is pointing to. |
int |
getColumnNumber()
Return the column number where the current event ends, returns -1 if none is available. |
java.lang.String |
getDTDType()
Gets the type of this attribute, default is the String "CDATA" |
int |
getEventType()
Returns an integer code for this event. |
int |
getLineNumber()
Return the line number where the current event ends, returns -1 if none is available. |
java.lang.String |
getLocalName()
|
javax.xml.stream.Location |
getLocation()
Return the location of this event. |
java.lang.String |
getLocationURI()
|
javax.xml.namespace.QName |
getName()
Returns the QName for this attribute |
java.lang.String |
getNamespaceURI()
|
java.lang.String |
getPublicId()
Returns the public ID of the XML |
javax.xml.namespace.QName |
getSchemaType()
This method is provided for implementations to provide optional type information about the associated event. |
java.lang.String |
getSourceName()
|
java.lang.String |
getSystemId()
Returns the system ID of the XML |
java.lang.String |
getValue()
Gets the normalized value of this attribute |
boolean |
hasName()
|
boolean |
isAttribute()
A utility function to check if this event is an Attribute. |
boolean |
isCharacters()
A utility function to check if this event is Characters. |
boolean |
isDefault()
|
boolean |
isEndDocument()
A utility function to check if this event is an EndDocument. |
boolean |
isEndElement()
A utility function to check if this event is a EndElement. |
boolean |
isEndEntity()
|
boolean |
isEntityReference()
A utility function to check if this event is an EntityReference. |
boolean |
isNamespace()
A utility function to check if this event is a Namespace. |
boolean |
isNamespaceDeclaration()
|
boolean |
isProcessingInstruction()
A utility function to check if this event is a ProcessingInstruction. |
boolean |
isSpecified()
By default, all attributes are created as specified since RI doesn't handle attribute defaulting. |
boolean |
isStartDocument()
A utility function to check if this event is a StartDocument. |
boolean |
isStartElement()
A utility function to check if this event is a StartElement. |
boolean |
isStartEntity()
|
void |
recycle()
|
void |
setCharacterOffset(int c)
|
void |
setColumnNumber(int col)
|
void |
setLineNumber(int line)
|
void |
setLocationURI(java.lang.String uri)
|
void |
setNamespaceURI(java.lang.String uri)
|
java.lang.String |
toString()
|
void |
writeAsEncodedUnicode(java.io.Writer writer)
This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters. |
static void |
writeEncodedChar(java.io.Writer writer,
char c)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AttributeBase(java.lang.String prefix,
java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String value,
java.lang.String attributeType)
public AttributeBase(java.lang.String prefix,
java.lang.String localName,
java.lang.String value)
public AttributeBase(javax.xml.namespace.QName name,
java.lang.String value)
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic int getLineNumber()
javax.xml.stream.Location
getLineNumber in interface javax.xml.stream.Locationpublic void setLineNumber(int line)
public int getColumnNumber()
javax.xml.stream.Location
getColumnNumber in interface javax.xml.stream.Locationpublic void setColumnNumber(int col)
public int getCharacterOffset()
javax.xml.stream.Location
getCharacterOffset in interface javax.xml.stream.Locationpublic void setCharacterOffset(int c)
public java.lang.String getLocationURI()
public void setLocationURI(java.lang.String uri)
public int getEventType()
javax.xml.stream.events.XMLEvent
getEventType in interface javax.xml.stream.events.XMLEventXMLStreamConstants.START_ELEMENT,
XMLStreamConstants.END_ELEMENT,
XMLStreamConstants.CHARACTERS,
XMLStreamConstants.ATTRIBUTE,
XMLStreamConstants.NAMESPACE,
XMLStreamConstants.PROCESSING_INSTRUCTION,
XMLStreamConstants.COMMENT,
XMLStreamConstants.START_DOCUMENT,
XMLStreamConstants.END_DOCUMENT,
XMLStreamConstants.DTDpublic boolean hasName()
public javax.xml.namespace.QName getName()
javax.xml.stream.events.Attribute
getName in interface javax.xml.stream.events.Attributepublic boolean isNamespaceDeclaration()
public java.lang.String getLocalName()
public java.lang.String getValue()
javax.xml.stream.events.Attribute
getValue in interface javax.xml.stream.events.Attributepublic java.lang.String getDTDType()
javax.xml.stream.events.Attribute
getDTDType in interface javax.xml.stream.events.Attributepublic java.lang.String getNamespaceURI()
public void setNamespaceURI(java.lang.String uri)
public boolean isSpecified()
isSpecified in interface javax.xml.stream.events.Attributepublic boolean isStartElement()
javax.xml.stream.events.XMLEvent
isStartElement in interface javax.xml.stream.events.XMLEventStartElementpublic boolean isEndElement()
javax.xml.stream.events.XMLEvent
isEndElement in interface javax.xml.stream.events.XMLEventEndElementpublic boolean isEntityReference()
javax.xml.stream.events.XMLEvent
isEntityReference in interface javax.xml.stream.events.XMLEventEntityReferencepublic boolean isProcessingInstruction()
javax.xml.stream.events.XMLEvent
isProcessingInstruction in interface javax.xml.stream.events.XMLEventProcessingInstructionpublic boolean isCharacters()
javax.xml.stream.events.XMLEvent
isCharacters in interface javax.xml.stream.events.XMLEventCharacterspublic boolean isAttribute()
javax.xml.stream.events.XMLEvent
isAttribute in interface javax.xml.stream.events.XMLEventAttributepublic boolean isNamespace()
javax.xml.stream.events.XMLEvent
isNamespace in interface javax.xml.stream.events.XMLEventNamespacepublic boolean isStartDocument()
javax.xml.stream.events.XMLEvent
isStartDocument in interface javax.xml.stream.events.XMLEventStartDocumentpublic boolean isEndDocument()
javax.xml.stream.events.XMLEvent
isEndDocument in interface javax.xml.stream.events.XMLEventEndDocumentpublic boolean isEndEntity()
public boolean isStartEntity()
public java.lang.String getPublicId()
javax.xml.stream.Location
getPublicId in interface javax.xml.stream.Locationpublic java.lang.String getSystemId()
javax.xml.stream.Location
getSystemId in interface javax.xml.stream.Locationpublic javax.xml.stream.Location getLocation()
javax.xml.stream.events.XMLEvent
getLocation in interface javax.xml.stream.events.XMLEventLocationpublic javax.xml.stream.events.StartElement asStartElement()
javax.xml.stream.events.XMLEvent
asStartElement in interface javax.xml.stream.events.XMLEventpublic javax.xml.stream.events.EndElement asEndElement()
javax.xml.stream.events.XMLEvent
asEndElement in interface javax.xml.stream.events.XMLEventpublic javax.xml.stream.events.Characters asCharacters()
javax.xml.stream.events.XMLEvent
asCharacters in interface javax.xml.stream.events.XMLEventpublic void recycle()
public boolean isDefault()
public java.lang.String getSourceName()
public javax.xml.namespace.QName getSchemaType()
javax.xml.stream.events.XMLEvent
getSchemaType in interface javax.xml.stream.events.XMLEvent
public void writeAsEncodedUnicode(java.io.Writer writer)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.events.XMLEvent
writeAsEncodedUnicode in interface javax.xml.stream.events.XMLEventwriter - The writer that will output the data
XMLStreamException - if there is a fatal error writing the event
public static void writeEncodedChar(java.io.Writer writer,
char c)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||