com.saxonica.schema
Class AutomatonState.Edge

java.lang.Object
  extended bycom.saxonica.schema.AutomatonState.Edge
Enclosing class:
AutomatonState

public static class AutomatonState.Edge
extends java.lang.Object

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.


Constructor Summary
AutomatonState.Edge()
           
 
Method Summary
 AutomatonState getEndState()
          Get the state resulting from this transition
 Term getTerm()
          Get the element or wildcard particle causing this transition
 java.lang.String matches(AutomatonState.Edge de)
          Test whether edges in two different finite state machines match each other.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutomatonState.Edge

public AutomatonState.Edge()
Method Detail

getEndState

public AutomatonState getEndState()
Get the state resulting from this transition

Returns:
the state at the end of this edge

getTerm

public Term getTerm()
Get the element or wildcard particle causing this transition

Returns:
the particle that causes this transition

matches

public java.lang.String matches(AutomatonState.Edge de)
                         throws ValidationException
Test whether edges in two different finite state machines match each other. This is called while establishing whether one type subsumes another.

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

It is also necessary that the types of BE and DE are compatible.

Returns:
null if the edges match, or a string explaining the reason for the non-match if not.
Throws:
ValidationException