Class XMLSchemaValidator.ValueStoreBase
- java.lang.Object
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.xs.XMLSchemaValidator.ValueStoreBase
-
- All Implemented Interfaces:
ValueStore
- Direct Known Subclasses:
XMLSchemaValidator.KeyRefValueStore,XMLSchemaValidator.KeyValueStore,XMLSchemaValidator.UniqueValueStore
- Enclosing class:
- XMLSchemaValidator
protected abstract class XMLSchemaValidator.ValueStoreBase extends Object implements ValueStore
Value store implementation base class. There are specific subclasses for handling unique, key, and keyref.- Author:
- Andy Clark, IBM
-
-
Field Summary
Fields Modifier and Type Field Description protected intfFieldCountprotected Field[]fFieldsprotected IdentityConstraintfIdentityConstraintIdentity constraint.VectorfItemValueTypesprotected ShortList[]fLocalItemValueTypesprotected Object[]fLocalValuescurrent dataprotected short[]fLocalValueTypesVectorfValuesglobal dataprotected intfValuesCountCurrent data value count.XMLSchemaValidator.ShortVectorfValueTypes
-
Constructor Summary
Constructors Modifier Constructor Description protectedValueStoreBase(IdentityConstraint identityConstraint)Constructs a value store for the specified identity constraint.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValue(Field field, boolean mayMatch, Object actualValue, short valueType, ShortList itemValueType)Adds the specified value to the value store.voidappend(XMLSchemaValidator.ValueStoreBase newVal)protected voidcheckDuplicateValues()voidclear()booleancontains()Returns true if this value store contains the locally scoped value storesintcontains(XMLSchemaValidator.ValueStoreBase vsb)Returns -1 if this value store contains the specified values, otherwise the index of the first field in the key sequence.voidendDocument()Signals the end of the document.voidendDocumentFragment()voidendValueScope()Ends scope for value store.voidreportError(String key, Object[] args)Since the valueStore will have access to an error reporter, this allows it to be called appropriately.voidstartValueScope()Start scope for value store.StringtoString()Returns a string representation of this object.protected StringtoString(Object[] values)Returns a string of the specified values.protected StringtoString(Vector values, int start, int length)Returns a string of the specified values.
-
-
-
Field Detail
-
fIdentityConstraint
protected IdentityConstraint fIdentityConstraint
Identity constraint.
-
fFieldCount
protected int fFieldCount
-
fFields
protected Field[] fFields
-
fLocalValues
protected Object[] fLocalValues
current data
-
fLocalValueTypes
protected short[] fLocalValueTypes
-
fLocalItemValueTypes
protected ShortList[] fLocalItemValueTypes
-
fValuesCount
protected int fValuesCount
Current data value count.
-
fValues
public final Vector fValues
global data
-
fValueTypes
public XMLSchemaValidator.ShortVector fValueTypes
-
fItemValueTypes
public Vector fItemValueTypes
-
-
Constructor Detail
-
ValueStoreBase
protected ValueStoreBase(IdentityConstraint identityConstraint)
Constructs a value store for the specified identity constraint.
-
-
Method Detail
-
clear
public void clear()
-
append
public void append(XMLSchemaValidator.ValueStoreBase newVal)
-
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
public void reportError(String key, Object[] args)
Description copied from interface:ValueStoreSince the valueStore will have access to an error reporter, this allows it to be called appropriately.- Specified by:
reportErrorin 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, ShortList itemValueType)
Adds the specified value to the value store.- Specified by:
addValuein 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
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.
-
checkDuplicateValues
protected void checkDuplicateValues()
-
toString
protected String toString(Vector values, int start, int length)
Returns a string of the specified values.
-
-