org.apache.commons.betwixt.schema
Class Schema

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

public class Schema
extends java.lang.Object

Model for top level element in an XML Schema

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

Constructor Summary
Schema()
           
Schema(XMLIntrospector introspector)
           
 
Method Summary
 void addComplexType(GlobalComplexType complexType)
          Adds a new complex type to those defined
 void addElement(GlobalElement element)
          Adds a new element to those defined.
 GlobalComplexType addGlobalComplexType(TranscriptionConfiguration configuration, ElementDescriptor elementDescriptor)
          Adds a new global complex type definition matching the given element descriptor.
 void addGlobalElementType(TranscriptionConfiguration configuration, ElementDescriptor elementDescriptor)
          Adds global (top level) element and type declarations matching the given descriptor.
 void addSimpleType(SimpleType simpleType)
          Adds a new simple type to those defined.
 boolean equals(java.lang.Object obj)
           
 java.util.List getComplexTypes()
          Gets the complex types defined
 java.util.List getElements()
          Gets the elements definied
 java.util.List getSimpleTypes()
          Gets the simple types defined.
 int hashCode()
           
 XMLBeanInfo introspect(java.lang.Class type)
          Introspects the given type giving an XMLBeanInfo.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Schema

public Schema()

Schema

public Schema(XMLIntrospector introspector)
Method Detail

introspect

public XMLBeanInfo introspect(java.lang.Class type)
                       throws java.beans.IntrospectionException
Introspects the given type giving an XMLBeanInfo.

Parameters:
type - Class to introspect, not null
Returns:
XMLBeanInfo, not null
Throws:
java.beans.IntrospectionException

getComplexTypes

public java.util.List getComplexTypes()
Gets the complex types defined

Returns:
list of ComplexType's not null

addComplexType

public void addComplexType(GlobalComplexType complexType)
Adds a new complex type to those defined

Parameters:
complexType - not null

getElements

public java.util.List getElements()
Gets the elements definied

Returns:
list of Elements not null

addElement

public void addElement(GlobalElement element)
Adds a new element to those defined.

Parameters:
element - not null

getSimpleTypes

public java.util.List getSimpleTypes()
Gets the simple types defined.

Returns:
list of SimpleTypes not null

addSimpleType

public void addSimpleType(SimpleType simpleType)
Adds a new simple type to those defined.

Parameters:
simpleType -

addGlobalElementType

public void addGlobalElementType(TranscriptionConfiguration configuration,
                                 ElementDescriptor elementDescriptor)
                          throws java.beans.IntrospectionException
Adds global (top level) element and type declarations matching the given descriptor.

Parameters:
elementDescriptor - ElementDescriptor not null
Throws:
java.beans.IntrospectionException

addGlobalComplexType

public GlobalComplexType addGlobalComplexType(TranscriptionConfiguration configuration,
                                              ElementDescriptor elementDescriptor)
                                       throws java.beans.IntrospectionException
Adds a new global complex type definition matching the given element descriptor. If this element descriptor has already been mapped to a global type then that is returned.

Parameters:
configuration - TranscriptionConfiguration, not null
elementDescriptor - ElementDescriptor, not null
Returns:
GlobalComplexType
Throws:
java.beans.IntrospectionException
Since:
0.7

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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