org.apache.xerces.impl.validation.grammars
Class SchemaGrammar
java.lang.Object
|
+--org.apache.xerces.impl.validation.Grammar
|
+--org.apache.xerces.impl.validation.grammars.SchemaGrammar
- public class SchemaGrammar
- extends Grammar
SchemaGrammar holds all the extra information needed for schema validation
on top of the basic information in the Grammar.
- Version:
- $Id: SchemaGrammar.java,v 1.1.2.6 2001/01/30 04:17:02 andyc Exp $
- Author:
- ericye, IBM, Stubs generated by DesignDoc on Mon Sep 11 11:10:57 PDT 2000
Method Summary |
protected void |
addAttDef(int templateElementIndex,
org.apache.xerces.xni.QName attQName,
int attType,
java.lang.String[] enumeration,
int attDefaultType,
java.lang.String attDefaultValue,
DatatypeValidator dv,
boolean isList)
|
protected int |
addContentSpecLeafNode(short contentSpecType,
java.lang.String value,
java.lang.String otherValue)
use this method for Leaf type node |
protected int |
addContentSpecNode(short contentSpecType,
int value,
int otherValue)
use this method for none Leaf type node |
protected int |
addElementDecl(org.apache.xerces.xni.QName eltQName,
int enclosingScope,
int scopeDefined,
int contentSpecType,
int contentSpecIndex,
int attrListHead,
DatatypeValidator dv,
short defaultType,
java.lang.String defaultValue)
|
java.util.Hashtable |
getAttirubteDeclRegistry()
|
int |
getAttributeDeclIndex(int elementIndex,
org.apache.xerces.xni.QName attribute)
|
java.util.Hashtable |
getComplexTypeRegistry()
|
DatatypeValidatorFactoryImpl |
getDatatypeRegistry()
|
int |
getElementDeclBlockSet(int elementDeclIndex)
|
int |
getElementDeclFinalSet(int elementDeclIndex)
|
int |
getElementDeclMiscFlags(int elementDeclIndex)
|
java.lang.String |
getElementDeclSubstituteGrpElementFullName(int elementDeclIndex)
|
int |
getElementDefaultTYpe(int elementDeclIndex)
|
java.lang.String |
getElementDefaultValue(int elementDeclIndex)
|
int |
getElementDefinedScope(int elementDeclIndex)
|
java.lang.String |
getElementFromAnotherSchemaURI(int elementDeclIndex)
|
org.xml.sax.helpers.NamespaceSupport |
getNamespacesScope()
|
java.lang.String |
getTargetNamespaceURI()
|
boolean |
isDTD()
public TraverseSchema.ComplexTypeInfo getElementComplexTypeInfo(int elementDeclIndex){
if (elementDeclIndex <- 1) {
return null;
}
int chunk = elementDeclIndex >> CHUNK_SHIFT;
int index = elementDeclIndex & CHUNK_MASK;
return fComplexTypeInfo[chunk][index];
}
/ |
boolean |
isNamespaceAware()
Returns true if this grammar is namespace aware. |
protected void |
setAttributeDeclRegistry(java.util.Hashtable attrReg)
|
protected void |
setComplexTypeRegistry(java.util.Hashtable cTypeReg)
|
protected void |
setDatatypeRegistry(DatatypeValidatorFactoryImpl dTypeReg)
|
protected void |
setElementDeclBlockSet(int elementDeclIndex,
int blockSet)
|
protected void |
setElementDeclFinalSet(int elementDeclIndex,
int finalSet)
|
protected void |
setElementDeclMiscFlags(int elementDeclIndex,
int miscFlags)
|
protected void |
setElementDeclSubstituteGrpElementFullName(int elementDeclIndex,
java.lang.String SubstituteGrpFullName)
|
protected void |
setElementDefault(int elementDeclIndex,
int defaultType,
java.lang.String defaultValue)
protected void setElementComplexTypeInfo(int elementDeclIndex, TraverseSchema.ComplexTypeInfo typeInfo){
int chunk = elementDeclIndex >> CHUNK_SHIFT;
int index = elementDeclIndex & CHUNK_MASK;
ensureElementDeclCapacity(chunk);
if (elementDeclIndex > -1 ) {
fComplexTypeInfo[chunk][index] = typeInfo;
}
}
/ |
protected void |
setElementDefinedScope(int elementDeclIndex,
int scopeDefined)
|
protected void |
setElementFromAnotherSchemaURI(int elementDeclIndex,
java.lang.String anotherSchemaURI)
|
protected void |
setNamespacesScope(org.xml.sax.helpers.NamespaceSupport nsSupport)
|
protected void |
setTargetNamespaceURI(java.lang.String targetNSUri)
|
Methods inherited from class org.apache.xerces.impl.validation.Grammar |
createAttributeDecl,
createContentSpec,
createElementDecl,
createEntityDecl,
createNotationDecl,
getAttributeDecl,
getAttributeDeclIndex,
getContentSpec,
getContentSpecAsString,
getElementContentModelValidator,
getElementDecl,
getElementDeclIndex,
getElementDeclIndex,
getEntityDecl,
getEntityDeclIndex,
getFirstAttributeDeclIndex,
getFirstElementDeclIndex,
getFirstEntityDeclIndex,
getFirstNotationDeclIndex,
getNextAttributeDeclIndex,
getNextElementDeclIndex,
getNextEntityDeclIndex,
getNextNotationDeclIndex,
getNotationDecl,
getNotationDeclIndex,
getSymbolTable,
getTargetNamespace,
isCDATAAttribute,
printAttributes,
printElements,
putElementNameMapping,
setAttributeDecl,
setContentSpec,
setContentSpecIndex,
setElementDecl,
setEntityDecl,
setFirstAttributeDeclIndex,
setNotationDecl,
setTargetNamespace |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
SchemaGrammar
public SchemaGrammar(SymbolTable symbolTable)
- Default constructor.
getNamespacesScope
public org.xml.sax.helpers.NamespaceSupport getNamespacesScope()
getTargetNamespaceURI
public java.lang.String getTargetNamespaceURI()
getAttirubteDeclRegistry
public java.util.Hashtable getAttirubteDeclRegistry()
getComplexTypeRegistry
public java.util.Hashtable getComplexTypeRegistry()
getDatatypeRegistry
public DatatypeValidatorFactoryImpl getDatatypeRegistry()
getElementDefinedScope
public int getElementDefinedScope(int elementDeclIndex)
getAttributeDeclIndex
public int getAttributeDeclIndex(int elementIndex,
org.apache.xerces.xni.QName attribute)
getElementDefaultTYpe
public int getElementDefaultTYpe(int elementDeclIndex)
getElementDeclBlockSet
public int getElementDeclBlockSet(int elementDeclIndex)
getElementDeclFinalSet
public int getElementDeclFinalSet(int elementDeclIndex)
getElementDeclMiscFlags
public int getElementDeclMiscFlags(int elementDeclIndex)
getElementFromAnotherSchemaURI
public java.lang.String getElementFromAnotherSchemaURI(int elementDeclIndex)
getElementDefaultValue
public java.lang.String getElementDefaultValue(int elementDeclIndex)
getElementDeclSubstituteGrpElementFullName
public java.lang.String getElementDeclSubstituteGrpElementFullName(int elementDeclIndex)
isDTD
public boolean isDTD()
- public TraverseSchema.ComplexTypeInfo getElementComplexTypeInfo(int elementDeclIndex){
if (elementDeclIndex <- 1) {
return null;
}
int chunk = elementDeclIndex >> CHUNK_SHIFT;
int index = elementDeclIndex & CHUNK_MASK;
return fComplexTypeInfo[chunk][index];
}
/
- Overrides:
- isDTD in class Grammar
isNamespaceAware
public boolean isNamespaceAware()
- Returns true if this grammar is namespace aware.
- Overrides:
- isNamespaceAware in class Grammar
setAttributeDeclRegistry
protected void setAttributeDeclRegistry(java.util.Hashtable attrReg)
setComplexTypeRegistry
protected void setComplexTypeRegistry(java.util.Hashtable cTypeReg)
setDatatypeRegistry
protected void setDatatypeRegistry(DatatypeValidatorFactoryImpl dTypeReg)
setNamespacesScope
protected void setNamespacesScope(org.xml.sax.helpers.NamespaceSupport nsSupport)
setTargetNamespaceURI
protected void setTargetNamespaceURI(java.lang.String targetNSUri)
setElementDefinedScope
protected void setElementDefinedScope(int elementDeclIndex,
int scopeDefined)
setElementFromAnotherSchemaURI
protected void setElementFromAnotherSchemaURI(int elementDeclIndex,
java.lang.String anotherSchemaURI)
setElementDefault
protected void setElementDefault(int elementDeclIndex,
int defaultType,
java.lang.String defaultValue)
- protected void setElementComplexTypeInfo(int elementDeclIndex, TraverseSchema.ComplexTypeInfo typeInfo){
int chunk = elementDeclIndex >> CHUNK_SHIFT;
int index = elementDeclIndex & CHUNK_MASK;
ensureElementDeclCapacity(chunk);
if (elementDeclIndex > -1 ) {
fComplexTypeInfo[chunk][index] = typeInfo;
}
}
/
setElementDeclBlockSet
protected void setElementDeclBlockSet(int elementDeclIndex,
int blockSet)
setElementDeclFinalSet
protected void setElementDeclFinalSet(int elementDeclIndex,
int finalSet)
setElementDeclMiscFlags
protected void setElementDeclMiscFlags(int elementDeclIndex,
int miscFlags)
setElementDeclSubstituteGrpElementFullName
protected void setElementDeclSubstituteGrpElementFullName(int elementDeclIndex,
java.lang.String SubstituteGrpFullName)
addElementDecl
protected int addElementDecl(org.apache.xerces.xni.QName eltQName,
int enclosingScope,
int scopeDefined,
int contentSpecType,
int contentSpecIndex,
int attrListHead,
DatatypeValidator dv,
short defaultType,
java.lang.String defaultValue)
- Returns:
- elementDecl Index,
addAttDef
protected void addAttDef(int templateElementIndex,
org.apache.xerces.xni.QName attQName,
int attType,
java.lang.String[] enumeration,
int attDefaultType,
java.lang.String attDefaultValue,
DatatypeValidator dv,
boolean isList)
- Returns:
- the new attribute List Head
addContentSpecNode
protected int addContentSpecNode(short contentSpecType,
int value,
int otherValue)
- use this method for none Leaf type node
- Returns:
- the new contentSpec Index
addContentSpecLeafNode
protected int addContentSpecLeafNode(short contentSpecType,
java.lang.String value,
java.lang.String otherValue)
- use this method for Leaf type node
- Returns:
- the new contentSpec Index
Copyright © 1999-2001 Apache XML Project. All Rights Reserved.