|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.saxonica.fsa.Edge
public class Edge
Internal class to represent the data associated with a transition: the element that triggers the transition, and the new state that results from the transition.
Nested Class Summary | |
---|---|
static class |
Edge.MaxOccursTerm
Special singular Term identifying a transition to be used when the maxOccurs value of a counting state is reached. |
Constructor Summary | |
---|---|
Edge()
|
Method Summary | |
---|---|
AutomatonState |
getTargetState()
Get the (fixed) state that is the target of this edge |
Term |
getTerm()
Get the element or wildcard particle causing this transition |
State |
makeTransition(State previousState)
Get the dynamic state that results from a transition using this edge, updating any counters that need to be updated |
String |
matches(Edge de,
SchemaCompiler compiler)
Test whether edges in two different finite state machines match each other. |
void |
serialize(SchemaModelSerializer serializer)
Serialize this Edge as part of the serialization of a schema component model |
void |
setTargetState(AutomatonState targetState)
Set the state resulting from this transition |
void |
setTerm(Term term)
Set the element or wildcard particle causing this transition |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Edge()
Method Detail |
---|
public void setTargetState(AutomatonState targetState)
targetState
- the state at the end of this edgepublic AutomatonState getTargetState()
public State makeTransition(State previousState) throws ValidationException
previousState
- the previous dynamic state before making this transition
ValidationException
- if this transition is not possible because the occurrence limits are violatedpublic void setTerm(Term term)
term
- the term that causes this transitionpublic Term getTerm()
public String matches(Edge de, SchemaCompiler compiler)
From Thompson & Tobin 2003: an edge BE matches another edge DE iff one of the following three conditions holds: (1) they are labelled as element declarations with the same expanded name; (2) BE is labelled with a wildcard and DE is labelled with an element declaration in a namespace allowed by the wildcard; (3) BE and DE are both wildcards and DE's label is an intensional subset of BE's. In case (3) we add the rule, not in Thompson and Tobin, that the processContents of DE must be at least as strong as the processContents of BE.
It is also necessary that the types of B and D are compatible, and that their nillability is compatible, and that their value constraints are compatible, and that the disallowed substitutions of D is a superset of those of B.
de
- the edge in a finite state machine representing a derived type, and which corresponds
to this edge in the finite state machine for the base typecompiler
- user for error reporting
public void serialize(SchemaModelSerializer serializer) throws XPathException
serializer
- object that formats the model output
XPathException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |