KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mvnforum > jaxb > db > impl > runtime > GrammarInfo


1 //
2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.5-b16-fcs
3
// See <a HREF="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
4
// Any modifications to this file will be lost upon recompilation of the source schema.
5
// Generated on: 2005.12.17 at 09:43:27 AM GMT+07:00
6
//
7

8 package com.mvnforum.jaxb.db.impl.runtime;
9
10 import javax.xml.bind.JAXBException;
11
12 /**
13  * Keeps the information about the grammar as a whole.
14  *
15  * Implementation of this interface is provided by the generated code.
16  *
17  * @author
18  * <a HREF="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
19  */

20 public interface GrammarInfo
21 {
22     /**
23      * Creates an unmarshaller that can unmarshal a given element.
24      *
25      * @param namespaceUri
26      * The string needs to be interned by the caller
27      * for a performance reason.
28      * @param localName
29      * The string needs to be interned by the caller
30      * for a performance reason.
31      *
32      * @return
33      * null if the given name pair is not recognized.
34      */

35     UnmarshallingEventHandler createUnmarshaller(
36         String JavaDoc namespaceUri, String JavaDoc localName, UnmarshallingContext context );
37     
38     /**
39      * Creates an instance for the root element.
40      *
41      * @return
42      * null if the given name pair is not recognized.
43      */

44     Class JavaDoc getRootElement(String JavaDoc namespaceUri, String JavaDoc localName);
45     
46     /**
47      * Return the probe points for this GrammarInfo, which are used to detect
48      * {namespaceURI,localName} collisions across the GrammarInfo's on the
49      * schemaPath. This is a slightly more complex implementation than a simple
50      * hashmap, but it is more flexible in supporting additional schema langs.
51      */

52     String JavaDoc[] getProbePoints();
53     
54     /**
55      * Returns true if the invocation of the createUnmarshaller method
56      * will return a non-null value for the given name pair.
57      *
58      * @param nsUri
59      * The string needs to be interned by the caller
60      * for a performance reason.
61      * @param localName
62      * The string needs to be interned by the caller
63      * for a performance reason.
64      */

65     boolean recognize( String JavaDoc nsUri, String JavaDoc localName );
66
67     /**
68      * Gets the default implementation for the given public content
69      * interface.
70      *
71      * @param javaContentInterface
72      * the Class object of the public interface.
73      *
74      * @return null
75      * If the interface is not found.
76      */

77     Class JavaDoc getDefaultImplementation( Class JavaDoc javaContentInterface );
78
79     /**
80      * Gets the MSV AGM which can be used to validate XML during
81      * marshalling/unmarshalling.
82      */

83     com.sun.msv.grammar.Grammar getGrammar() throws JAXBException;
84
85     
86     XMLSerializable castToXMLSerializable( Object JavaDoc o );
87     
88     
89     ValidatableObject castToValidatableObject(Object JavaDoc o);
90 }
91
Popular Tags