|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.xml.schema.reader.ComponentReader
public abstract class ComponentReader
The base class for separate component unmarshallers for reading an XML Schema component.
Constructor Summary | |
---|---|
protected |
ComponentReader(SchemaContext schemaContext)
To hand down a couple of configuration items to all Unmarshaller classes. |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ComponentReader(SchemaContext schemaContext)
schemaContext
- the SchemaContext
to useMethod Detail |
---|
public abstract java.lang.String elementName()
public abstract java.lang.Object getObject()
public void finish() throws XMLException
XMLException
public 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 check
public void error(java.lang.String err) throws XMLException
err
- the error message to report
XMLException
public void error(java.lang.Exception ex) throws XMLException
ex
- the Exception that caused the error.
XMLException
public void illegalAttribute(java.lang.String attName) throws XMLException
attName
- the name of the illegal attribute.
XMLException
public void illegalElement(java.lang.String name) throws XMLException
name
- the name of the illegal element
XMLException
public void redefinedElement(java.lang.String name) throws XMLException
name
- the name of the element
XMLException
public void redefinedElement(java.lang.String name, java.lang.String xtraInfo) throws XMLException
name
- the name of the element
XMLException
public void outOfOrder(java.lang.String name) throws XMLException
XMLException
public static int toInt(java.lang.String str) throws java.lang.IllegalArgumentException
str
- the String to convert to an int
java.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 recieve
XMLException
public 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.
XMLException
public 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.
XMLException
public void setSchemaContext(SchemaContext schemaContext)
schemaContext
- the Castor XML schema context to be usedpublic SchemaContext getSchemaContext()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |