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.
Vector
fItemValueTypes
protected org.apache.xerces.xs.ShortList[]
fLocalItemValueTypes
protected short[]
fLocalValueTypes
protected Object[]
fLocalValues
current data
XMLSchemaValidator.ShortVector
fValueTypes
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, short valueType, org.apache.xerces.xs.ShortList itemValueType)
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
int
contains(XMLSchemaValidator.ValueStoreBase vsb)
Returns -1 if this value store contains the specified values, otherwise the index of the first field in the key sequence.
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.
protected String
toString(Vector values, int start, int length)
Returns a string of the specified values.

Field Details

fFieldCount

protected int fFieldCount

fFields

protected Field[] fFields

fIdentityConstraint

protected IdentityConstraint fIdentityConstraint
Identity constraint.

fItemValueTypes

public Vector fItemValueTypes

fLocalItemValueTypes

protected org.apache.xerces.xs.ShortList[] fLocalItemValueTypes

fLocalValueTypes

protected short[] fLocalValueTypes

fLocalValues

protected Object[] fLocalValues
current data

fValueTypes

public XMLSchemaValidator.ShortVector fValueTypes

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,
                     short valueType,
                     org.apache.xerces.xs.ShortList itemValueType)
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.
actualValue - The value to add.

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 int contains(XMLSchemaValidator.ValueStoreBase vsb)
Returns -1 if this value store contains the specified values, otherwise the index of the first field in the key sequence.

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.

toString

protected String toString(Vector values,
                          int start,
                          int length)
Returns a string of the specified values.

Copyright B) 1999-2006 The Apache Software Foundation. All Rights Reserved.