View Javadoc

1   package net.sf.tomp.xtcl.source;
2   
3   import javax.xml.transform.sax.SAXSource;
4   
5   import net.sf.tomp.general.Parametrized;
6   import net.sf.tomp.xml.sax.ParametrizedXMLReader;
7   
8   import org.xml.sax.InputSource;
9   
10  /***
11   * Parametrized extension of the SAXSource
12   * 
13   * @author tomp
14   */
15  public class XTSAXSource extends SAXSource implements Parametrized {
16  	
17      /*** Parametrized XMLReader */
18      protected ParametrizedXMLReader xmlReader;
19  
20      /***
21       * Creates a new XTSAXSource object.
22       * 
23       * @param r ParametrizedXMLReader to be used for reading the InputSource
24       * @param is the InputSource to be read
25       */
26      public XTSAXSource(ParametrizedXMLReader r, InputSource is) {
27          super(r, is);
28          xmlReader = r;
29      }
30  
31      /***
32       * @see net.sf.tomp.general.Parametrized#setParameter(java.lang.String, java.lang.Object)
33       */
34      public void setParameter(String k, Object v) {
35          xmlReader.setParameter(k, v); 
36      }
37  }
38  
39  /*
40   * The contents of this file are subject to the Mozilla Public License Version
41   * 1.1 (the "License"); you may not use this file except in compliance with the
42   * License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
43   * Software distributed under the License is distributed on an "AS IS" basis,
44   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
45   * the specific language governing rights and limitations under the License. The
46   * Original Code is: all this file. The Initial Developer of the Original Code
47   * is: Tomas Pitner, Masaryk University in Brno, Czech Republic. Contributor(s):
48   */