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
public class AttributeEvent extends AbstractXMLEvent implements Attribute
Attributeevent implementation.- Version:
- $Revision: 1.3 $
- Author:
- Christian Niles
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javanet.staxutils.events.AbstractXMLEvent
location, schemaType
-
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
Constructors Constructor Description AttributeEvent(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDTDType()intgetEventType()ReturnsXMLStreamConstants.ATTRIBUTE.QNamegetName()StringgetValue()booleanisSpecified()-
Methods 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, writeEvent
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.xml.stream.events.XMLEvent
asCharacters, asEndElement, asStartElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, writeAsEncodedUnicode
-
-
-
-
Constructor Detail
-
AttributeEvent
public AttributeEvent(QName name, String value)
Constructs anAttributeEventwith the specified name and value.- Parameters:
name- The qualified attribute name.value- The attribute value.
-
AttributeEvent
public AttributeEvent(QName name, String value, boolean specified)
Constructs a newAttributeEvent.- Parameters:
name- The qualified attribute name.value- The attribute value.specified- Whether the attribute was specified in the document (truefalse).
-
AttributeEvent
public AttributeEvent(QName name, String value, Location location)
Constructs a newAttributeEvent.- Parameters:
name- The qualified attribute name.value- The attribute value.location- TheLocationof the attribute.
-
AttributeEvent
public AttributeEvent(QName name, String value, Location location, QName schemaType)
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 (truefalse).location- TheLocationof the attribute.dtdType- The attribute type as specified in the DTD.schemaType- The attribute type as specified in the schema.
-
AttributeEvent
public AttributeEvent(QName name, String value, Attribute that)
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.
-
-
Method Detail
-
getEventType
public int getEventType()
ReturnsXMLStreamConstants.ATTRIBUTE.- Specified by:
getEventTypein interfaceXMLEvent
-
isSpecified
public boolean isSpecified()
- Specified by:
isSpecifiedin interfaceAttribute
-
getDTDType
public String getDTDType()
- Specified by:
getDTDTypein interfaceAttribute
-
-