KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > xni > grammars > XSGrammar


1 /*
2  * Copyright 2002,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.xerces.xni.grammars;
18
19 import org.apache.xerces.xs.XSModel;
20
21 /**
22  * Representing a schema grammar. It contains declaratoin/definitions from
23  * a certain namespace. When a grammar is preparsed, and its grammar type is
24  * XML Schema, it can be casted to this interface. Objects of this interface
25  * can be converted to XSModel, from which further information about components
26  * in this grammar can be obtained.
27  *
28  * @author Sandy Gao, IBM
29  *
30  * @version $Id: XSGrammar.java,v 1.4 2004/02/24 23:15:58 mrglavas Exp $
31  */

32 public interface XSGrammar extends Grammar {
33
34     /**
35      * Return an <code>XSModel</code> that represents components in this schema
36      * grammar and any schema grammars that are imported by this grammar
37      * directly or indirectly.
38      *
39      * @return an <code>XSModel</code> representing this schema grammar
40      */

41     public XSModel toXSModel();
42     
43     /**
44      * Return an <code>XSModel</code> that represents components in this schema
45      * grammar and the grammars in the <code>grammars</code>parameter,
46      * any schema grammars that are imported by them directly or indirectly.
47      *
48      * @return an <code>XSModel</code> representing these schema grammars
49      */

50     public XSModel toXSModel(XSGrammar[] grammars);
51
52 } // interface XSGrammar
53
Popular Tags