astronomy.data.spectra.impl.runtime
Class AbstractGrammarInfoImpl

java.lang.Object
  extended by astronomy.data.spectra.impl.runtime.AbstractGrammarInfoImpl
All Implemented Interfaces:
GrammarInfo

public abstract class AbstractGrammarInfoImpl
extends Object
implements GrammarInfo

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

Author:
Constructor Summary
AbstractGrammarInfoImpl()
           
 
Method Summary
abstract  UnmarshallingEventHandler createUnmarshaller(String namespaceUri, String localName, UnmarshallingContext context)
          Creates an unmarshaller that can unmarshal a given element.
abstract  Class getDefaultImplementation(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.
abstract  String[] getProbePoints()
          Return the probe points for this GrammarInfo, which are used to detect {namespaceURI,localName} collisions across the GrammarInfo's on the schemaPath.
abstract  boolean recognize(String nsUri, String localName)
          Returns true if the invocation of the createUnmarshaller method will return a non-null value for the given name pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface astronomy.data.spectra.impl.runtime.GrammarInfo
getRootElement
 

Constructor Detail

AbstractGrammarInfoImpl

public AbstractGrammarInfoImpl()
Method Detail

createUnmarshaller

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

Specified by:
createUnmarshaller in interface GrammarInfo
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.

getProbePoints

public abstract 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.

Specified by:
getProbePoints in interface GrammarInfo

recognize

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

Specified by:
recognize in interface GrammarInfo
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.

getDefaultImplementation

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

Specified by:
getDefaultImplementation in interface GrammarInfo
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.

Specified by:
getGrammar in interface GrammarInfo
Throws:
javax.xml.bind.JAXBException