com.ibm.etools.xsd.impl
Class XSDParticleImpl.XSDNFA

java.lang.Object
  |
  +--com.ibm.etools.xsd.impl.XSDParticleImpl.XSDNFA
All Implemented Interfaces:
XSDParticle.DFA
Enclosing class:
XSDParticleImpl

protected static class XSDParticleImpl.XSDNFA
extends java.lang.Object
implements XSDParticle.DFA


Inner Class Summary
static class XSDParticleImpl.XSDNFA.StateImpl
           
static class XSDParticleImpl.XSDNFA.TransitionImpl
           
 
Inner classes inherited from class com.ibm.etools.xsd.XSDParticle.DFA
XSDParticle.DFA.State, XSDParticle.DFA.Transition
 
Field Summary
protected  XSDParticleImpl.XSDNFA.StateImpl currentState
           
protected  XSDParticleImpl.XSDNFA.StateImpl finalState
           
protected  XSDParticleImpl.XSDNFA.StateImpl initialState
           
protected  java.util.Set states
           
protected  XSDParticle xsdParticle
           
 
Constructor Summary
protected XSDParticleImpl.XSDNFA()
           
  XSDParticleImpl.XSDNFA(XSDParticle xsdParticle)
           
protected XSDParticleImpl.XSDNFA(XSDParticleImpl.XSDNFA original)
           
protected XSDParticleImpl.XSDNFA(XSDParticle xsdParticle, XSDTerm xsdTerm)
           
 
Method Summary
 boolean accept(java.lang.String namespaceURI, java.lang.String localName)
          Attempt a state transition and return whether the resulting state is accepting.
 XSDParticle.DFA cloneDFA()
          Creates a clone of the automaton.
protected  XSDParticleImpl.XSDNFA.StateImpl createState(XSDComponent associatedComponent)
           
 void determinize()
           
 void dump()
           
 void epsilonClosure()
           
static java.lang.String getComponentLabel(java.util.Collection xsdComponents)
           
static java.lang.String getComponentLabel(XSDComponent xsdComponent)
           
 XSDParticle.DFA.State getCurrentState()
          Returns the current state of the automaton.
 XSDParticle.DFA.State getFinalState()
           
 XSDParticle.DFA.State getInitialState()
          Returns the initial state of this automaton.
 XSDParticle getParticle()
           
 java.util.Set getStates()
          Returns the set of states in this automaton.
protected  void initialize(XSDComponent xsdComponent)
           
protected  void initializePermutations(XSDParticleImpl.XSDNFA.StateImpl previousState, XSDParticleImpl.XSDNFA.StateImpl nextState, java.util.Collection particleNFAs)
           
 boolean isEquivalent(XSDParticle.DFA.State s1, XSDParticle.DFA.State s2)
           
 boolean isOverlap(XSDTerm xsdComponent1, XSDTerm xsdComponent2)
           
 boolean isValidUPA()
           
 void minimize()
           
 void reset()
          Resets the automaton to the initial state.
protected  void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

states

protected java.util.Set states

initialState

protected XSDParticleImpl.XSDNFA.StateImpl initialState

finalState

protected XSDParticleImpl.XSDNFA.StateImpl finalState

xsdParticle

protected XSDParticle xsdParticle

currentState

protected XSDParticleImpl.XSDNFA.StateImpl currentState
Constructor Detail

XSDParticleImpl.XSDNFA

protected XSDParticleImpl.XSDNFA()

XSDParticleImpl.XSDNFA

protected XSDParticleImpl.XSDNFA(XSDParticle xsdParticle,
                                 XSDTerm xsdTerm)

XSDParticleImpl.XSDNFA

public XSDParticleImpl.XSDNFA(XSDParticle xsdParticle)

XSDParticleImpl.XSDNFA

protected XSDParticleImpl.XSDNFA(XSDParticleImpl.XSDNFA original)
Method Detail

validate

protected void validate()

createState

protected XSDParticleImpl.XSDNFA.StateImpl createState(XSDComponent associatedComponent)

initialize

protected void initialize(XSDComponent xsdComponent)

initializePermutations

protected void initializePermutations(XSDParticleImpl.XSDNFA.StateImpl previousState,
                                      XSDParticleImpl.XSDNFA.StateImpl nextState,
                                      java.util.Collection particleNFAs)

getStates

public java.util.Set getStates()
Description copied from interface: XSDParticle.DFA
Returns the set of states in this automaton.
Specified by:
getStates in interface XSDParticle.DFA
Following copied from interface: com.ibm.etools.xsd.XSDParticle.DFA
Returns:
the set of states in this automaton.

getInitialState

public XSDParticle.DFA.State getInitialState()
Description copied from interface: XSDParticle.DFA
Returns the initial state of this automaton. The automaton can be reset to this state.
Specified by:
getInitialState in interface XSDParticle.DFA
Following copied from interface: com.ibm.etools.xsd.XSDParticle.DFA
Returns:
the initial states in this automaton.
See Also:
XSDParticle.DFA.reset()

getFinalState

public XSDParticle.DFA.State getFinalState()

getParticle

public XSDParticle getParticle()

getComponentLabel

public static java.lang.String getComponentLabel(java.util.Collection xsdComponents)

getComponentLabel

public static java.lang.String getComponentLabel(XSDComponent xsdComponent)

dump

public void dump()

epsilonClosure

public void epsilonClosure()

isEquivalent

public boolean isEquivalent(XSDParticle.DFA.State s1,
                            XSDParticle.DFA.State s2)

minimize

public void minimize()

determinize

public void determinize()

isOverlap

public boolean isOverlap(XSDTerm xsdComponent1,
                         XSDTerm xsdComponent2)

isValidUPA

public boolean isValidUPA()

getCurrentState

public XSDParticle.DFA.State getCurrentState()
Description copied from interface: XSDParticle.DFA
Returns the current state of the automaton. This may be null in the case that an unrecognized symbol has been accepted.
Specified by:
getCurrentState in interface XSDParticle.DFA
Following copied from interface: com.ibm.etools.xsd.XSDParticle.DFA
Returns:
the current state of the automaton.
See Also:
XSDParticle.DFA.getCurrentState()

accept

public boolean accept(java.lang.String namespaceURI,
                      java.lang.String localName)
Description copied from interface: XSDParticle.DFA
Attempt a state transition and return whether the resulting state is accepting. An unrecognized input will result in a null state and will yield false. return whether the resulting state is accepting.
Specified by:
accept in interface XSDParticle.DFA

reset

public void reset()
Description copied from interface: XSDParticle.DFA
Resets the automaton to the initial state.
Specified by:
reset in interface XSDParticle.DFA
Following copied from interface: com.ibm.etools.xsd.XSDParticle.DFA
See Also:
XSDParticle.DFA.getInitialState()

cloneDFA

public XSDParticle.DFA cloneDFA()
Description copied from interface: XSDParticle.DFA
Creates a clone of the automaton.
Specified by:
cloneDFA in interface XSDParticle.DFA
Following copied from interface: com.ibm.etools.xsd.XSDParticle.DFA
Returns:
a clone of the automaton.