org.exolab.castor.xml.schema.reader
Class SimpleContentRestrictionUnmarshaller

java.lang.Object
  extended by org.exolab.castor.xml.schema.reader.ComponentReader
      extended by org.exolab.castor.xml.schema.reader.SimpleContentRestrictionUnmarshaller

public class SimpleContentRestrictionUnmarshaller
extends ComponentReader

A class for unmarshalling restriction elements of a simpleContent

Version:
$Revision: 7410 $ $Date: 2006-04-14 04:14:43 -0600 (Fri, 14 Apr 2006) $ TODO: support the correct restriction for facets and attributes
Author:
Arnaud Blandin

Constructor Summary
SimpleContentRestrictionUnmarshaller(SchemaContext schemaContext, ComplexType complexType, AttributeSet atts)
          Creates a new RestrictionUnmarshaller.
 
Method Summary
 void characters(char[] ch, int start, int length)
          Signals to recieve charactes
 java.lang.String elementName()
          Returns the name of the element that this ComponentReader handles
 void endElement(java.lang.String name, java.lang.String namespace)
          Signals to end of the element with the given name.
 void finish()
          Terminates the process of this restriction by setting a proper base.
 java.lang.Object getObject()
          Returns the Object created by this ComponentReader
 void startElement(java.lang.String name, java.lang.String namespace, AttributeSet atts, Namespaces nsDecls)
          Signals the start of an element with the given name.
 
Methods inherited from class org.exolab.castor.xml.schema.reader.ComponentReader
error, error, getDocumentLocator, getResolver, getSchemaContext, getURIResolver, illegalAttribute, illegalElement, isWhiteSpace, outOfOrder, redefinedElement, redefinedElement, setDocumentLocator, setResolver, setSchemaContext, setURIResolver, toInt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleContentRestrictionUnmarshaller

public SimpleContentRestrictionUnmarshaller(SchemaContext schemaContext,
                                            ComplexType complexType,
                                            AttributeSet atts)
Creates a new RestrictionUnmarshaller.

Parameters:
schemaContext - the SchemaContext to get some configuration settings from
complexType - the complexType being unmarshalled
atts - the AttributeList
Method Detail

elementName

public java.lang.String elementName()
Returns the name of the element that this ComponentReader handles

Specified by:
elementName in class ComponentReader
Returns:
the name of the element that this ComponentReader handles

getObject

public java.lang.Object getObject()
Returns the Object created by this ComponentReader

Specified by:
getObject in class ComponentReader
Returns:
the Object created by this ComponentReader

startElement

public void startElement(java.lang.String name,
                         java.lang.String namespace,
                         AttributeSet atts,
                         Namespaces nsDecls)
                  throws XMLException
Signals the start of an element with the given name.

Overrides:
startElement in class ComponentReader
Parameters:
name - the NCName of the element. It is an error if the name is a QName (ie. contains a prefix).
namespace - the namespace of the element. This may be null. Note: A null namespace is not the same as the default namespace unless the default namespace is also null.
atts - the AttributeSet containing the attributes associated with the element.
nsDecls - the namespace declarations being declared for this element. This may be null.
Throws:
XMLException

endElement

public void endElement(java.lang.String name,
                       java.lang.String namespace)
                throws XMLException
Signals to end of the element with the given name.

Overrides:
endElement in class ComponentReader
Parameters:
name - the NCName of the element. It is an error if the name is a QName (ie. contains a prefix).
namespace - the namespace of the element.
Throws:
XMLException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws XMLException
Description copied from class: ComponentReader
Signals to recieve charactes

Overrides:
characters in class ComponentReader
Parameters:
ch - the character array containing the characters
start - the starting index into the character array
length - the number of characters to recieve
Throws:
XMLException

finish

public void finish()
Terminates the process of this restriction by setting a proper base. We set a new base if the base simple type has been restricted by the use of facets since all other restrictions may concern the complexType character of the type (i.e attribute for instance is only related to a complexType...)

Overrides:
finish in class ComponentReader


Copyright © 2011. All Rights Reserved.