org.exolab.castor.xml.schema.reader
Class SchemaReader
java.lang.Object
org.exolab.castor.xml.schema.reader.SchemaReader
public class SchemaReader
extends java.lang.Object
A class for reading XML Schemas
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:41 $SchemaReader(InputSource source) - Creates a new SchemaReader for the given InputSource
|
SchemaReader(Reader reader, String filename) - Creates a new SchemaReader for the given Reader
|
SchemaReader(String url) - Creates a new SchemaReader for the given URL
|
Schema | read() - Reads the Schema from the source and returns the Schema
object model.
|
void | setEntityResolver(EntityResolver resolver) - Sets the EntityResolver used to resolve SYSTEM Identifier.
|
void | setURIResolver(URIResolver uriresolver) - Sets the URIResolver used to resolve hrefs.
|
void | setValidation(boolean validate) - Sets whether or not post-read validation should
occur.
|
SchemaReader
public SchemaReader(InputSource source)
throws IOException
Creates a new SchemaReader for the given InputSource
source
- the InputSource to read the Schema from.
SchemaReader
public SchemaReader(Reader reader,
String filename)
throws IOException
Creates a new SchemaReader for the given Reader
reader
- the Reader to read the Schema from.filename
- for reporting errors.
SchemaReader
public SchemaReader(String url)
throws IOException
Creates a new SchemaReader for the given URL
read
public Schema read()
throws IOException
Reads the Schema from the source and returns the Schema
object model.
Note: Subsequent calls to this method will simply
return a cached copy of the Schema object. To read a new
Schema object, create a new Reader.
- the new Schema created from the source of this SchemaReader
setEntityResolver
public void setEntityResolver(EntityResolver resolver)
Sets the EntityResolver used to resolve SYSTEM Identifier.
If the entity resolver is null, the default one will be used.
resolver
- the EntityResolver to use.
setURIResolver
public void setURIResolver(URIResolver uriresolver)
Sets the URIResolver used to resolve hrefs.
If the entity resolver is null, the default one will be used.
setValidation
public void setValidation(boolean validate)
Sets whether or not post-read validation should
occur. By default, validation is enabled. Note
that certain read validation cannot be disabled.
validate
- a boolean that when true will force
a call to Schema#validate after the schema is read.
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com