org.apache.xerces.impl.xs

## Class XMLSchemaValidatorBase.ValueStoreBase

- java.lang.Object
- - org.apache.xerces.impl.xs.XMLSchemaValidatorBase.ValueStoreBase

- All Implemented Interfaces:
    ValueStore
  Direct Known Subclasses:
    XMLSchemaValidatorBase.KeyRefValueStore, XMLSchemaValidatorBase.KeyValueStore, XMLSchemaValidatorBase.UniqueValueStore
  Enclosing class:
    XMLSchemaValidatorBase

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

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `fElementName`
    `protected int` | `fFieldCount`
    `protected Field[]` | `fFields`
    `protected boolean` | `fHasValue`
    `protected IdentityConstraint` | `fIdentityConstraint` Identity constraint.
    `java.util.Vector` | `fItemValueTypes`
    `protected org.apache.xerces.xs.ShortList[]` | `fLocalItemValueTypes`
    `protected java.lang.Object[]` | `fLocalValues` current data
    `protected short[]` | `fLocalValueTypes`
    `java.util.Vector` | `fValues` global data
    `protected int` | `fValuesCount` Current data value count.
    `XMLSchemaValidatorBase.ShortVector` | `fValueTypes`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `XMLSchemaValidatorBase.ValueStoreBase(IdentityConstraint identityConstraint, java.lang.String elementName)` Constructs a value store for the specified identity constraint.

  - ### 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.
    `void` | `append(XMLSchemaValidatorBase.ValueStoreBase newVal)`
    `protected void` | `checkDuplicateValues()`
    `void` | `clear()`
    `boolean` | `contains()` Returns true if this value store contains the locally scoped value stores
    `int` | `contains(XMLSchemaValidatorBase.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.
    `java.lang.String` | `getElementName()` Returns the name of the element which holds the identity constraint that is stored in this value store
    `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 that is stored in this value store
    `void` | `startValueScope()` Start scope for value store.
    `java.lang.String` | `toString()` Returns a string representation of this object.
    `protected java.lang.String` | `toString(java.lang.Object[] values)` Returns a string of the specified values.
    `protected java.lang.String` | `toString(java.util.Vector values, int start, int length)` Returns a string of the specified values.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### fIdentityConstraint

          protected IdentityConstraint fIdentityConstraint

      Identity constraint.

    - #### fFieldCount

          protected int fFieldCount

    - #### fFields

          protected Field[] fFields

    - #### fElementName

          protected java.lang.String fElementName

    - #### fLocalValues

          protected java.lang.Object[] fLocalValues

      current data

    - #### fLocalValueTypes

          protected short[] fLocalValueTypes

    - #### fLocalItemValueTypes

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

    - #### fValuesCount

          protected int fValuesCount

      Current data value count.

    - #### fHasValue

          protected boolean fHasValue

    - #### fValues

          public final java.util.Vector fValues

      global data

    - #### fValueTypes

          public XMLSchemaValidatorBase.ShortVector fValueTypes

    - #### fItemValueTypes

          public java.util.Vector fItemValueTypes

  - ### Constructor Detail

    - #### XMLSchemaValidatorBase.ValueStoreBase

          protected XMLSchemaValidatorBase.ValueStoreBase(IdentityConstraint identityConstraint,
                                               java.lang.String elementName)

      Constructs a value store for the specified identity constraint.

  - ### Method Detail

    - #### clear

          public void clear()

    - #### append

          public void append(XMLSchemaValidatorBase.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(java.lang.String key,
                         java.lang.Object[] args)

      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 interface `ValueStore`
      Parameters:
        `key` - the key of the localized error message
        `args` - the list of arguments for substitution.

    - #### addValue

          public 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.
      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.
        `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.

    - #### setElementName

          public void setElementName(java.lang.String elementName)

      Sets the name of the element which holds the identity constraint that is stored in this value store
      Specified by:
        `setElementName` in interface `ValueStore`

    - #### getElementName

          public java.lang.String getElementName()

      Returns the name of the element which holds the identity constraint that is stored in this value store
      Specified by:
        `getElementName` in interface `ValueStore`
      Returns:
        the name of the element which holds the identity constraint that is stored in this value store

    - #### contains

          public boolean contains()

      Returns true if this value store contains the locally scoped value stores

    - #### contains

          public int contains(XMLSchemaValidatorBase.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 java.lang.String toString(java.lang.Object[] values)

      Returns a string of the specified values.

    - #### toString

          protected java.lang.String toString(java.util.Vector values,
                                  int start,
                                  int length)

      Returns a string of the specified values.

    - #### toString

          public java.lang.String toString()

      Returns a string representation of this object.
      Overrides:
        `toString` in class `java.lang.Object`

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