question: static private XMLEvent constructEvent ( int eventType , WbXmlStreamReader stream ) throws XMLStreamException { log . log ( Level . FINE , "constructEvent()" ) ; XMLEvent event ; switch ( eventType ) { case XMLStreamConstants . START_DOCUMENT : event = new WbXmlStartDocumentEvent ( stream ) ; break ; case XMLStreamConstants . END_DOCUMENT : event = new WbXmlEndDocumentEvent ( stream ) ; break ; case XMLStreamConstants . START_ELEMENT : event = new WbXmlStartElementEvent ( stream ) ; break ; case XMLStreamConstants . END_ELEMENT : event = new WbXmlEndElementEvent ( stream ) ; break ; case XMLStreamConstants . CHARACTERS : case XMLStreamConstants . CDATA : event = new WbXmlCharactersEvent ( stream ) ; break ; default : throw new UnsupportedOperationException ( String . format ( "The %i event is not supported yet" , eventType ) ) ; } log . log ( Level . FINE , "constructEvent(): {0}" , event ) ; return event ; }
target:  Constructs the events based on the one read from the XMLStreamWriter.