Package org.apache.xmlbeans.impl.values

## Interface TypeStoreUser

- All Known Implementing Classes:
    `AllDocumentImpl`, `AllImpl`, `AllImpl.MaxOccursImpl`, `AllImpl.MinOccursImpl`, `AllNNIImpl`, `AllNNIImpl.MemberImpl`, `AnnotatedImpl`, `AnnotationDocumentImpl`, `AnnotationDocumentImpl.AnnotationImpl`, `AnyAttributeDocumentImpl`, `AnyDocumentImpl`, `AnyDocumentImpl.AnyImpl`, `AppinfoDocumentImpl`, `AppinfoDocumentImpl.AppinfoImpl`, `AttributeDocumentImpl`, `AttributeGroupDocumentImpl`, `AttributeGroupImpl`, `AttributeGroupRefImpl`, `AttributeImpl`, `AttributeImpl.UseImpl`, `BaseAttributeImpl`, `BlockSetImpl`, `BlockSetImpl.MemberImpl`, `BlockSetImpl.MemberImpl2`, `BlockSetImpl.MemberImpl2.ItemImpl`, `ChoiceDocumentImpl`, `CodeImpl`, `ComplexContentDocumentImpl`, `ComplexContentDocumentImpl.ComplexContentImpl`, `ComplexRestrictionTypeImpl`, `ComplexTypeDocumentImpl`, `ComplexTypeImpl`, `ConfigDocumentImpl`, `ConfigDocumentImpl.ConfigImpl`, `DefinitionsDocumentImpl`, `DefinitionsDocumentImpl.DefinitionsImpl`, `DerivationControlImpl`, `DerivationSetImpl`, `DerivationSetImpl.MemberImpl`, `DerivationSetImpl.MemberImpl2`, `DocumentationDocumentImpl`, `DocumentationDocumentImpl.DocumentationImpl`, `DownloadedSchemaEntryImpl`, `DownloadedSchemasDocumentImpl`, `DownloadedSchemasDocumentImpl.DownloadedSchemasImpl`, `ElementDocumentImpl`, `ElementImpl`, `EnumerationDocumentImpl`, `ExplicitGroupImpl`, `ExtensionconfigImpl`, `ExtensionconfigImpl.InterfaceImpl`, `ExtensionconfigImpl.PrePostSetImpl`, `ExtensionTypeImpl`, `FacetImpl`, `FieldDocumentImpl`, `FieldDocumentImpl.FieldImpl`, `FieldDocumentImpl.FieldImpl.XpathImpl`, `FileDescImpl`, `FileDescImpl.RoleImpl`, `FormChoiceImpl`, `FractionDigitsDocumentImpl`, `FullDerivationSetImpl`, `FullDerivationSetImpl.MemberImpl`, `FullDerivationSetImpl.MemberImpl2`, `GroupDocumentImpl`, `GroupImpl`, `GroupRefImpl`, `IdAttributeImpl`, `ImportDocumentImpl`, `ImportDocumentImpl.ImportImpl`, `IncludeDocumentImpl`, `IncludeDocumentImpl.IncludeImpl`, `JavaBase64Holder`, `JavaBase64HolderEx`, `JavaBooleanHolder`, `JavaBooleanHolderEx`, `JavaDecimalHolder`, `JavaDecimalHolderEx`, `JavaDoubleHolder`, `JavaDoubleHolderEx`, `JavaFloatHolder`, `JavaFloatHolderEx`, `JavaGDateHolderEx`, `JavaGDurationHolderEx`, `JavaHexBinaryHolder`, `JavaHexBinaryHolderEx`, `JavaIntegerHolder`, `JavaIntegerHolderEx`, `JavaIntHolder`, `JavaIntHolderEx`, `JavaLongHolder`, `JavaLongHolderEx`, `JavaNameImpl`, `JavaNameListImpl`, `JavaNameListImpl.MemberImpl`, `JavaNameListImpl.MemberImpl2`, `JavaNotationHolder`, `JavaNotationHolderEx`, `JavaQNameHolder`, `JavaQNameHolderEx`, `JavaStringEnumerationHolderEx`, `JavaStringHolder`, `JavaStringHolderEx`, `JavaUriHolder`, `JavaUriHolderEx`, `KeybaseImpl`, `KeyDocumentImpl`, `KeyrefDocumentImpl`, `KeyrefDocumentImpl.KeyrefImpl`, `LangAttributeImpl`, `LangAttributeImpl.LangImpl`, `LangAttributeImpl.LangImpl.MemberImpl`, `LengthDocumentImpl`, `ListDocumentImpl`, `ListDocumentImpl.ListImpl`, `LocalComplexTypeImpl`, `LocalElementImpl`, `LocalSimpleTypeImpl`, `MaxExclusiveDocumentImpl`, `MaxInclusiveDocumentImpl`, `MaxLengthDocumentImpl`, `MinExclusiveDocumentImpl`, `MinInclusiveDocumentImpl`, `MinLengthDocumentImpl`, `NamedAttributeGroupImpl`, `NamedGroupImpl`, `NamedGroupImpl.AllImpl`, `NamespaceListImpl`, `NamespaceListImpl`, `NamespaceListImpl.MemberImpl`, `NamespaceListImpl.MemberImpl`, `NamespaceListImpl.MemberImpl2`, `NamespaceListImpl.MemberImpl2`, `NamespaceListImpl.MemberImpl2.ItemImpl`, `NamespaceListImpl.MemberImpl2.ItemImpl`, `NamespaceListImpl.MemberImpl2.ItemImpl.MemberImpl`, `NamespaceListImpl.MemberImpl2.ItemImpl.MemberImpl`, `NamespacePrefixListImpl`, `NarrowMaxMinImpl`, `NarrowMaxMinImpl.MaxOccursImpl`, `NarrowMaxMinImpl.MinOccursImpl`, `NoFixedFacetImpl`, `NotationDocumentImpl`, `NotationDocumentImpl.NotationImpl`, `NsconfigImpl`, `NumFacetImpl`, `OpenAttrsImpl`, `PatternDocumentImpl`, `PatternDocumentImpl.PatternImpl`, `PublicImpl`, `QnameconfigImpl`, `QnametargetenumImpl`, `QnametargetlistImpl`, `RealGroupImpl`, `RedefineDocumentImpl`, `RedefineDocumentImpl.RedefineImpl`, `ReducedDerivationControlImpl`, `RestrictionDocumentImpl`, `RestrictionDocumentImpl.RestrictionImpl`, `RestrictionTypeImpl`, `SchemaDocumentImpl`, `SchemaDocumentImpl.SchemaImpl`, `SelectorDocumentImpl`, `SelectorDocumentImpl.SelectorImpl`, `SelectorDocumentImpl.SelectorImpl.XpathImpl`, `SequenceDocumentImpl`, `SimpleContentDocumentImpl`, `SimpleContentDocumentImpl.SimpleContentImpl`, `SimpleDerivationSetImpl`, `SimpleDerivationSetImpl.MemberImpl`, `SimpleDerivationSetImpl.MemberImpl2`, `SimpleDerivationSetImpl.MemberImpl2.ItemImpl`, `SimpleExplicitGroupImpl`, `SimpleExtensionTypeImpl`, `SimpleRestrictionTypeImpl`, `SimpleTypeDocumentImpl`, `SimpleTypeImpl`, `SpaceAttributeImpl`, `SpaceAttributeImpl.SpaceImpl`, `TestCaseImpl`, `TestCaseImpl.FilesImpl`, `TestsDocumentImpl`, `TestsDocumentImpl.TestsImpl`, `TImportImpl`, `TopLevelAttributeImpl`, `TopLevelComplexTypeImpl`, `TopLevelElementImpl`, `TopLevelSimpleTypeImpl`, `TotalDigitsDocumentImpl`, `TotalDigitsDocumentImpl.TotalDigitsImpl`, `TypeDerivationControlImpl`, `UnionDocumentImpl`, `UnionDocumentImpl.UnionImpl`, `UnionDocumentImpl.UnionImpl.MemberTypesImpl`, `UniqueDocumentImpl`, `UsertypeconfigImpl`, `WhiteSpaceDocumentImpl`, `WhiteSpaceDocumentImpl.WhiteSpaceImpl`, `WhiteSpaceDocumentImpl.WhiteSpaceImpl.ValueImpl`, `WildcardImpl`, `WildcardImpl.ProcessContentsImpl`, `XmlAnySimpleTypeImpl`, `XmlAnySimpleTypeRestriction`, `XmlAnyTypeImpl`, `XmlAnyUriImpl`, `XmlAnyUriRestriction`, `XmlBase64BinaryImpl`, `XmlBase64BinaryRestriction`, `XmlBooleanImpl`, `XmlBooleanRestriction`, `XmlByteImpl`, `XmlComplexContentImpl`, `XmlDateImpl`, `XmlDateTimeImpl`, `XmlDecimalImpl`, `XmlDecimalRestriction`, `XmlDoubleImpl`, `XmlDoubleRestriction`, `XmlDurationImpl`, `XmlEntitiesImpl`, `XmlEntityImpl`, `XmlFloatImpl`, `XmlFloatRestriction`, `XmlGDayImpl`, `XmlGMonthDayImpl`, `XmlGMonthImpl`, `XmlGYearImpl`, `XmlGYearMonthImpl`, `XmlHexBinaryImpl`, `XmlHexBinaryRestriction`, `XmlIdImpl`, `XmlIdRefImpl`, `XmlIdRefsImpl`, `XmlIntegerImpl`, `XmlIntegerRestriction`, `XmlIntImpl`, `XmlIntRestriction`, `XmlLanguageImpl`, `XmlListImpl`, `XmlLongImpl`, `XmlLongRestriction`, `XmlNameImpl`, `XmlNCNameImpl`, `XmlNegativeIntegerImpl`, `XmlNmTokenImpl`, `XmlNmTokensImpl`, `XmlNonNegativeIntegerImpl`, `XmlNonPositiveIntegerImpl`, `XmlNormalizedStringImpl`, `XmlNotationImpl`, `XmlNotationRestriction`, `XmlObjectBase`, `XmlPositiveIntegerImpl`, `XmlQNameImpl`, `XmlQNameRestriction`, `XmlShortImpl`, `XmlStringEnumeration`, `XmlStringImpl`, `XmlStringRestriction`, `XmlTimeImpl`, `XmlTokenImpl`, `XmlUnionImpl`, `XmlUnsignedByteImpl`, `XmlUnsignedIntImpl`, `XmlUnsignedLongImpl`, `XmlUnsignedShortImpl`

      public interface TypeStoreUser

  Represents the strongly-typed user of a typestore. A typestore is responsible for all the lexical aspects of XML, and a typestore user is responsible for all strongly-typed aspects. Where there is interaction between the two models, it is represented by the TypeStore and TypeStoreUser interfaces.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `attach_store​(TypeStore store)` | Called to attach to the given textStore.
    `boolean` | `build_nil()` | A store will call back on build_nil after you've called invalidate_nil and it needs to know what the nil value is.
    `String` | `build_text​(NamespaceManager nsm)` | A store will call back on build_text when it knows its own text is invalid and needs to fill it in.
    `TypeStoreUser` | `create_attribute_user​(QName attrName)` | A typestore user can create a new TypeStoreUser instance for a given attribute child, based on the attribute name.
    `TypeStoreUser` | `create_element_user​(QName eltName, QName xsiType)` | A typestore user can create a new TypeStoreUser instance for a given element child name as long as you also pass the qname contained by the xsi:type attribute, if any.
    `void` | `disconnect_store()` | A store calls back on this call in order to force a disconnect.
    `SchemaField` | `get_attribute_field​(QName attrName)` | Returns the schema field for an attribute
    `SchemaType` | `get_attribute_type​(QName attrName)` | Return the SchemaType which an attribute of this name would be.
    `int` | `get_attributeflags​(QName attrName)` | Returns the flags for an attribute.
    `String` | `get_default_attribute_text​(QName attrName)` | Returns the default attribute text for the attribute with the given name.
    `String` | `get_default_element_text​(QName eltName)` | Returns the default element text, if it's consistent.
    `QNameSet` | `get_element_ending_delimiters​(QName eltname)` | A typestore user can return the element sort order to use for insertion operations if needed.
    `SchemaType` | `get_element_type​(QName eltName, QName xsiType)` | Return the SchemaType which a child element of this name and xsi:type would be.
    `int` | `get_elementflags​(QName eltName)` | Returns the elementflags, if they're consistent.
    `SchemaType` | `get_schema_type()` | Returns the schema type of this user
    `TypeStore` | `get_store()` | Returns the store to which this typestoreuser is attached, or null if none.
    `void` | `invalidate_element_order()` | A store calls back on invalidate_element_order when a rearrangement of sibling elements to the left of this element means that the nillable value may no longer be valid.
    `void` | `invalidate_nilvalue()` | A store calls back on invalidate_nilvalue when the value of the xsi:nil tag has changed.
    `void` | `invalidate_value()` | A store will call back on invalidate_value when its text has changed and it therefore knows that any cached type value is invalid.
    `boolean` | `is_child_element_order_sensitive()` | Returns false if child elements are insensitive to order; if it returns true, you're required to call invalidate_element_order on children to the right of any child order rearrangement.
    `TypeStoreVisitor` | `new_visitor()` | A typestore user can return a visitor that is used to compute default text and elementflags for an arbitrary element.
    `boolean` | `uses_invalidate_value()` | A store can call uses_invalidate_value to know if calls to invalidate_value will be fruitful.
    `void` | `validate_now()` | A store will call back on validate_now to force us to look at the text if we're in an invalid state.

