001 // 002 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v1.0.1-05/30/2003 05:06 AM(java_re)-fcs 003 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 004 // Any modifications to this file will be lost upon recompilation of the source schema. 005 // Generated on: 2004.10.11 at 12:13:34 EDT 006 // 007 008 /* 009 * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 010 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 011 */ 012 013 /* 014 * @(#)$Id: GrammarInfo.java,v 1.5 2003/05/14 18:36:17 lschwenk Exp $ 015 */ 016 package astronomy.data.spectra.impl.runtime; 017 018 import javax.xml.bind.JAXBException; 019 020 import com.sun.msv.grammar.Grammar; 021 022 /** 023 * Keeps the information about the grammar as a whole. 024 * 025 * Implementation of this interface is provided by the generated code. 026 * 027 * @author 028 * <a href="mailto:kohsuke.kawaguchi@sun.com>Kohsuke KAWAGUCHI</a> 029 */ 030 public interface GrammarInfo 031 { 032 /** 033 * Creates an unmarshaller that can unmarshal a given element. 034 * 035 * @param namespaceUri 036 * The string needs to be interned by the caller 037 * for a performance reason. 038 * @param localName 039 * The string needs to be interned by the caller 040 * for a performance reason. 041 * 042 * @return 043 * null if the given name pair is not recognized. 044 */ 045 UnmarshallingEventHandler createUnmarshaller( 046 String namespaceUri, String localName, UnmarshallingContext context ); 047 048 /** 049 * Creates an instance for the root element. 050 * 051 * @return 052 * null if the given name pair is not recognized. 053 */ 054 Class getRootElement(String namespaceUri, String localName); 055 056 /** 057 * Return the probe points for this GrammarInfo, which are used to detect 058 * {namespaceURI,localName} collisions across the GrammarInfo's on the 059 * schemaPath. This is a slightly more complex implementation than a simple 060 * hashmap, but it is more flexible in supporting additional schema langs. 061 */ 062 String[] getProbePoints(); 063 064 /** 065 * Returns true if the invocation of the createUnmarshaller method 066 * will return a non-null value for the given name pair. 067 * 068 * @param namespaceUri 069 * The string needs to be interned by the caller 070 * for a performance reason. 071 * @param localName 072 * The string needs to be interned by the caller 073 * for a performance reason. 074 */ 075 boolean recognize( String nsUri, String localName ); 076 077 /** 078 * Gets the default implementation for the given public content 079 * interface. 080 * 081 * @param javaContentInterface 082 * the Class object of the public interface. 083 * 084 * @return null 085 * If the interface is not found. 086 */ 087 Class getDefaultImplementation( Class javaContentInterface ); 088 089 /** 090 * Gets the MSV AGM which can be used to validate XML during 091 * marshalling/unmarshalling. 092 */ 093 Grammar getGrammar() throws JAXBException; 094 }