Top Description Constructors Methods
com.sun.msv.reader.datatype.xsd

pack-priv abstract Class TypeState

extends SimpleState
Class Inheritance
Known Direct Subclasses
com.sun.msv.reader.datatype.xsd.TypeWithOneChildState, com.sun.msv.reader.datatype.xsd.UnionState
Imports
org.relaxng.datatype.DatatypeException, org.xml.sax.Attributes, org.xml.sax.helpers.AttributesImpl, com.sun.msv.datatype.xsd.StringType, com.sun.msv.reader.ExpressionOwner, .GrammarReader, .IgnoreState, .SimpleState, .State, com.sun.msv.reader.datatype.TypeOwner, com.sun.msv.util.StartTagInfo

Base implementation for those states which produce a type object as its parsing result.
Author
Kohsuke KAWAGUCHI

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv XSDatatypeExp
_makeType()

the makeType method with protection against possible exception.

public void
endSelf()

Overrides com.sun.msv.reader.SimpleState.endSelf.

this method is called in endElement method when the state is about to be removed.
private XSTypeOwner
getParent()

Gets the parent state as TypeOwner.

public final String
protected abstract XSDatatypeExp
makeType()

This method is called from endElement method.

public final void
startElement(String
the Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed
namespaceURI
,
String
the local name (without prefix), or the empty string if Namespace processing is not being performed
localName
,
String
the qualified name (with prefix), or the empty string if qualified names are not available
qName
,
Attributes
the attributes attached to the element. If there are no attributes, it shall be an empty Attributes object. The value of this object after startElement returns is undefined
atts
)

Overrides com.sun.msv.reader.SimpleState.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Receive notification of the beginning of an element.
Inherited from com.sun.msv.reader.SimpleState:
createChildStateendDocumentendElementisGrammarElement

Constructor Detail

TypeStateback to summary
pack-priv TypeState()

Method Detail

_makeTypeback to summary
pack-priv XSDatatypeExp _makeType()

the makeType method with protection against possible exception.

endSelfback to summary
public void endSelf()

Overrides com.sun.msv.reader.SimpleState.endSelf.

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

this method is called in endElement method when the state is about to be removed. derived-class should perform any wrap-up job

getParentback to summary
private XSTypeOwner getParent()

Gets the parent state as TypeOwner.

getTargetNamespaceUriback to summary
public final String getTargetNamespaceUri()
makeTypeback to summary
protected abstract XSDatatypeExp makeType() throws DatatypeException

This method is called from endElement method. Implementation has to provide DataType object that represents the content of this element.

startElementback to summary
public final void startElement(String namespaceURI, String localName, String qName, Attributes atts)

Overrides com.sun.msv.reader.SimpleState.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Doc from org.xml.sax.ContentHandler.startElement.

Receive notification of the beginning of an element.

The Parser will invoke this method at the beginning of every element in the XML document; there will be a corresponding endElement event for every startElement event (even when the element is empty). All of the element's content will be reported, in order, before the corresponding endElement event.

This event allows up to three name components for each element:

  1. the Namespace URI;
  2. the local name; and
  3. the qualified (prefixed) name.

Any or all of these may be provided, depending on the values of the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes properties:

  • the Namespace URI and local name are required when the namespaces property is true (the default), and are optional when the namespaces property is false (if one is specified, both must be);
  • the qualified name is required when the namespace-prefixes property is true, and is optional when the namespace-prefixes property is false (the default).

Note that the attribute list provided will contain only attributes with explicit values (specified or defaulted): #IMPLIED attributes will be omitted. The attribute list will contain attributes used for Namespace declarations (xmlns* attributes) only if the http://xml.org/sax/features/namespace-prefixes property is true (it is false by default, and support for a true value is optional).

Like characters(), attribute values may have characters that need more than one char value.

Parameters
namespaceURI:String

the Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed

localName:String

the local name (without prefix), or the empty string if Namespace processing is not being performed

qName:String

the qualified name (with prefix), or the empty string if qualified names are not available

atts:Attributes

the attributes attached to the element. If there are no attributes, it shall be an empty Attributes object. The value of this object after startElement returns is undefined