Package org.apache.xmlbeans.impl.schema

## Class SchemaTypeVisitorImpl

- java.lang.Object
- - org.apache.xmlbeans.impl.schema.SchemaTypeVisitorImpl

- All Implemented Interfaces:
    `TypeStoreVisitor`

      public class SchemaTypeVisitorImpl
      extends Object
      implements TypeStoreVisitor

  This state machine validates element order based on a deterministic content model.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SchemaTypeVisitorImpl()` |
    `SchemaTypeVisitorImpl​(SchemaParticle part)` | Construct it by passing the root of the content model.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `SchemaParticle` | `currentParticle()` | Returns the current schema element
    `org.apache.xmlbeans.impl.schema.SchemaTypeVisitorImpl.VisitorState[]` | `expand​(org.apache.xmlbeans.impl.schema.SchemaTypeVisitorImpl.VisitorState[] orig)` |
    `String` | `get_default_text()` | Returns default text
    `int` | `get_elementflags()` | Constructs elementflags
    `SchemaField` | `get_schema_field()` | Returns the schema field for this field.
    `void` | `init​(SchemaParticle part)` |
    `boolean` | `isAllValid()` | Returns true if the entire content up to now is valid.
    `boolean` | `testValid​(QName eltName)` |
    `boolean` | `visit​(QName eltName)` | Traverses a deterministic content model, checking for validity at any given point.
    `boolean` | `visit​(QName eltName, boolean testValidity)` | The actual implementation that traverses a deterministic content model, checking for validity at any given point.

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

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

- - ### Constructor Detail

    - #### SchemaTypeVisitorImpl

          public SchemaTypeVisitorImpl​(SchemaParticle part)

      Construct it by passing the root of the content model.

    - #### SchemaTypeVisitorImpl

          public SchemaTypeVisitorImpl()

  - ### Method Detail

    - #### init

          public void init​(SchemaParticle part)

    - #### expand

          public org.apache.xmlbeans.impl.schema.SchemaTypeVisitorImpl.VisitorState[] expand​(org.apache.xmlbeans.impl.schema.SchemaTypeVisitorImpl.VisitorState[] orig)

    - #### visit

          public boolean visit​(QName eltName)

      Traverses a deterministic content model, checking for validity at any given point. Call visit(null) once at the end if you're checking for complete validity of the sequence of elements. This is a wrapper for the actual visit implementation.
      Specified by:
        `visit` in interface `TypeStoreVisitor`

    - #### visit

          public boolean visit​(QName eltName,
                               boolean testValidity)

      The actual implementation that traverses a deterministic content model, checking for validity at any given point. When testValidity is false then this method will change states if the current state is valid When testValidity is true then this method will not change states and will return if a particular state is valid or invalid

    - #### testValid

          public boolean testValid​(QName eltName)

    - #### get_elementflags

          public int get_elementflags()

      Constructs elementflags
      Specified by:
        `get_elementflags` in interface `TypeStoreVisitor`

    - #### get_default_text

          public String get_default_text()

      Returns default text
      Specified by:
        `get_default_text` in interface `TypeStoreVisitor`

    - #### get_schema_field

          public SchemaField get_schema_field()

      Returns the schema field for this field.
      Specified by:
        `get_schema_field` in interface `TypeStoreVisitor`

    - #### currentParticle

          public SchemaParticle currentParticle()

      Returns the current schema element

    - #### isAllValid

          public boolean isAllValid()

      Returns true if the entire content up to now is valid.