Class CharacterUnmarshaller
java.lang.Object
org.exolab.castor.xml.schema.reader.ComponentReader
org.exolab.castor.xml.schema.reader.CharacterUnmarshaller
A utility class for Unmarshalling elements with only String content
- Version:
- $Revision: 7410 $ $Date: 2003-03-03 00:05:44 -0700 (Mon, 03 Mar 2003) $
- Author:
- Keith Visco
-
Constructor Summary
ConstructorsConstructorDescriptionCharacterUnmarshaller(SchemaContext schemaContext) Creates a new StringUnmarshaller. -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) The SAX characters method for recieving charactersvoidclear()Clears the current bufferReturns the name of the element that this ComponentReader handlesvoidelementName(String name) Sets the name of the element that this CharacterUnmarshaller handlesReturns the Object created by this ComponentReaderReturns the set of characters recieved by this CharacterUnmarshaller as a StringMethods inherited from class ComponentReader
endElement, error, error, finish, getDocumentLocator, getResolver, getSchemaContext, getURIResolver, illegalAttribute, illegalElement, isWhiteSpace, outOfOrder, redefinedElement, redefinedElement, setDocumentLocator, setResolver, setSchemaContext, setURIResolver, startElement, toIntModifier and TypeMethodDescriptionvoidendElement(String name, String namespace) Signals to end of the element with the given name.voidThis method is called for a general error.voidThis method is called for a general error.voidfinish()Called to signal an end of unmarshalling.Returns the resolver used for resolving id references.To get the Castor XML schema context used.Returns the URIresolver used for resolving hrefs.voidillegalAttribute(String attName) This method is called when an illegal Attribute is encountered.voidillegalElement(String name) This method is called when an illegal Element is encountered.static booleanisWhiteSpace(char[] chars, int start, int length) Determines if the given sequence of characters consists of whitespace charactersvoidoutOfOrder(String name) This method is called when an out of order element is encounteredvoidredefinedElement(String name) This method is called when an element which may only be defined once, is redefined.voidredefinedElement(String name, String xtraInfo) This method is called when an element which may only be defined once, is redefined.voidsetDocumentLocator(Locator documentLocator) voidsetResolver(Resolver resolver) Sets the Resolver to be used for resolving id referencesvoidsetSchemaContext(SchemaContext schemaContext) To set the Castor XML schema context to be used.voidsetURIResolver(URIResolver uriResolver) Sets the URIResolver to be used for resolving hrefs.voidstartElement(String name, String namespace, AttributeSet atts, Namespaces nsDecls) Signals the start of an element with the given name.static intConverts the given String to an int
-
Constructor Details
-
CharacterUnmarshaller
Creates a new StringUnmarshaller.- Parameters:
schemaContext- the schema context to get some configuration settings from
-
-
Method Details
-
elementName
Returns the name of the element that this ComponentReader handles- Specified by:
elementNamein classComponentReader- Returns:
- the name of the element that this ComponentReader handles
-
elementName
Sets the name of the element that this CharacterUnmarshaller handles- Parameters:
name- the name of the element that this character unmarshaller handles
-
getObject
Returns the Object created by this ComponentReader- Specified by:
getObjectin classComponentReader- Returns:
- the Object created by this ComponentReader
-
getString
Returns the set of characters recieved by this CharacterUnmarshaller as a String- Returns:
- the set of characters recieved by this CharacterUnmarshaller as a String
-
characters
The SAX characters method for recieving characters- Overrides:
charactersin classComponentReader- Parameters:
ch- the character array containing the charactersstart- the starting index into the character arraylength- the number of characters to recieve- Throws:
XMLException- See Also:
-
clear
public void clear()Clears the current buffer
-