1 /* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5 /* 6 * Copyright 2002,2004 The Apache Software Foundation. 7 * 8 * Licensed under the Apache License, Version 2.0 (the "License"); 9 * you may not use this file except in compliance with the License. 10 * You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, software 15 * distributed under the License is distributed on an "AS IS" BASIS, 16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 * See the License for the specific language governing permissions and 18 * limitations under the License. 19 */ 20 21 package com.sun.org.apache.xerces.internal.xni.grammars; 22 23 import com.sun.org.apache.xerces.internal.xs.XSModel; 24 25 /** 26 * Representing a schema grammar. It contains declaratoin/definitions from 27 * a certain namespace. When a grammar is preparsed, and its grammar type is 28 * XML Schema, it can be casted to this interface. Objects of this interface 29 * can be converted to XSModel, from which further information about components 30 * in this grammar can be obtained. 31 * 32 * @author Sandy Gao, IBM 33 * 34 */ 35 public interface XSGrammar extends Grammar { 36 37 /** 38 * Return an <code>XSModel</code> that represents components in this schema 39 * grammar and any schema grammars that are imported by this grammar 40 * directly or indirectly. 41 * 42 * @return an <code>XSModel</code> representing this schema grammar 43 */ toXSModel()44 public XSModel toXSModel(); 45 46 /** 47 * Return an <code>XSModel</code> that represents components in this schema 48 * grammar and the grammars in the <code>grammars</code>parameter, 49 * any schema grammars that are imported by them directly or indirectly. 50 * 51 * @return an <code>XSModel</code> representing these schema grammars 52 */ toXSModel(XSGrammar[] grammars)53 public XSModel toXSModel(XSGrammar[] grammars); 54 55 } // interface XSGrammar 56