AnnotationUnmarshaller, AppInfoUnmarshaller, AttributeGroupUnmarshaller, AttributeUnmarshaller, CharacterUnmarshaller, ComplexContentRestrictionUnmarshaller, ComplexContentUnmarshaller, ComplexTypeUnmarshaller, DocumentationUnmarshaller, ElementUnmarshaller, ExtensionUnmarshaller, FacetUnmarshaller, FieldOrSelectorUnmarshaller, GroupUnmarshaller, IdentityConstraintUnmarshaller, ImportUnmarshaller, IncludeUnmarshaller, ModelGroupUnmarshaller, RedefineUnmarshaller, SchemaUnmarshaller, SimpleContentRestrictionUnmarshaller, SimpleContentUnmarshaller, SimpleTypeListUnmarshaller, SimpleTypeRestrictionUnmarshaller, SimpleTypeUnmarshaller, UnionUnmarshaller, UnknownUnmarshaller, WildcardUnmarshallerpublic abstract class ComponentReader
extends java.lang.Object
| Modifier | Constructor | Description |
|---|---|---|
protected |
ComponentReader(SchemaContext schemaContext) |
To hand down a couple of configuration items to all Unmarshaller classes.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
characters(char[] chars,
int start,
int length) |
Signals to recieve charactes
|
abstract 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 |
error(java.lang.Exception ex) |
This method is called for a general error.
|
void |
error(java.lang.String err) |
This method is called for a general error.
|
void |
finish() |
Called to signal an end of unmarshalling.
|
org.xml.sax.Locator |
getDocumentLocator() |
|
abstract java.lang.Object |
getObject() |
Returns the Object created by this Unmarshaller
|
Resolver |
getResolver() |
Returns the resolver used for resolving id references.
|
SchemaContext |
getSchemaContext() |
To get the Castor XML schema context used.
|
URIResolver |
getURIResolver() |
Returns the URIresolver used for resolving hrefs.
|
void |
illegalAttribute(java.lang.String attName) |
This method is called when an illegal Attribute is encountered.
|
void |
illegalElement(java.lang.String name) |
This method is called when an illegal Element is encountered.
|
static boolean |
isWhiteSpace(char[] chars,
int start,
int length) |
Determines if the given sequence of characters consists
of whitespace characters
|
void |
outOfOrder(java.lang.String name) |
This method is called when an out of order element is encountered
|
void |
redefinedElement(java.lang.String name) |
This method is called when an element which may only
be defined once, is redefined.
|
void |
redefinedElement(java.lang.String name,
java.lang.String xtraInfo) |
This method is called when an element which may only
be defined once, is redefined.
|
void |
setDocumentLocator(org.xml.sax.Locator documentLocator) |
|
void |
setResolver(Resolver resolver) |
Sets the Resolver to be used for resolving id references
|
void |
setSchemaContext(SchemaContext schemaContext) |
To set the Castor XML schema context to be used.
|
void |
setURIResolver(URIResolver uriResolver) |
Sets the URIResolver to be used for resolving hrefs.
|
void |
startElement(java.lang.String name,
java.lang.String namespace,
AttributeSet atts,
Namespaces nsDecls) |
Signals the start of an element with the given name.
|
static int |
toInt(java.lang.String str) |
Converts the given String to an int
|
protected ComponentReader(SchemaContext schemaContext)
schemaContext - the SchemaContext to usepublic abstract java.lang.String elementName()
public abstract java.lang.Object getObject()
public void finish()
throws XMLException
XMLExceptionpublic Resolver getResolver()
public URIResolver getURIResolver()
public void setResolver(Resolver resolver)
resolver - the Resolver to be used for resolving
id referencespublic void setURIResolver(URIResolver uriResolver)
uriResolver - the URIResolver to be used for resolving hrefs.public static boolean isWhiteSpace(char[] chars,
int start,
int length)
chars - an array of characters to check for whitespacestart - the start index into the character arraylength - the number of characters to checkpublic void error(java.lang.String err)
throws XMLException
err - the error message to reportXMLExceptionpublic void error(java.lang.Exception ex)
throws XMLException
ex - the Exception that caused the error.XMLExceptionpublic void illegalAttribute(java.lang.String attName)
throws XMLException
attName - the name of the illegal attribute.XMLExceptionpublic void illegalElement(java.lang.String name)
throws XMLException
name - the name of the illegal elementXMLExceptionpublic void redefinedElement(java.lang.String name)
throws XMLException
name - the name of the elementXMLExceptionpublic void redefinedElement(java.lang.String name,
java.lang.String xtraInfo)
throws XMLException
name - the name of the elementXMLExceptionpublic void outOfOrder(java.lang.String name)
throws XMLException
XMLExceptionpublic static int toInt(java.lang.String str)
throws java.lang.IllegalArgumentException
str - the String to convert to an intjava.lang.IllegalArgumentException - when the given
String does not represent a valid intpublic org.xml.sax.Locator getDocumentLocator()
public void setDocumentLocator(org.xml.sax.Locator documentLocator)
public void characters(char[] chars,
int start,
int length)
throws XMLException
chars - the character array containing the charactersstart - the starting index into the character arraylength - the number of characters to recieveXMLExceptionpublic void endElement(java.lang.String name,
java.lang.String namespace)
throws XMLException
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.XMLExceptionpublic void startElement(java.lang.String name,
java.lang.String namespace,
AttributeSet atts,
Namespaces nsDecls)
throws XMLException
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.XMLExceptionpublic void setSchemaContext(SchemaContext schemaContext)
schemaContext - the Castor XML schema context to be usedpublic SchemaContext getSchemaContext()
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com