Class SchemaWriter
java.lang.Object
org.exolab.castor.xml.schema.writer.SchemaWriter
A class for serializing Schema models.
- Version:
- $Revision$ $Date: 2006-04-05 13:16:42 -0600 (Wed, 05 Apr 2006) $
- Author:
- Keith Visco
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionA constructor to create an empty uninitialized SchemaWriter via XMLContext.SchemaWriter
(Writer writer) Creates a new SchemaWriter for the given Writer.SchemaWriter
(DocumentHandler handler) Creates a new SchemaWriter for the given DocumentHandler. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setDocumentHandler
(Writer writer) To set the DocumentHandler to a Writer - which is wrapped by a serializer.void
setDocumentHandler
(DocumentHandler documentHandler) To directly set a DocumentHandler.void
setSchemaContext
(SchemaContext schemaContext) To set theSchemaContext
to be used for theSchemaWriter
.void
-
Field Details
-
enable
public static boolean enableDeprecated.This field is no longer used and only here for backward compatibility.
-
-
Constructor Details
-
SchemaWriter
Creates a new SchemaWriter for the given Writer.- Parameters:
writer
- the Writer to serialize to- Throws:
IOException
- in case taht wrapping the Writer fails
-
SchemaWriter
Creates a new SchemaWriter for the given DocumentHandler.- Parameters:
handler
- the DocumentHandler to send events to
-
SchemaWriter
public SchemaWriter()A constructor to create an empty uninitialized SchemaWriter via XMLContext.
-
-
Method Details
-
setSchemaContext
To set theSchemaContext
to be used for theSchemaWriter
.- Parameters:
schemaContext
- theSchemaContext
to be used
-
setDocumentHandler
To set the DocumentHandler to a Writer - which is wrapped by a serializer.- Parameters:
writer
- the Writer to use for output- Throws:
IOException
- in case the Writer cannot be used for DocumentHandler
-
setDocumentHandler
To directly set a DocumentHandler.- Parameters:
documentHandler
- set the DocumentHandler
-
write
- Throws:
SAXException
-