View Javadoc
1   package org.exolab.castor.xml.schema;
2   
3   import org.exolab.castor.xml.Serializer;
4   import org.xml.sax.Parser;
5   
6   /**
7    * Represents an execution context for schema reading/writing activities.
8    * @author <a href="mailto:wguttmn AT codehaus DOT org">Werner Guttmann</a>
9    * @version $Revision: 7273 $ $Date: 2004-10-05 14:27:10 -0600 (Tue, 05 Oct 2004) $
10   *
11   * @since 1.2
12   */
13  public interface SchemaContext {
14  
15      /**
16       * To get the {@link Resolver} to use in Schema*.
17       * @return get the {@link Resolver} to use in Schema*
18       */
19      Resolver getSchemaResolver();
20  
21      /**
22       * To set the {@link Resolver} for Schema*. 
23       * @param schemaResolver the {@link Resolver} for Schema*
24       */
25      void setSchemaResolver(Resolver resolver);
26  
27      /**
28       * Return an XML document parser as specified in the configuration file.
29       *
30       * @return A suitable XML parser
31       */
32      // TODO[WG, 1.3.4] REFACTOR with InternalContext
33      Parser getParser();
34  
35      /**
36       * Returns a default serializer for producing an XML document. The caller
37       * can specify an alternative output format, may reuse this serializer
38       * across several streams, and may serialize both DOM and SAX events. If
39       * such control is not required, it is recommended to call one of the other
40       * two methods.
41       * 
42       * @return A suitable serializer
43       */
44      // TODO[WG, 1.3.4] REFACTOR with InternalContext
45      Serializer getSerializer();
46  
47  }