com.sun.msv.verifier.regexp
Class ComplexAcceptorBaseImpl

java.lang.Object
  extended bycom.sun.msv.verifier.regexp.ExpressionAcceptor
      extended bycom.sun.msv.verifier.regexp.ContentModelAcceptor
          extended bycom.sun.msv.verifier.regexp.ComplexAcceptorBaseImpl
All Implemented Interfaces:
Acceptor
Direct Known Subclasses:
ComplexAcceptor, RulesAcceptor

public abstract class ComplexAcceptorBaseImpl
extends ContentModelAcceptor

base implementation of ComplexAcceptor.

Author:
Kohsuke KAWAGUCHI

Field Summary
 
Fields inherited from interface com.sun.msv.verifier.Acceptor
STRING_IGNORE, STRING_PROHIBITED, STRING_STRICT
 
Constructor Summary
ComplexAcceptorBaseImpl(REDocumentDeclaration docDecl, Expression combined, Expression[] contents, boolean ignoreUndeclaredAttributes)
           
 
Method Summary
 boolean onEndAttributes(StartTagInfo sti, StringRef refErr)
          notifies the end of attributes.
 boolean onText(String literal, IDContextProvider context, StringRef refErr, DatatypeRef refType)
          eats string literal
 boolean stepForward(Acceptor child, StringRef errRef)
          eats a child element
 
Methods inherited from class com.sun.msv.verifier.regexp.ContentModelAcceptor
getOwnerType
 
Methods inherited from class com.sun.msv.verifier.regexp.ExpressionAcceptor
createChildAcceptor, getExpression, getStringCareLevel, isAcceptState, onAttribute, stepForwardByContinuation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.msv.verifier.Acceptor
createClone
 

Constructor Detail

ComplexAcceptorBaseImpl

public ComplexAcceptorBaseImpl(REDocumentDeclaration docDecl,
                               Expression combined,
                               Expression[] contents,
                               boolean ignoreUndeclaredAttributes)
Method Detail

onEndAttributes

public boolean onEndAttributes(StartTagInfo sti,
                               StringRef refErr)
Description copied from interface: Acceptor
notifies the end of attributes.

This method needs to be called after the Acceptor.onAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.sun.msv.grammar.IDContextProvider, com.sun.msv.util.StringRef, com.sun.msv.util.DatatypeRef) method is called for each present attribute.

An error at this method typically indicates that some required attributes are missing.

Specified by:
onEndAttributes in interface Acceptor
Overrides:
onEndAttributes in class ExpressionAcceptor

onText

public final boolean onText(String literal,
                            IDContextProvider context,
                            StringRef refErr,
                            DatatypeRef refType)
eats string literal

Specified by:
onText in interface Acceptor
Overrides:
onText in class ExpressionAcceptor

stepForward

public final boolean stepForward(Acceptor child,
                                 StringRef errRef)
Description copied from interface: Acceptor
eats a child element

A child acceptor created by the createChildAcceptor method will be ultimately consumed by the parent through this method.

It is the caller's responsibility to make sure that child acceptor is in the accept state. If it's not, that indicates that some required elements are missing (in other words, contents are not allowed to end here).

It is the callee's responsibility to recover from error of unsatisified child acceptor. That is, even if the caller finds that there are missing elements, it is possible to call this method as if there was no such error.

Specified by:
stepForward in interface Acceptor
Overrides:
stepForward in class ContentModelAcceptor


Copyright © 2001-2003 Sun Microsystems, Inc. Documenation generated September 9 2004.