Project

General

Profile

Revision 37a3cbc8

ID37a3cbc82c524cf4c5635da4945d3ef68e13127e
Parent b8824884
Child 98cfec8f, 59c2c696

Added by Andreas Müller over 7 years ago

fix characters problem in KeyImport

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/markup/MarkupImportBase.java
24 24
import javax.xml.stream.XMLStreamConstants;
25 25
import javax.xml.stream.XMLStreamException;
26 26
import javax.xml.stream.events.Attribute;
27
import javax.xml.stream.events.Characters;
27 28
import javax.xml.stream.events.EndElement;
28 29
import javax.xml.stream.events.StartElement;
29 30
import javax.xml.stream.events.XMLEvent;
......
536 537
		fire(event);		
537 538
	}
538 539
	
539

  
540 540
	protected void fireNotYetImplementedElement(Location location, QName qName, int stackDepth) {
541 541
		String message = "Element not yet implemented: %s";
542 542
		IIoEvent event = makeProblemEvent(location, String.format(message, qName.getLocalPart()), 1, stackDepth+1 );
543 543
		fire(event);		
544 544
	}
545 545

  
546
	protected void fireNotYetImplementedCharacters(Location location, Characters chars, int stackDepth) {
547
		String message = "Characters not yet handled: %s";
548
		IIoEvent event = makeProblemEvent(location, String.format(message, chars.getData()), 1, stackDepth+1 );
549
		fire(event);		
550
	}
551

  
546 552
	/**
547 553
	 * Creates a problem event.
548 554
	 * Be aware of the right depths of the stack trace !
......
657 663
			fireUnexpectedEvent(event, 1);
658 664
		}	
659 665
	}
666
	
667
	/**
668
	 * Fires an not yet implemented event and adds the element name to the unhandled elements stack.
669
	 * @param event
670
	 */
671
	protected void handleNotYetImplementedCharacters(XMLEvent event) {
672
		Characters chars = event.asCharacters();
673
		fireNotYetImplementedCharacters(event.getLocation(), chars, 1);
674
	}
660 675

  
661 676
	/**
662 677
	 * Fires an not yet implemented event and adds the element name to the unhandled elements stack.

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)