< prev index next >

src/jdk.xml.bind/share/classes/com/sun/tools/internal/xjc/api/SchemaCompiler.java

Print this page




  40  * Schema-to-Java compiler.
  41  *
  42  * <p>
  43  * The caller can parse multiple schema documents,
  44  * JAXB external binding files (or potentially WSDL
  45  * and JSR-109.next mapping files in the future).
  46  *
  47  * <p>
  48  * All the errors found during this process will be sent
  49  * to the registered {@link ErrorListener}.
  50  *
  51  * <p>
  52  * Once all the documents are parsed, call the {@link #bind()}
  53  * method to get the compiled {@link JAXBModel} object.
  54  *
  55  *
  56  * <h2>Tips: namespace URI -> package customization</h2>
  57  * <p>
  58  * The caller can feed the following synthesized schema
  59  * to achive the namespace URI -> Java package customization:
  60  * <pre><xmp>
  61  * <schema targetNamespace="xml.namespace.uri"
  62  *   xmlns="http://www.w3.org/2001/XMLSchema"
  63  *   xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
  64  *   jaxb:version="1.0">
  65  *   <annotation><appinfo>
  66  *     <jaxb:schemaBindings>
  67  *       <jaxb:package name="java.package.name"/>
  68  *     </jaxb:schemaBindings>
  69  *   </appinfo></annotation>
  70  * </schema>
  71  * </xmp></pre>
  72  * Feed this synthesized schema document for each namespace URI
  73  * you need to map.
  74  *
  75  * @author
  76  *     Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
  77  */
  78 public interface SchemaCompiler {
  79     /**
  80      * Parses schemas or external bindings
  81      * through SAX events by feeding events into
  82      * SAX {@link ContentHandler}.
  83      *
  84      * @param systemId
  85      *      The system ID of the document to be read in.
  86      *
  87      * @see #parseSchema(String, XMLStreamReader)
  88      */
  89     ContentHandler getParserHandler( String systemId );
  90 
  91     /**




  40  * Schema-to-Java compiler.
  41  *
  42  * <p>
  43  * The caller can parse multiple schema documents,
  44  * JAXB external binding files (or potentially WSDL
  45  * and JSR-109.next mapping files in the future).
  46  *
  47  * <p>
  48  * All the errors found during this process will be sent
  49  * to the registered {@link ErrorListener}.
  50  *
  51  * <p>
  52  * Once all the documents are parsed, call the {@link #bind()}
  53  * method to get the compiled {@link JAXBModel} object.
  54  *
  55  *
  56  * <h2>Tips: namespace URI -> package customization</h2>
  57  * <p>
  58  * The caller can feed the following synthesized schema
  59  * to achive the namespace URI -> Java package customization:
  60  * <pre>{@code
  61  * <schema targetNamespace="xml.namespace.uri"
  62  *   xmlns="http://www.w3.org/2001/XMLSchema"
  63  *   xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
  64  *   jaxb:version="1.0">
  65  *   <annotation><appinfo>
  66  *     <jaxb:schemaBindings>
  67  *       <jaxb:package name="java.package.name"/>
  68  *     </jaxb:schemaBindings>
  69  *   </appinfo></annotation>
  70  * </schema>
  71  * }</pre>
  72  * Feed this synthesized schema document for each namespace URI
  73  * you need to map.
  74  *
  75  * @author
  76  *     Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
  77  */
  78 public interface SchemaCompiler {
  79     /**
  80      * Parses schemas or external bindings
  81      * through SAX events by feeding events into
  82      * SAX {@link ContentHandler}.
  83      *
  84      * @param systemId
  85      *      The system ID of the document to be read in.
  86      *
  87      * @see #parseSchema(String, XMLStreamReader)
  88      */
  89     ContentHandler getParserHandler( String systemId );
  90 
  91     /**


< prev index next >