public class SchemaReader
extends java.lang.Object
| Constructor | Description |
|---|---|
SchemaReader() |
New style how to create a SchemaReader instance, requiring that
SchemaContext
and InputSource are set before calling read(). |
SchemaReader(java.io.Reader reader,
java.lang.String filename) |
Creates a new SchemaReader for the given Reader
|
SchemaReader(java.lang.String url) |
Creates a new SchemaReader for the given URL
|
SchemaReader(org.xml.sax.InputSource source) |
Creates a new SchemaReader for the given InputSource
|
| Modifier and Type | Method | Description |
|---|---|---|
Schema |
read() |
Reads the Schema from the source and returns the Schema
object model.
|
void |
setCacheIncludedSchemas(boolean cache) |
Sets wheter or not to cache the included xml schemas
instead of inlining them as specified by the XML Schema
specification.
|
void |
setEntityResolver(org.xml.sax.EntityResolver resolver) |
Sets the EntityResolver used to resolve SYSTEM Identifier.
|
void |
setErrorHandler(org.xml.sax.ErrorHandler errorHandler) |
Sets the ErrorHandler.
|
void |
setInputSource(org.xml.sax.InputSource inputSource) |
A different way to create a SchemaReader by using an empty constructor and
setting the InputSource afterwards.
|
void |
setSchemaContext(SchemaContext schemaContext) |
To set the
SchemaContext to be used. |
void |
setURIResolver(URIResolver uriresolver) |
Sets the URIResolver used to resolve hrefs.
|
void |
setValidation(boolean validate) |
Sets whether or not post-read validation should
occur.
|
public SchemaReader(org.xml.sax.InputSource source)
throws java.io.IOException
source - the InputSource to read the Schema from.java.io.IOExceptionpublic SchemaReader(java.io.Reader reader,
java.lang.String filename)
throws java.io.IOException
reader - the Reader to read the Schema from.filename - for reporting errors.java.io.IOExceptionpublic SchemaReader(java.lang.String url)
throws java.io.IOException
url - the URL stringjava.io.IOExceptionpublic SchemaReader()
SchemaContext
and InputSource are set before calling read().public void setSchemaContext(SchemaContext schemaContext)
SchemaContext to be used. Also resets the parser as it depends
of the SchemaContext.schemaContext - the SchemaContext to be usedpublic void setInputSource(org.xml.sax.InputSource inputSource)
inputSource - the InputSource to read the schema frompublic Schema read() throws java.io.IOException
java.io.IOExceptionpublic void setErrorHandler(org.xml.sax.ErrorHandler errorHandler)
errorHandler - public void setCacheIncludedSchemas(boolean cache)
cache - true to cache the included XML Schemas.public void setValidation(boolean validate)
validate - a boolean that when true will force
a call to Schema#validate after the schema is read.public void setEntityResolver(org.xml.sax.EntityResolver resolver)
resolver - the EntityResolver to use.public void setURIResolver(URIResolver uriresolver)
uriresolver - the URIResolver to use.Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com