org.apache.xerces.impl.xs

Class XMLSchemaValidator.ValueStoreBase

Enclosing Class:
XMLSchemaValidator
Implemented Interfaces:
ValueStore
Known Direct Subclasses:
XMLSchemaValidator.KeyRefValueStore, XMLSchemaValidator.KeyValueStore, XMLSchemaValidator.UniqueValueStore

protected abstract class XMLSchemaValidator.ValueStoreBase
extends java.lang.Object
implements ValueStore

Value store implementation base class. There are specific subclasses for handling unique, key, and keyref.

Author:
Andy Clark, IBM

Field Summary

protected int
fFieldCount
protected Field[]
fFields
protected IdentityConstraint
fIdentityConstraint
Identity constraint.
protected Object[]
fLocalValues
current data
Vector
fValues
global data
protected int
fValuesCount
Current data value count.

Constructor Summary

ValueStoreBase(IdentityConstraint identityConstraint)
Constructs a value store for the specified identity constraint.

Method Summary

void
addValue(Field field, Object actualValue)
Adds the specified value to the value store.
void
append(XMLSchemaValidator.ValueStoreBase newVal)
protected void
checkDuplicateValues()
void
clear()
boolean
contains()
Returns true if this value store contains the locally scoped value stores
Object
contains(Vector values)
Returns true if this value store contains the specified values.
void
endDocument()
Signals the end of the document.
void
endDocumentFragment()
void
endValueScope()
Ends scope for value store.
void
reportError(String key, Object[] args)
void
startValueScope()
Start scope for value store.
String
toString()
Returns a string representation of this object.
protected String
toString(Object[] values)
Returns a string of the specified values.

Field Details

fFieldCount

protected int fFieldCount


fFields

protected Field[] fFields


fIdentityConstraint

protected IdentityConstraint fIdentityConstraint
Identity constraint.


fLocalValues

protected Object[] fLocalValues
current data


fValues

public final Vector fValues
global data


fValuesCount

protected int fValuesCount
Current data value count.

Constructor Details

ValueStoreBase

protected ValueStoreBase(IdentityConstraint identityConstraint)
Constructs a value store for the specified identity constraint.

Method Details

addValue

public void addValue(Field field,
                     Object actualValue)
Adds the specified value to the value store.
Specified by:
addValue in interface ValueStore

Parameters:
field - The field associated to the value. This reference is used to ensure that each field only adds a value once within a selection scope.


append

public void append(XMLSchemaValidator.ValueStoreBase newVal)


checkDuplicateValues

protected void checkDuplicateValues()


clear

public void clear()


contains

public boolean contains()
Returns true if this value store contains the locally scoped value stores


contains

public Object contains(Vector values)
Returns true if this value store contains the specified values.


endDocument

public void endDocument()
Signals the end of the document. This is where the specific instances of value stores can verify the integrity of the identity constraints.


endDocumentFragment

public void endDocumentFragment()


endValueScope

public void endValueScope()
Ends scope for value store.


reportError

public void reportError(String key,
                        Object[] args)
Specified by:
reportError in interface ValueStore


startValueScope

public void startValueScope()
Start scope for value store.


toString

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


toString

protected String toString(Object[] values)
Returns a string of the specified values.


Copyright B) 1999-2004 Apache XML Project. All Rights Reserved.