org.eclipse.xsd.impl
Class XSDParticleImpl.XSDNFA

java.lang.Object
  extended by org.eclipse.xsd.impl.XSDParticleImpl.XSDNFA
All Implemented Interfaces:
XSDParticle.DFA
Enclosing class:
XSDParticleImpl

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


Nested Class Summary
static class XSDParticleImpl.XSDNFA.StateImpl
           
static class XSDParticleImpl.XSDNFA.TransitionImpl
           
 
Nested classes/interfaces inherited from interface org.eclipse.xsd.XSDParticle.DFA
XSDParticle.DFA.State, XSDParticle.DFA.Transition
 
Field Summary
protected  XSDParticleImpl.XSDNFA.StateImpl currentState
           
protected  java.util.Collection<XSDDiagnostic> diagnostics
           
protected  XSDParticleImpl.XSDNFA.StateImpl finalState
           
protected  XSDParticleImpl.XSDNFA.StateImpl initialState
           
protected  boolean isApproximate
           
protected  java.util.List<XSDParticle.DFA.State> states
           
protected  XSDParticleImpl.XSDNFA.TransitionImpl testTransition
           
protected  java.util.Set<XSDModelGroup> visitedModelGroups
           
protected  XSDElementDeclaration[] xsdElementDeclarations
           
protected  XSDParticle xsdParticle
           
 
Constructor Summary
protected XSDParticleImpl.XSDNFA(boolean isApproximate)
           
  XSDParticleImpl.XSDNFA(java.util.Set<XSDModelGroup> visitedModelGroups, XSDParticle xsdParticle, boolean isApproximate)
           
protected XSDParticleImpl.XSDNFA(java.util.Set<XSDModelGroup> visitedModelGroups, XSDParticle xsdParticle, XSDTerm xsdTerm, boolean isApproximate)
           
  XSDParticleImpl.XSDNFA(XSDParticle xsdParticle, boolean isApproximate)
           
protected XSDParticleImpl.XSDNFA(XSDParticleImpl.XSDNFA original, boolean isApproximate)
           
 
Method Summary
protected  void checkBadTransitions()
           
protected  XSDDiagnostic checkOverlap(XSDElementDeclaration xsdElementDeclaration1, XSDTerm xsdComponent2)
           
 XSDDiagnostic checkOverlap(XSDTerm xsdComponent1, XSDTerm xsdComponent2)
           
protected  XSDDiagnostic checkOverlap(XSDWildcard xsdWildcard1, XSDTerm xsdComponent2)
           
 int checksum()
           
 XSDParticle.DFA cloneDFA()
          Creates a clone of the automaton.
 void createFinalState()
           
protected  XSDParticleImpl.XSDNFA createPermutations(java.util.List<XSDParticle> particles, java.util.List<XSDParticleImpl.XSDNFA> particleNFAs, java.util.Map<java.util.List<XSDParticle>,XSDParticleImpl.XSDNFA> particlesToNFAMap)
           
protected  XSDParticleImpl.XSDNFA.StateImpl createState(XSDComponent associatedComponent)
           
 void determinize()
           
 void dump(java.io.PrintStream out)
           
 void epsilonClosure()
           
static java.lang.String getComponentLabel(java.util.Collection<XSDComponent> xsdComponents)
           
static java.lang.String getComponentLabel(XSDComponent xsdComponent)
           
 XSDParticle.DFA.State getCurrentState()
           
 java.util.Collection<XSDDiagnostic> getDiagnostics()
           
 XSDParticle.DFA.State getFinalState()
           
 XSDParticle.DFA.State getInitialState()
          Returns the initial state of this automaton.
 XSDParticle getParticle()
           
 java.util.List<XSDParticle.DFA.State> getStates()
          Returns the list of states in this automaton.
protected  void initialize(XSDComponent xsdComponent)
           
 boolean isApproximate()
          Returns whether this DFA is an approximation of the content model.
 boolean isEquivalent(XSDParticle.DFA.State s1, XSDParticle.DFA.State s2)
           
 void minimize()
           
 void propagateStates(XSDParticleImpl.XSDNFA xsdNFA)
           
 void reset()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

states

protected java.util.List<XSDParticle.DFA.State> states

initialState

protected XSDParticleImpl.XSDNFA.StateImpl initialState

finalState

protected XSDParticleImpl.XSDNFA.StateImpl finalState

