Package javanet.staxutils.events
Class AttributeEvent
java.lang.Object
javanet.staxutils.events.AbstractXMLEvent
javanet.staxutils.events.AttributeEvent
- All Implemented Interfaces:
Serializable,Cloneable,ExtendedXMLEvent,Attribute,XMLEvent,XMLStreamConstants
- Direct Known Subclasses:
NamespaceEvent
Attribute event implementation.- Version:
- $Revision: 1.3 $
- Author:
- Christian Niles
- See Also:
-
Field Summary
Fields inherited from class javanet.staxutils.events.AbstractXMLEvent
location, schemaTypeFields 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
ConstructorsConstructorDescriptionAttributeEvent(QName name, String value) Constructs anAttributeEventwith the specified name and value.AttributeEvent(QName name, String value, boolean specified) Constructs a newAttributeEvent.AttributeEvent(QName name, String value, boolean specified, String dtdType, Location location, QName schemaType) Constructs a newAttributeEvent.AttributeEvent(QName name, String value, Attribute that) Copy constructor that optionally allows the name and/or value to be changed.AttributeEvent(QName name, String value, Location location) Constructs a newAttributeEvent.AttributeEvent(QName name, String value, Location location, QName schemaType) Constructs a newAttributeEvent.AttributeEvent(Attribute that) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionintReturnsXMLStreamConstants.ATTRIBUTE.getName()getValue()booleanMethods inherited from class javanet.staxutils.events.AbstractXMLEvent
asCharacters, asEndElement, asStartElement, clone, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, matches, toString, writeAsEncodedUnicode, writeEventMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javax.xml.stream.events.XMLEvent
asCharacters, asEndElement, asStartElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode
-
Constructor Details
-
AttributeEvent
Constructs anAttributeEventwith the specified name and value.- Parameters:
name- The qualified attribute name.value- The attribute value.
-
AttributeEvent
Constructs a newAttributeEvent.- Parameters:
name- The qualified attribute name.value- The attribute value.specified- Whether the attribute was specified in the document (true</code), or inherited from a DTD or schema (false).
-
AttributeEvent
Constructs a newAttributeEvent.- Parameters:
name- The qualified attribute name.value- The attribute value.location- TheLocationof the attribute.
-
AttributeEvent
Constructs a newAttributeEvent.- Parameters:
name- The qualified attribute name.value- The attribute value.location- TheLocationof the attribute.schemaType- The attribute type as specified in the schema.
-
AttributeEvent
public AttributeEvent(QName name, String value, boolean specified, String dtdType, Location location, QName schemaType) Constructs a newAttributeEvent.- Parameters:
name- The qualified attribute name.value- The attribute value.specified- Whether the attribute was specified in the document (true</code), or inherited from a DTD or schema (false).location- TheLocationof the attribute.dtdType- The attribute type as specified in the DTD.schemaType- The attribute type as specified in the schema.
-
AttributeEvent
Copy constructor that optionally allows the name and/or value to be changed.- Parameters:
name- The new attribute name, ornullto use the name from the provided attribute.value- The new attribute value, ornullto use the value from the provided attribute.that- TheAttributeevent to copy.
-
AttributeEvent
Copy constructor.- Parameters:
that- TheAttributeevent to copy.
-
-
Method Details
-
getEventType
public int getEventType()ReturnsXMLStreamConstants.ATTRIBUTE.- Specified by:
getEventTypein interfaceXMLEvent
-
getName
-
getValue
-
isSpecified
public boolean isSpecified()- Specified by:
isSpecifiedin interfaceAttribute
-
getDTDType
- Specified by:
getDTDTypein interfaceAttribute
-