Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.msv.reader
Class SimpleState

    java.lang.Object
      com.sun.msv.reader.State
          com.sun.msv.reader.SimpleState

All Implemented Interfaces:
  org.xml.sax.ContentHandler

Direct Known Subclasses:
  ChildlessState, com.sun.msv.reader.relax.core.ClauseState, DefineState, DivInModuleState, com.sun.msv.reader.relax.core.ElementRuleBaseState, ExpressionState, GlobalDeclState, GrammarState, HedgeRuleBaseState, IdentityConstraintState, IncludeMergeState, InterfaceState, NameClassState, RootGrammarState, RootIncludedPatternState, RootIncludedSchemaState, RootMergedGrammarState, com.sun.msv.reader.datatype.xsd.TypeState

public abstract class SimpleState
extends State

base interface of the most of parsing states.

In this level of inheritance, contract is as follows.

1. startElement() event is received by the parent state. It usually creates a child state by this event.
2. startSelf method of the child SimpleState is called. derived classes should perform necessary things by reading start tag information.
3. Whenever startElement method is received by SimpleState object, createChildState method is called to create a child state. Derived classes are responsible for providing appropriate child state objects.
4. Child state handles descendants. Usually, it finishes parsing when it sees endElement.
5. When endElement() event is received by this object, it calls endSelf method and reverts to the parent state. Derived classes are responsible for doing anything necessary within endSelf method.

In other words, this state is only active for one hierarchy of XML elements and derived classes are responsible for three abstract methods.

Author:
  Kohsuke KAWAGUCHI

Field Summary

Fields inherited from class com.sun.msv.reader.State
`reader`

Constructor Summary
`SimpleState()`

Method Summary
`void` | `endDocument()`
`void` | `endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)`
`void` | `startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)`

Methods inherited from class com.sun.msv.reader.State
`_assert, characters, endPrefixMapping, getBaseURI, getLocation, getParentState, getStartTag, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimpleState

    public SimpleState()

Method Detail

### startElement

    public void startElement(java.lang.String namespaceURI,
                             java.lang.String localName,
                             java.lang.String qName,
                             org.xml.sax.Attributes atts)

### endElement

    public final void endElement(java.lang.String namespaceURI,
                                 java.lang.String localName,
                                 java.lang.String qName)

### endDocument

    public final void endDocument()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD