View Javadoc
1   /*
2    * reserved comment block
3    * DO NOT REMOVE OR ALTER!
4    */
5   /*
6    * Copyright 2000-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.xni.XMLResourceIdentifier;
24  
25  /**
26   * <p> This interface describes basic attributes of XML grammars--their
27   * physical location and their type. </p>
28   *
29   * @author Neil Graham, IBM
30   */
31  public interface XMLGrammarDescription extends XMLResourceIdentifier {
32  
33      // initial set of grammar constants that some configurations will recognize;user
34      // components which create and/or recognize other types of grammars may
35      // certainly use their own constants in place of these (so long as
36      // their Grammar objects implement this interface).
37  
38      /**
39       * The grammar type constant for XML Schema grammars. When getGrammarType()
40       * method returns this constant, the object should be an instance of
41       * the XMLSchemaDescription interface.
42       */
43      public static final String XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
44  
45      /**
46       * The grammar type constant for DTD grammars. When getGrammarType()
47       * method returns this constant, the object should be an instance of
48       * the XMLDTDDescription interface.
49       */
50      public static final String XML_DTD = "http://www.w3.org/TR/REC-xml";
51  
52      /**
53       * Return the type of this grammar.
54       *
55       * @return  the type of this grammar
56       */
57      public String getGrammarType();
58  
59  } // interface XMLGrammarDescription