- - ### Method Detail

    - #### attach_store

          void attach_store​(TypeStore store)

      Called to attach to the given textStore. When a TypeStoreUser is attached, it is put into a completely invalidated state.

    - #### get_schema_type

          SchemaType get_schema_type()

      Returns the schema type of this user

    - #### get_store

          TypeStore get_store()

      Returns the store to which this typestoreuser is attached, or null if none.

    - #### invalidate_value

          void invalidate_value()

      A store will call back on invalidate_value when its text has changed and it therefore knows that any cached type value is invalid. It is the responsibility of the type to call fetch_text and reparse next time the user does a strongly-typed get.

    - #### uses_invalidate_value

          boolean uses_invalidate_value()

      A store can call uses_invalidate_value to know if calls to invalidate_value will be fruitful. If uses_invalidate_value returns false, invalidate_value need never be called.

    - #### build_text

          String build_text​(NamespaceManager nsm)

      A store will call back on build_text when it knows its own text is invalid and needs to fill it in. If forExternal is true, then the value returned will be used to replenish the store's cache of the value. Otherwise, the value is being computed for purposes other than validation, like persistence. Also, the only member on TypeStore which may be called while build_text is on the stack is find_prefix_for_nsuri which must have the forExternal state passed to it as it is passed here.

    - #### build_nil

          boolean build_nil()

      A store will call back on build_nil after you've called invalidate_nil and it needs to know what the nil value is.

    - #### invalidate_nilvalue

          void invalidate_nilvalue()

      A store calls back on invalidate_nilvalue when the value of the xsi:nil tag has changed.

    - #### invalidate_element_order

          void invalidate_element_order()

      A store calls back on invalidate_element_order when a rearrangement of sibling elements to the left of this element means that the nillable value may no longer be valid.

    - #### validate_now

          void validate_now()

      A store will call back on validate_now to force us to look at the text if we're in an invalid state. This function is allowed and expected to throw an exception if the text isn't valid for our type.

    - #### disconnect_store

          void disconnect_store()

      A store calls back on this call in order to force a disconnect. After this is done, the object should be considered invalid.

    - #### create_element_user

          TypeStoreUser create_element_user​(QName eltName,
                                            QName xsiType)

      A typestore user can create a new TypeStoreUser instance for a given element child name as long as you also pass the qname contained by the xsi:type attribute, if any. Note that we will ignore the xsiType if it turns out to be invalid.

    - #### create_attribute_user

          TypeStoreUser create_attribute_user​(QName attrName)

      A typestore user can create a new TypeStoreUser instance for a given attribute child, based on the attribute name.

    - #### get_element_type

          SchemaType get_element_type​(QName eltName,
                                      QName xsiType)

      Return the SchemaType which a child element of this name and xsi:type would be.

    - #### get_attribute_type

          SchemaType get_attribute_type​(QName attrName)

      Return the SchemaType which an attribute of this name would be.

    - #### get_default_element_text

          String get_default_element_text​(QName eltName)

      Returns the default element text, if it's consistent. If it's not consistent, returns null, and requires a visitor walk.

    - #### get_default_attribute_text

          String get_default_attribute_text​(QName attrName)

      Returns the default attribute text for the attribute with the given name.

    - #### get_elementflags

          int get_elementflags​(QName eltName)

      Returns the elementflags, if they're consistent. If they're not, returns -1, and requires a visitor walk.

    - #### get_attributeflags

          int get_attributeflags​(QName attrName)

      Returns the flags for an attribute.

    - #### get_attribute_field

          SchemaField get_attribute_field​(QName attrName)

      Returns the schema field for an attribute

    - #### is_child_element_order_sensitive

          boolean is_child_element_order_sensitive()

      Returns false if child elements are insensitive to order; if it returns true, you're required to call invalidate_element_order on children to the right of any child order rearrangement.

    - #### get_element_ending_delimiters

          QNameSet get_element_ending_delimiters​(QName eltname)

      A typestore user can return the element sort order to use for insertion operations if needed. Settable elements should be stored in this order if possible.

    - #### new_visitor

          TypeStoreVisitor new_visitor()

      A typestore user can return a visitor that is used to compute default text and elementflags for an arbitrary element.