org.apache.xerces.impl.xs.identity

## Interface ValueStore

- All Known Implementing Classes:
    XMLSchemaValidatorBase.KeyRefValueStore, XMLSchemaValidatorBase.KeyValueStore, XMLSchemaValidatorBase.UniqueValueStore, XMLSchemaValidatorBase.ValueStoreBase

      public interface ValueStore

  Interface for storing values associated to an identity constraint. Each value stored corresponds to a field declared for the identity constraint. One instance of an object implementing this interface is created for each identity constraint per element declaration in the instance document to store the information for this identity constraint.

  Note: The component performing identity constraint collection and validation is responsible for providing an implementation of this interface. The component is also responsible for performing the necessary checks required by each type of identity constraint.

  Version:
    $Id: ValueStore.java 730488 2008-12-31 21:58:19Z knoaman $
  Author:
    Andy Clark, IBM

  # INTERNAL:

    Usage of this class is not supported. It may be altered or removed at any time.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addValue(Field field, boolean mayMatch, java.lang.Object actualValue, short valueType, org.apache.xerces.xs.ShortList itemValueType)` Adds the specified value to the value store.
    `java.lang.String` | `getElementName()`
    `void` | `reportError(java.lang.String key, java.lang.Object[] args)` Since the valueStore will have access to an error reporter, this allows it to be called appropriately.
    `void` | `setElementName(java.lang.String elementName)` Sets the name of the element which holds the identity constraint

- - ### Method Detail

    - #### addValue

          void addValue(Field field,
                      boolean mayMatch,
                      java.lang.Object actualValue,
                      short valueType,
                      org.apache.xerces.xs.ShortList itemValueType)

      Adds the specified value to the value store.
      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.

    - #### reportError

          void reportError(java.lang.String key,
                         java.lang.Object[] args)

      Since the valueStore will have access to an error reporter, this allows it to be called appropriately.
      Parameters:
        `key` - the key of the localized error message
        `args` - the list of arguments for substitution.

    - #### setElementName

          void setElementName(java.lang.String elementName)

      Sets the name of the element which holds the identity constraint
      Parameters:
        `elemenName` - The name of the element which holds the identity constraint.

    - #### getElementName

          java.lang.String getElementName()

      Returns:
        the name of the element which holds the identity constraint that is stored in this value store

Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.