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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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)
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.