xsdParticle

protected XSDParticle xsdParticle

currentState

protected XSDParticleImpl.XSDNFA.StateImpl currentState

visitedModelGroups

protected java.util.Set<XSDModelGroup> visitedModelGroups

diagnostics

protected java.util.Collection<XSDDiagnostic> diagnostics

isApproximate

protected boolean isApproximate

testTransition

protected XSDParticleImpl.XSDNFA.TransitionImpl testTransition

xsdElementDeclarations

protected XSDElementDeclaration[] xsdElementDeclarations
Constructor Detail

XSDParticleImpl.XSDNFA

protected XSDParticleImpl.XSDNFA(boolean isApproximate)

XSDParticleImpl.XSDNFA

protected XSDParticleImpl.XSDNFA(java.util.Set<XSDModelGroup> visitedModelGroups,
                                 XSDParticle xsdParticle,
                                 XSDTerm xsdTerm,
                                 boolean isApproximate)

XSDParticleImpl.XSDNFA

public XSDParticleImpl.XSDNFA(java.util.Set<XSDModelGroup> visitedModelGroups,
                              XSDParticle xsdParticle,
                              boolean isApproximate)

XSDParticleImpl.XSDNFA

public XSDParticleImpl.XSDNFA(XSDParticle xsdParticle,
                              boolean isApproximate)

XSDParticleImpl.XSDNFA

protected XSDParticleImpl.XSDNFA(XSDParticleImpl.XSDNFA original,
                                 boolean isApproximate)
Method Detail

checkBadTransitions

protected void checkBadTransitions()

createState

protected XSDParticleImpl.XSDNFA.StateImpl createState(XSDComponent associatedComponent)

initialize

protected void initialize(XSDComponent xsdComponent)

createPermutations

protected XSDParticleImpl.XSDNFA createPermutations(java.util.List<XSDParticle> particles,
                                                    java.util.List<XSDParticleImpl.XSDNFA> particleNFAs,
                                                    java.util.Map<java.util.List<XSDParticle>,XSDParticleImpl.XSDNFA> particlesToNFAMap)

isApproximate

public boolean isApproximate()
Description copied from interface: XSDParticle.DFA
Returns whether this DFA is an approximation of the content model. A large maxOccurs may be treated as unbounded and a large all model group may be treated as a repeating choice.

Specified by:
isApproximate in interface XSDParticle.DFA
Returns:
true if this DFA is an approximation of the content model.

getStates

public java.util.List<XSDParticle.DFA.State> getStates()
Description copied from interface: XSDParticle.DFA
Returns the list of states in this automaton.

Specified by:
getStates in interface XSDParticle.DFA
Returns:
the list of states in this automaton.

getInitialState

public XSDParticle.DFA.State getInitialState()
Description copied from interface: XSDParticle.DFA
Returns the initial state of this automaton.

Specified by:
getInitialState in interface XSDParticle.DFA
Returns:
the initial states in this automaton.

getFinalState

public XSDParticle.DFA.State getFinalState()

getParticle

public XSDParticle getParticle()

getComponentLabel

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

getComponentLabel

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

dump

public void dump(java.io.PrintStream out)

epsilonClosure

public void epsilonClosure()

createFinalState

public void createFinalState()

isEquivalent

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

minimize

public void minimize()

checksum

public int checksum()

determinize

public void determinize()

checkOverlap

public XSDDiagnostic checkOverlap(XSDTerm xsdComponent1,
                                  XSDTerm xsdComponent2)

checkOverlap

protected XSDDiagnostic checkOverlap(XSDElementDeclaration xsdElementDeclaration1,
                                     XSDTerm xsdComponent2)

checkOverlap

protected XSDDiagnostic checkOverlap(XSDWildcard xsdWildcard1,
                                     XSDTerm xsdComponent2)

propagateStates

public void propagateStates(XSDParticleImpl.XSDNFA xsdNFA)

getDiagnostics

public java.util.Collection<XSDDiagnostic> getDiagnostics()

getCurrentState

public XSDParticle.DFA.State getCurrentState()

reset

public void reset()

cloneDFA

public XSDParticle.DFA cloneDFA()
Description copied from interface: XSDParticle.DFA
Creates a clone of the automaton.

Specified by:
cloneDFA in interface XSDParticle.DFA
Returns:
a clone of the automaton.

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.