net.sf.jour.rt.view.config.impl.runtime
Interface GrammarInfo

All Known Implementing Classes:
GrammarInfoFacade, GrammarInfoImpl

public interface GrammarInfo

Keeps the information about the grammar as a whole. Implementation of this interface is provided by the generated code.

Author:
Kohsuke KAWAGUCHI

Method Summary
 ValidatableObject castToValidatableObject(java.lang.Object o)
           
 XMLSerializable castToXMLSerializable(java.lang.Object o)
           
 UnmarshallingEventHandler createUnmarshaller(java.lang.String namespaceUri, java.lang.String localName, UnmarshallingContext context)
          Creates an unmarshaller that can unmarshal a given element.
 java.lang.Class getDefaultImplementation(java.lang.Class javaContentInterface)
          Gets the default implementation for the given public content interface.
 com.sun.msv.grammar.Grammar getGrammar()
          Gets the MSV AGM which can be used to validate XML during marshalling/unmarshalling.
 java.lang.String[] getProbePoints()
          Return the probe points for this GrammarInfo, which are used to detect {namespaceURI,localName} collisions across the GrammarInfo's on the schemaPath.
 java.lang.Class getRootElement(java.lang.String namespaceUri, java.lang.String localName)
          Creates an instance for the root element.
 boolean recognize(java.lang.String nsUri, java.lang.String localName)
          Returns true if the invocation of the createUnmarshaller method will return a non-null value for the given name pair.
 

Method Detail

createUnmarshaller

public UnmarshallingEventHandler createUnmarshaller(java.lang.String namespaceUri,
                                                    java.lang.String localName,
                                                    UnmarshallingContext context)
Creates an unmarshaller that can unmarshal a given element.

Parameters:
namespaceUri - The string needs to be interned by the caller for a performance reason.
localName - The string needs to be interned by the caller for a performance reason.
Returns:
null if the given name pair is not recognized.

getRootElement

public java.lang.Class getRootElement(java.lang.String namespaceUri,
                                      java.lang.String localName)
Creates an instance for the root element.

Returns:
null if the given name pair is not recognized.

getProbePoints

public java.lang.String[] getProbePoints()
Return the probe points for this GrammarInfo, which are used to detect {namespaceURI,localName} collisions across the GrammarInfo's on the schemaPath. This is a slightly more complex implementation than a simple hashmap, but it is more flexible in supporting additional schema langs.


recognize

public boolean recognize(java.lang.String nsUri,
                         java.lang.String localName)
Returns true if the invocation of the createUnmarshaller method will return a non-null value for the given name pair.

Parameters:
nsUri - The string needs to be interned by the caller for a performance reason.
localName - The string needs to be interned by the caller for a performance reason.

getDefaultImplementation

public java.lang.Class getDefaultImplementation(java.lang.Class javaContentInterface)
Gets the default implementation for the given public content interface.

Parameters:
javaContentInterface - the Class object of the public interface.
Returns:
null If the interface is not found.

getGrammar

public com.sun.msv.grammar.Grammar getGrammar()
                                       throws javax.xml.bind.JAXBException
Gets the MSV AGM which can be used to validate XML during marshalling/unmarshalling.

Throws:
javax.xml.bind.JAXBException

castToXMLSerializable

public XMLSerializable castToXMLSerializable(java.lang.Object o)

castToValidatableObject

public ValidatableObject castToValidatableObject(java.lang.Object o)


Copyright © 2004 sourceforge. All Rights Reserved.