org.apache.xerces.impl.xs

Class XMLSchemaValidator.ValueStoreCache

protected class XMLSchemaValidator.ValueStoreCache extends Object

Value store cache. This class is used to store the values for identity constraints.

Author: Andy Clark, IBM

Field Summary
protected HashtablefGlobalIDConstraintMap
protected StackfGlobalMapStack
protected HashtablefIdentityConstraint2ValueStoreMap
Values stores associated to specific identity constraints.
protected VectorfValueStores
stores all global Values stores.
Constructor Summary
ValueStoreCache()
Default constructor.
Method Summary
voidendDocument()
Check identity constraints.
voidendElement()
endElement(): merges contents of fGlobalIDConstraintMap with the top of fGlobalMapStack into fGlobalIDConstraintMap.
XMLSchemaValidator.ValueStoreBasegetGlobalValueStoreFor(IdentityConstraint id)
Returns the global value store associated to the specified IdentityConstraint.
XMLSchemaValidator.ValueStoreBasegetValueStoreFor(IdentityConstraint id, int initialDepth)
Returns the value store associated to the specified IdentityConstraint.
voidinitValueStoresFor(XSElementDecl eDecl, FieldActivator activator)
Initializes the value stores for the specified element declaration.
voidstartDocument()
Resets the identity constraint cache.
voidstartElement()
StringtoString()
Returns a string representation of this object.
voidtransplant(IdentityConstraint id, int initialDepth)

Field Detail

fGlobalIDConstraintMap

protected final Hashtable fGlobalIDConstraintMap

fGlobalMapStack

protected final Stack fGlobalMapStack

fIdentityConstraint2ValueStoreMap

protected final Hashtable fIdentityConstraint2ValueStoreMap
Values stores associated to specific identity constraints. This hashtable maps IdentityConstraints and the 0-based element on which their selectors first matched to a corresponding ValueStore. This should take care of all cases, including where ID constraints with descendant-or-self axes occur on recursively-defined elements.

fValueStores

protected final Vector fValueStores
stores all global Values stores.

Constructor Detail

ValueStoreCache

public ValueStoreCache()
Default constructor.

Method Detail

endDocument

public void endDocument()
Check identity constraints.

endElement

public void endElement()
endElement(): merges contents of fGlobalIDConstraintMap with the top of fGlobalMapStack into fGlobalIDConstraintMap.

getGlobalValueStoreFor

public XMLSchemaValidator.ValueStoreBase getGlobalValueStoreFor(IdentityConstraint id)
Returns the global value store associated to the specified IdentityConstraint.

getValueStoreFor

public XMLSchemaValidator.ValueStoreBase getValueStoreFor(IdentityConstraint id, int initialDepth)
Returns the value store associated to the specified IdentityConstraint.

initValueStoresFor

public void initValueStoresFor(XSElementDecl eDecl, FieldActivator activator)
Initializes the value stores for the specified element declaration.

startDocument

public void startDocument()
Resets the identity constraint cache.

startElement

public void startElement()

toString

public String toString()
Returns a string representation of this object.

transplant

public void transplant(IdentityConstraint id, int initialDepth)
Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.