Home » xmlbeans-2.5.0-src » org.apache.xmlbeans.impl » schema » [javadoc | source]
org.apache.xmlbeans.impl.schema
public class: SchemaTypeVisitorImpl [javadoc | source]
java.lang.Object
   org.apache.xmlbeans.impl.schema.SchemaTypeVisitorImpl

All Implemented Interfaces:
    TypeStoreVisitor

This state machine validates element order based on a deterministic content model.
Field Summary
static final  boolean PROBE_VALIDITY     
static final  boolean CHECK_VALIDITY     
 int _stackSize     
 int _rollbackSize     
Constructor:
 public SchemaTypeVisitorImpl() 
 public SchemaTypeVisitorImpl(SchemaParticle part) 
    Construct it by passing the root of the content model.
Method from org.apache.xmlbeans.impl.schema.SchemaTypeVisitorImpl Summary:
addParticle,   commit,   currentParticle,   expand,   get_default_text,   get_elementflags,   get_schema_field,   init,   isAllValid,   notValid,   ok,   pop,   prepare,   push,   rollback,   saveCopy,   testValid,   topRef,   visit,   visit
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.xmlbeans.impl.schema.SchemaTypeVisitorImpl Detail:
  void addParticle(SchemaParticle part) 
  void commit() 
    Precondition: stack: (R1 R2 R3 R4 D5 D6) top: D7 rollback: (R8 R7 R6 R5) Postcondition: stack: (R1 R2 R3 R4 D5 D6 D7) -> and rename to D's to R's top: null rollback ()
 public SchemaParticle currentParticle() 
    Returns the current schema element
 public VisitorState[] expand(VisitorState[] orig) 
 public String get_default_text() 
    Returns default text
 public int get_elementflags() 
    Constructs elementflags
 public SchemaField get_schema_field() 
    Returns the schema field for this field.
 public  void init(SchemaParticle part) 
 public boolean isAllValid() 
    Returns true if the entire content up to now is valid.
 boolean notValid() 
    When no valid next state can be found, then "notValid" is returned. It rolls back any changes to the state machine stack, sets to false the valid bit, and clears the matched element state before returning false.
 boolean ok(SchemaParticle part,
    boolean testValidity) 
    When a valid state transition has been done, then "ok" is returned. It commits the changed state machine state, stores the matched element state, and returns true.
 boolean pop() 
    Precondition: stack: (R1 R2 R3 R4 D5 D6) top: D7 is discardable rollback: (R8 R7 R6 R5) Postcondition: stack: (R1 R2 R3 R4 D5) top: D6 (see prepare in case it's an R state) rollback (R8 R7 R6 R5)
 boolean prepare() 
    Precondition: stack: (R1 R2 R3 R4) top: null or discardable due to pop in progress rollback: (R8 R7 R6 R5) (empty at the start of "visit") Postcondition: stack: (R1 R2 R3) top: D4 = mutable copy of R4 rollback (R8 R7 R6 R5 R4)
  void push(SchemaParticle part) 
    Precondition: stack: (R1 R2 R3 R4 D5 D6) top: D7 rollback: (R8 R7 R6 R5) Postcondition: stack: (R1 R2 R3 R4 D5 D6 D7) top: D8 = new state based on part rollback (R8 R7 R6 R5)
  void rollback() 
    Precondition: stack: (R1 R2 R3 R4 D5 D6) top: D7 is discardable rollback: (R8 R7 R6 R5) Postcondition: stack: (R1 R2 R3 R4 R5 R6 R7 R8) top: null rollback ()
  void saveCopy(VisitorState ref) 
 public boolean testValid(QName eltName) 
 VisitorState topRef() 
 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.
 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