Top Description Fields Constructors Methods
com.sun.msv.reader.xmlschema

public Class ElementDeclState

extends ExpressionWithChildState
Class Inheritance
Imports
java.util.Vector, org.xml.sax.Locator, com.sun.msv.datatype.xsd.BooleanType, com.sun.msv.grammar.Expression, .ReferenceExp, .SimpleNameClass, com.sun.msv.grammar.xmlschema.ElementDeclExp, .IdentityConstraint, .XMLSchemaSchema, com.sun.msv.reader.ExpressionWithChildState, .GrammarReader, .State, com.sun.msv.util.StartTagInfo, .StringPair

used to parse <element > element without ref attribute. this state uses ExpressionWithChildState to collect content model of this element declaration.
Author
Kohsuke KAWAGUCHI

Field Summary

Modifier and TypeField and Description
protected final Vector<IdentityConstraint>
idcs

identity constraints found in this element.

Inherited from com.sun.msv.reader.ExpressionWithChildState:
exp

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected Expression
annealDeclaration(ElementDeclExp exp)

This method is called after this class finishes augmenting ElementDeclExp.

protected Expression
annealExpression(Expression contentType)

Overrides com.sun.msv.reader.ExpressionWithChildState.annealExpression.

performs final wrap-up and returns a fully created Expression object that represents this element.
protected Expression
castExpression(Expression halfCastedExpression, Expression newChildExpression)

Implements abstract com.sun.msv.reader.ExpressionWithChildState.castExpression.

combines half-made expression and newly found child expression into the expression.
protected State
createChildState(StartTagInfo tag)

Overrides com.sun.msv.reader.ExpressionWithChildState.createChildState.

creates appropriate child state object for this element
protected Expression
protected Expression
public boolean
isGlobal()

Returns true if this element declaration is a global element declaration.

protected void
onIdentityConstraint(IdentityConstraint idc)

this method is called when an identity constraint declaration is found.

protected Expression
resolveTypeRef(final String typeQName)

If this element declaration has @type, then this method is called to resolve it.

Inherited from com.sun.msv.reader.ExpressionWithChildState:
makeExpressiononEndChildstartSelf

Field Detail

idcsback to summary
protected final Vector<IdentityConstraint> idcs

identity constraints found in this element.

Constructor Detail

ElementDeclStateback to summary
public ElementDeclState()

Method Detail

annealDeclarationback to summary
protected Expression annealDeclaration(ElementDeclExp exp)

This method is called after this class finishes augmenting ElementDeclExp. Derived classes can override this method and modify an ElementDeclExp further.

annealExpressionback to summary
protected Expression annealExpression(Expression contentType)

Overrides com.sun.msv.reader.ExpressionWithChildState.annealExpression.

Doc from com.sun.msv.reader.ExpressionWithChildState.annealExpression.

performs final wrap-up and returns a fully created Expression object that represents this element.

castExpressionback to summary
protected Expression castExpression(Expression halfCastedExpression, Expression newChildExpression)

Implements abstract com.sun.msv.reader.ExpressionWithChildState.castExpression.

Doc from com.sun.msv.reader.ExpressionWithChildState.castExpression.

combines half-made expression and newly found child expression into the expression.

Say this container has three child expression exp1,exp2, and exp3. Then, the expression of this state will be made by the following method invocations.

  annealExpression(
    castExpression(
      castExpression(
        castExpression(null,exp1), exp2), exp3 ) )
createChildStateback to summary
protected State createChildState(StartTagInfo tag)

Overrides com.sun.msv.reader.ExpressionWithChildState.createChildState.

Doc from com.sun.msv.reader.SimpleState.createChildState.

creates appropriate child state object for this element

defaultExpressionback to summary
protected Expression defaultExpression()

Overrides com.sun.msv.reader.ExpressionWithChildState.defaultExpression.

Doc from com.sun.msv.reader.ExpressionWithChildState.defaultExpression.

computes default expression. this method is called before annealExpression when no child expression is given during parsing. return null to signal an error.

initialExpressionback to summary
protected Expression initialExpression()

Overrides com.sun.msv.reader.ExpressionWithChildState.initialExpression.

Doc from com.sun.msv.reader.ExpressionWithChildState.initialExpression.

sets initial pattern

isGlobalback to summary
public boolean isGlobal()

Returns true if this element declaration is a global element declaration.

onIdentityConstraintback to summary
protected void onIdentityConstraint(IdentityConstraint idc)

this method is called when an identity constraint declaration is found.

resolveTypeRefback to summary
protected Expression resolveTypeRef(final String typeQName)

If this element declaration has @type, then this method is called to resolve it. Since the type refered to may not be processed yet, a late binding is needed here.