Package org.apache.sis.xml
Class TransformedEvent<E extends XMLEvent>
java.lang.Object
org.apache.sis.xml.TransformedEvent<E>
- All Implemented Interfaces:
XMLEvent,XMLStreamConstants
- Direct Known Subclasses:
TransformedEvent.Attr,TransformedEvent.End,TransformedEvent.NS,TransformedEvent.Start
Base class of events that are wrappers over the events emitted during the reading or writing of an XML document.
Those wrappers are used for changing the namespace and sometimes the name of XML elements or attributes.
- Since:
- 1.0
- Version:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classWrapper over an attribute emitted during the reading or writing of an XML document.(package private) static final classWrapper over an element emitted during the reading or writing of an XML document.(package private) static final classWrapper over a namespace emitted during the reading or writing of an XML document.(package private) static classWrapper over an element emitted during the reading or writing of an XML document.(package private) static final classThe"xsi:type"attribute. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final EThe event to be exported in a different namespace.(package private) final QNameExported name of the attribute or element.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 -
Method Summary
Modifier and TypeMethodDescriptionfinal QNamegetName()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanboolean(package private) final Appendablename(Appendable out) Appends the name to the given output.final StringtoString()Returns the event as per the XML 1.0 without indentation or whitespace.(package private) abstract voidwrite(Appendable out) Implementation ofwriteAsEncodedUnicode(Writer)andtoString().final voidwriteAsEncodedUnicode(Writer writer) Writes the event as per the XML 1.0 without indentation or whitespace.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javax.xml.stream.events.XMLEvent
getEventType
-
Field Details
-
event
The event to be exported in a different namespace. -
name
Exported name of the attribute or element. Will often (but not necessarily) have the same local part thanevent.getName()but a different namespace.
-
-
Constructor Details
-
TransformedEvent
Exports a new event.- Parameters:
event- the event to be exported in a different namespace.name- the exported name of the attribute or element.
-
-
Method Details
-
isStartElement
public boolean isStartElement()- Specified by:
isStartElementin interfaceXMLEvent
-
isAttribute
public boolean isAttribute()- Specified by:
isAttributein interfaceXMLEvent
-
isNamespace
public boolean isNamespace()- Specified by:
isNamespacein interfaceXMLEvent
-
isEndElement
public boolean isEndElement()- Specified by:
isEndElementin interfaceXMLEvent
-
isEntityReference
public boolean isEntityReference()- Specified by:
isEntityReferencein interfaceXMLEvent
-
isProcessingInstruction
public boolean isProcessingInstruction()- Specified by:
isProcessingInstructionin interfaceXMLEvent
-
isCharacters
public boolean isCharacters()- Specified by:
isCharactersin interfaceXMLEvent
-
isStartDocument
public boolean isStartDocument()- Specified by:
isStartDocumentin interfaceXMLEvent
-
isEndDocument
public boolean isEndDocument()- Specified by:
isEndDocumentin interfaceXMLEvent
-
asStartElement
- Specified by:
asStartElementin interfaceXMLEvent
-
asEndElement
- Specified by:
asEndElementin interfaceXMLEvent
-
asCharacters
- Specified by:
asCharactersin interfaceXMLEvent
-
getLocation
- Specified by:
getLocationin interfaceXMLEvent
-
getSchemaType
- Specified by:
getSchemaTypein interfaceXMLEvent
-
getName
-
name
Appends the name to the given output. This is a convenience method forwrite(Appendable)implementations.- Throws:
IOException
-
write
Implementation ofwriteAsEncodedUnicode(Writer)andtoString().- Throws:
IOException
-
writeAsEncodedUnicode
Writes the event as per the XML 1.0 without indentation or whitespace. This implementation delegates towrite(Appendable).- Specified by:
writeAsEncodedUnicodein interfaceXMLEvent- Throws:
XMLStreamException
-
toString
Returns the event as per the XML 1.0 without indentation or whitespace. This implementation delegates towrite(Appendable).
-