org.apache.commons.betwixt.schema
Class SchemaTranscriber

java.lang.Object
  extended by org.apache.commons.betwixt.schema.SchemaTranscriber

public class SchemaTranscriber
extends java.lang.Object

Generates XML Schemas for Betwixt mappings.

The basic idea is that an object model for the schema will be created and Betwixt can be used to output this to xml. This should allow both SAX and text.

Version:
$Revision: 561314 $
Author:
Apache Commons Team

Field Summary
static java.lang.String W3C_SCHEMA_INSTANCE_URI
           
static java.lang.String W3C_SCHEMA_URI
           
 
Constructor Summary
SchemaTranscriber()
           
 
Method Summary
 BindingConfiguration createSchemaBindingConfiguration()
          Gets a BindingConfiguration that is suitable for mapping Schema.
 IntrospectionConfiguration createSchemaIntrospectionConfiguration()
          Gets an IntrospectionConfiguration that is suitable for introspecting Schema.
 Schema generate(java.lang.Class clazz)
          Generates an XML Schema model for the given class.
 Schema generate(XMLBeanInfo xmlBeanInfo)
          Generates an XML Schema model from the given XMLBeanInfo
 TranscriptionConfiguration getConfiguration()
          Gets the configuration for the XMLBeanInfo to XML schema transcription.
 XMLIntrospector getXMLIntrospector()
          Gets the XMLIntrospector used to create XMLInfoBean's.
 void setConfiguration(TranscriptionConfiguration configuration)
          Sets the configuration for the XMLBeanInfo to XML schema transcription.
 void setXMLIntrospector(XMLIntrospector introspector)
          Sets the XMLIntrospector used to create XMLInfoBeans.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

W3C_SCHEMA_URI

public static final java.lang.String W3C_SCHEMA_URI
See Also:
Constant Field Values

W3C_SCHEMA_INSTANCE_URI

public static final java.lang.String W3C_SCHEMA_INSTANCE_URI
See Also:
Constant Field Values
Constructor Detail

SchemaTranscriber

public SchemaTranscriber()
Method Detail

getConfiguration

public TranscriptionConfiguration getConfiguration()
Gets the configuration for the XMLBeanInfo to XML schema transcription.

Returns:
TranscriptionConfiguration, not null

setConfiguration

public void setConfiguration(TranscriptionConfiguration configuration)
Sets the configuration for the XMLBeanInfo to XML schema transcription.

Parameters:
configuration - TranscriptionConfiguration, not null

getXMLIntrospector

public XMLIntrospector getXMLIntrospector()
Gets the XMLIntrospector used to create XMLInfoBean's.

Returns:
XMLIntrospector used to create XMLInfoBean's used to generate schema, not null

setXMLIntrospector

public void setXMLIntrospector(XMLIntrospector introspector)

Sets the XMLIntrospector used to create XMLInfoBeans.

Note: certain properties will be reconfigured so that the introspection will produce correct results.

Parameters:
introspector - XMLIntrospector used to create XMLInfoBean's used to generate schema, not null

generate

public Schema generate(java.lang.Class clazz)
                throws java.beans.IntrospectionException
Generates an XML Schema model for the given class.

Parameters:
clazz - not null
Returns:
Schema model, not null
Throws:
java.beans.IntrospectionException

generate

public Schema generate(XMLBeanInfo xmlBeanInfo)
                throws java.beans.IntrospectionException
Generates an XML Schema model from the given XMLBeanInfo

Parameters:
xmlBeanInfo - not null
Returns:
Schema model, not null
Throws:
java.beans.IntrospectionException

createSchemaIntrospectionConfiguration

public IntrospectionConfiguration createSchemaIntrospectionConfiguration()

Gets an IntrospectionConfiguration that is suitable for introspecting Schema.

Note: A new instance is created each time this method is called. It can therefore be safely be modified.

Returns:
IntrospectionConfiguration, not null

createSchemaBindingConfiguration

public BindingConfiguration createSchemaBindingConfiguration()

Gets a BindingConfiguration that is suitable for mapping Schema.

Note: A new instance is created each time this method is called. It can therefore be safely be modified.

Returns:
BindingConfiguration, not null


Copyright © 2002-2008 The Apache Software Foundation. All Rights Reserved.