public class SchemaUnmarshaller extends ComponentReader
Modifier and Type | Field and Description |
---|---|
static String[] |
UNSUPPORTED_NAMESPACES
Unsupported namespace definitions, pointing to older
XML schema specifications.
|
static String |
XSD_NAMESPACE
W3C XML schema namespace.
|
Constructor and Description |
---|
SchemaUnmarshaller(SchemaContext schemaContext)
Creates a
SchemaUnmarshaller instance. |
SchemaUnmarshaller(SchemaContext schemaContext,
AttributeSet atts)
Creates a
SchemaUnmarshaller instance. |
SchemaUnmarshaller(SchemaContext schemaContext,
boolean include,
SchemaUnmarshallerState state,
URIResolver uriResolver)
Creates a
SchemaUnmarshaller instance. |
SchemaUnmarshaller(SchemaContext schemaContext,
SchemaUnmarshallerState state)
Creates a
SchemaUnmarshaller instance. |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Signals to recieve charactes
|
String |
elementName()
Returns the name of the element that this ComponentReader
handles.
|
void |
endElement(String name,
String namespace)
Signals to end of the element with the given name.
|
Object |
getObject()
Returns the Object created by this ComponentReader.
|
Schema |
getSchema()
Returns the
Schema instance representing the XML schema (file) just
processed. |
void |
setSchema(Schema schema)
Sets the
Schema instance to be processed. |
void |
startElement(String name,
String namespace,
AttributeSet atts,
Namespaces nsDecls)
Signals the start of an element with the given name.
|
error, error, finish, getDocumentLocator, getResolver, getSchemaContext, getURIResolver, illegalAttribute, illegalElement, isWhiteSpace, outOfOrder, redefinedElement, redefinedElement, setDocumentLocator, setResolver, setSchemaContext, setURIResolver, toInt
public static final String XSD_NAMESPACE
public static final String[] UNSUPPORTED_NAMESPACES
public SchemaUnmarshaller(SchemaContext schemaContext) throws XMLException
SchemaUnmarshaller
instance.schemaContext
- A SchemaContext
to be used during schema unmarshalling.XMLException
- Indicates that the XML schema cannnot be processedpublic SchemaUnmarshaller(SchemaContext schemaContext, SchemaUnmarshallerState state) throws XMLException
SchemaUnmarshaller
instance.schemaContext
- A SchemaContext
to be used during schema unmarshalling.state
- A SchemaUnmarshallerState
to be used during unmarshalling.XMLException
- Indicates that the XML schema cannnot be processedpublic SchemaUnmarshaller(SchemaContext schemaContext, boolean include, SchemaUnmarshallerState state, URIResolver uriResolver) throws XMLException
SchemaUnmarshaller
instance.schemaContext
- A SchemaContext
to be used during schema unmarshalling.include
- Indicates whether the Schema
to be processed ia an included schema.state
- A SchemaUnmarshallerState
to be used during unmarshalling.uriResolver
- URIResolver
to be used during processing.XMLException
- Signals a problem in processing the XML schema.
Called from IncludeUnmarshaller.IncludeUnmarshaller}
public SchemaUnmarshaller(SchemaContext schemaContext, AttributeSet atts) throws XMLException
SchemaUnmarshaller
instance.
Exists for backward compatibilityschemaContext
- A SchemaContext
to be used during schema unmarshalling.atts
- Attribute set to be processed.XMLException
- Signals a problem in processing the XML schema.public Schema getSchema()
Schema
instance representing the XML schema (file) just
processed.Schema
instance obtained from processing an XML schema file.public void setSchema(Schema schema)
Schema
instance to be processed.schema
- Schema
instancetp be processed.public Object getObject()
getObject
in class ComponentReader
public String elementName()
elementName
in class ComponentReader
public void startElement(String name, String namespace, AttributeSet atts, Namespaces nsDecls) throws XMLException
startElement
in class ComponentReader
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
- To indicate a problem in processing the current element.public void endElement(String name, String namespace) throws XMLException
endElement
in class ComponentReader
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
- To indicate that the current element cannnot be processed successfully.public void characters(char[] ch, int start, int length) throws XMLException
characters
in class ComponentReader
ch
- the character array containing the charactersstart
- the starting index into the character arraylength
- the number of characters to recieveXMLException
ComponentReader.characters(char[], int, int)
Copyright © 2019. All rights reserved.