org.apache.xerces.impl.xs
Class SchemaGrammar

java.lang.Object
  |
  +--org.apache.xerces.impl.validation.Grammar
        |
        +--org.apache.xerces.impl.xs.SchemaGrammar

public class SchemaGrammar
extends Grammar

This class is to hold all schema component declaration that are declared within one namespace. The Grammar class this class extends contains what little commonality there is between XML Schema and DTD grammars. It's useful to distinguish grammar objects from other kinds of object when they exist in pools or caches.

Version:
$Id: SchemaGrammar.java,v 1.6 2001/12/06 21:49:36 neilg Exp $
Author:
Sandy Gao, IBM, Elena Litani, IBM

Field Summary
static XSSimpleType fAnySimpleType
           
static XSComplexTypeDecl fAnyType
           
 java.lang.String fTargetNamespace
           
static SchemaGrammar SG_SchemaNS
           
 
Constructor Summary
protected SchemaGrammar(SymbolTable symbolTable)
          Special constructor to create the grammar for the schema namespace
  SchemaGrammar(SymbolTable symbolTable, java.lang.String targetNamespace)
          Default constructor.
 
Method Summary
 void addComplexTypeDecl(XSComplexTypeDecl decl)
          add one complex type decl: for later constraint checking
 void addGlobalAttributeDecl(XSAttributeDecl decl)
          register one global attribute
 void addGlobalAttributeGroupDecl(XSAttributeGroupDecl decl)
          register one global attribute group
 void addGlobalElementDecl(XSElementDecl decl)
          register one global element
 void addGlobalGroupDecl(XSGroupDecl decl)
          register one global group
 void addGlobalNotationDecl(XSNotationDecl decl)
          register one global notation
 void addGlobalTypeDecl(XSTypeDecl decl)
          register one global type
 void addIDConstraintDecl(XSElementDecl elmDecl, IdentityConstraint decl)
          register one identity constraint
 XSAttributeDecl getGlobalAttributeDecl(java.lang.String declName)
          get one global attribute
 XSAttributeGroupDecl getGlobalAttributeGroupDecl(java.lang.String declName)
          get one global attribute group
 XSElementDecl getGlobalElementDecl(java.lang.String declName)
          get one global element
 XSGroupDecl getGlobalGroupDecl(java.lang.String declName)
          get one global group
 XSTypeDecl getGlobalTypeDecl(java.lang.String declName)
          get one global type
 IdentityConstraint getIDConstraintDecl(java.lang.String declName)
          get one identity constraint
 XSNotationDecl getNotationDecl(java.lang.String declName)
          get one global notation
 java.lang.String getTargetNamespace()
          Returns this grammar's target namespace.
 boolean isNamespaceAware()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fTargetNamespace

public java.lang.String fTargetNamespace

fAnyType

public static final XSComplexTypeDecl fAnyType

SG_SchemaNS

public static final SchemaGrammar SG_SchemaNS

fAnySimpleType

public static final XSSimpleType fAnySimpleType
Constructor Detail

SchemaGrammar

public SchemaGrammar(SymbolTable symbolTable,
                     java.lang.String targetNamespace)
Default constructor.
Parameters:
symbolTable -  
targetNamespace -  

SchemaGrammar

protected SchemaGrammar(SymbolTable symbolTable)
Special constructor to create the grammar for the schema namespace
Parameters:
symbolTable -  
fullSet -  
Method Detail

isNamespaceAware

public boolean isNamespaceAware()

getTargetNamespace

public final java.lang.String getTargetNamespace()
Returns this grammar's target namespace.

addGlobalAttributeDecl

public final void addGlobalAttributeDecl(XSAttributeDecl decl)
register one global attribute

addGlobalAttributeGroupDecl

public final void addGlobalAttributeGroupDecl(XSAttributeGroupDecl decl)
register one global attribute group

addGlobalElementDecl

public final void addGlobalElementDecl(XSElementDecl decl)
register one global element

addGlobalGroupDecl

public final void addGlobalGroupDecl(XSGroupDecl decl)
register one global group

addGlobalNotationDecl

public final void addGlobalNotationDecl(XSNotationDecl decl)
register one global notation

addGlobalTypeDecl

public final void addGlobalTypeDecl(XSTypeDecl decl)
register one global type

addIDConstraintDecl

public final void addIDConstraintDecl(XSElementDecl elmDecl,
                                      IdentityConstraint decl)
register one identity constraint

getGlobalAttributeDecl

public final XSAttributeDecl getGlobalAttributeDecl(java.lang.String declName)
get one global attribute

getGlobalAttributeGroupDecl

public final XSAttributeGroupDecl getGlobalAttributeGroupDecl(java.lang.String declName)
get one global attribute group

getGlobalElementDecl

public final XSElementDecl getGlobalElementDecl(java.lang.String declName)
get one global element

getGlobalGroupDecl

public final XSGroupDecl getGlobalGroupDecl(java.lang.String declName)
get one global group

getNotationDecl

public final XSNotationDecl getNotationDecl(java.lang.String declName)
get one global notation

getGlobalTypeDecl

public final XSTypeDecl getGlobalTypeDecl(java.lang.String declName)
get one global type

getIDConstraintDecl

public final IdentityConstraint getIDConstraintDecl(java.lang.String declName)
get one identity constraint

addComplexTypeDecl

public final void addComplexTypeDecl(XSComplexTypeDecl decl)
add one complex type decl: for later constraint checking


Copyright © 1999-2001 Apache XML Project. All Rights Reserved.