Package org.apache.xerces.impl.xs
Class XMLSchemaValidator.ValueStoreBase
java.lang.Object
org.apache.xerces.impl.xs.XMLSchemaValidator.ValueStoreBase
- All Implemented Interfaces:
ValueStore
- Direct Known Subclasses:
XMLSchemaValidator.KeyRefValueStore
,XMLSchemaValidator.KeyValueStore
,XMLSchemaValidator.UniqueValueStore
- Enclosing class:
XMLSchemaValidator
Value store implementation base class. There are specific subclasses
for handling unique, key, and keyref.
- Author:
- Andy Clark, IBM
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected Field[]
protected boolean
protected IdentityConstraint
Identity constraint.protected org.apache.xerces.xs.ShortList[]
protected Object[]
current dataprotected short[]
final Vector
global dataprotected int
Current data value count. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ValueStoreBase
(IdentityConstraint identityConstraint) Constructs a value store for the specified identity constraint. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addValue
(Field field, boolean mayMatch, Object actualValue, short valueType, org.apache.xerces.xs.ShortList itemValueType) Adds the specified value to the value store.void
protected void
void
clear()
boolean
contains()
Returns true if this value store contains the locally scoped value storesint
Returns -1 if this value store contains the specified values, otherwise the index of the first field in the key sequence.void
Signals the end of the document.void
void
Ends scope for value store.void
reportError
(String key, Object[] args) Since the valueStore will have access to an error reporter, this allows it to be called appropriately.void
Start scope for value store.toString()
Returns a string representation of this object.protected String
Returns a string of the specified values.protected String
Returns a string of the specified values.
-
Field Details
-
fIdentityConstraint
Identity constraint. -
fFieldCount
protected int fFieldCount -
fFields
-
fLocalValues
current data -
fLocalValueTypes
protected short[] fLocalValueTypes -
fLocalItemValueTypes
protected org.apache.xerces.xs.ShortList[] fLocalItemValueTypes -
fValuesCount
protected int fValuesCountCurrent data value count. -
fHasValue
protected boolean fHasValue -
fValues
global data -
fValueTypes
-
fItemValueTypes
-
-
Constructor Details
-
ValueStoreBase
Constructs a value store for the specified identity constraint.
-
-
Method Details
-
clear
public void clear() -
append
-
startValueScope
public void startValueScope()Start scope for value store. -
endValueScope
public void endValueScope()Ends scope for value store. -
endDocumentFragment
public void endDocumentFragment() -
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. -
reportError
Description copied from interface:ValueStore
Since the valueStore will have access to an error reporter, this allows it to be called appropriately.- Specified by:
reportError
in interfaceValueStore
- Parameters:
key
- the key of the localized error messageargs
- the list of arguments for substitution.
-
addValue
public void addValue(Field field, boolean mayMatch, Object actualValue, short valueType, org.apache.xerces.xs.ShortList itemValueType) Adds the specified value to the value store.- Specified by:
addValue
in interfaceValueStore
- 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.mayMatch
- a flag indiciating whether the field may be matched.actualValue
- The value to add.valueType
- Type of the value to add.itemValueType
- If the value is a list, a list of types for each of the values in the list.
-
contains
public boolean contains()Returns true if this value store contains the locally scoped value stores -
contains
Returns -1 if this value store contains the specified values, otherwise the index of the first field in the key sequence. -
checkDuplicateValues
protected void checkDuplicateValues() -
toString
Returns a string of the specified values. -
toString
Returns a string of the specified values. -
toString
Returns a string representation of this object.
-