Package org.duracloud.common.xml
Class SchemaGenerator
java.lang.Object
javax.xml.bind.SchemaOutputResolver
org.duracloud.common.xml.SchemaGenerator
public class SchemaGenerator
extends javax.xml.bind.SchemaOutputResolver
Schema generator which can be used to generate a schema for pojo classes
which have been marked up with JAXB annotations.
-
Constructor Summary
ConstructorsConstructorDescriptionSchemaGenerator(String fileName) Creates a SchemaGenerator indicating the preferred name of the generated schema file.SchemaGenerator(String fileName, File schemaDir) Creates a SchemaGenerator indicating the preferred name of the generated schema file and the directory in which is should be stored. -
Method Summary
Modifier and TypeMethodDescriptioncreateOutput(String namespaceUri, String defaultFileName) Called by the schema generation process.voidgenerateSchema(Class... classes) Generates an XML Schema which includes the given classes
-
Constructor Details
-
SchemaGenerator
Creates a SchemaGenerator indicating the preferred name of the generated schema file.- Parameters:
fileName- of the schema
-
SchemaGenerator
Creates a SchemaGenerator indicating the preferred name of the generated schema file and the directory in which is should be stored.- Parameters:
fileName- of the schemaschemaDir- directory in which to create the schema
-
-
Method Details
-
generateSchema
Generates an XML Schema which includes the given classes- Parameters:
classes- to include in the schema definition- Throws:
javax.xml.bind.JAXBExceptionIOException
-
createOutput
Called by the schema generation process. There is no need to call this method directly.- Specified by:
createOutputin classjavax.xml.bind.SchemaOutputResolver- Throws:
IOException
-