1 /* 2 * Copyright 2003, 2004 The Apache Software Foundation 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 16 */ 17 package org.apache.ws.jaxme.xs.parser; 18 19 import org.xml.sax.SAXException; 20 21 /** <p>Interface of an object which is setting character data as 22 * a bean property. The default implementation, 23 * {@link org.apache.ws.jaxme.xs.parser.impl.TextSetterImpl}, is converting any 24 * SAX event of type {@link org.xml.sax.ContentHandler#characters(char[], int, int)} 25 * into a call of the method <code>addText(String)</code> on the 26 * bean.</p> 27 * 28 * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a> 29 */ 30 public interface TextSetter { 31 /** <p>Called for any {@link org.xml.sax.ContentHandler#characters(char[], int, int)} 32 * event. Note, that this implies in particular, that the method may be called 33 * multiple times, even for a single block of text.</p> 34 * 35 * @param pText The text being set. 36 */ 37 public void addText(String pText) throws SAXException; 38 } 39