|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.abra.j2xb.beans.xmlModel.MoXmlBindingModel
public class MoXmlBindingModel
Defines the XML binding model (persistency environment). The binding model includes the mapped classes, the XML Schemas and special types (MOPropertyEditor).
MOPropertyEditorRegistry
,
MOPropertyEditor
Constructor Summary | |
---|---|
MoXmlBindingModel()
|
Method Summary | |
---|---|
MOPersistentBeanDescriptor |
addBean(java.lang.Class clazz)
Adds a bean to the binding model. |
MoXmlSchema |
defineSchema(java.lang.String beanXmlNamespace,
java.lang.String schemaPrefix)
|
void |
generateSchemas(java.io.File dir)
writes the XML Schemas of the binding model to a directory. |
void |
generateSchemas(MoXmlSchemaLocationGenerator schemaLocationGenerator)
writes the XML Schemas of the binding model to a directory. |
MOPersistentBeanDescriptor |
getBeanDescriptor(java.lang.Class clazz)
getter for MOPersistentBeanDescriptor |
MOPropertyEditorRegistry |
getPropertyEditorRegistry()
|
MoXmlSchema |
getSchema(java.lang.Class<?> aClass)
|
MoXmlSchema |
getSchema(MOPropertyDescriptor propertyDescriptor)
|
java.util.Collection<MoXmlSchema> |
getXmlSchemas()
|
boolean |
hasBean(java.lang.Class clazz)
tests if the model has the clazz parameter |
void |
inspectClassForPropertyEditorRegistryAnnotations(java.lang.Class clazz)
inspects a class for MORegisterPropertyEditor or
MORegisterPropertyEditors annotations and
registers the property editors defined using those annotations. |
void |
inspectClassForSeeAlsoAnnotations(java.lang.Class clazz)
inspects a class for MOSeeAlso annotation and
adds the references classes to the model. |
boolean |
isMapExceptionTrace()
|
void |
setMapExceptionTrace(boolean mapExceptionTrace)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MoXmlBindingModel()
Method Detail |
---|
public MOPersistentBeanDescriptor addBean(java.lang.Class clazz) throws MOBeansException
clazz
- the bean to add
MOBeansException
- thrown if the bean cannot be mapped to XML because of misuse of the J2XB annotations.public boolean hasBean(java.lang.Class clazz)
clazz
- - a J2XB mapped class
public MOPersistentBeanDescriptor getBeanDescriptor(java.lang.Class clazz)
clazz
- - a J2XB mapped class
public void generateSchemas(java.io.File dir) throws MoXmlSchemaGenerationException
dir
- the output directory
MoXmlSchemaGenerationException
- thrown in case of error to generate the schemaspublic void generateSchemas(MoXmlSchemaLocationGenerator schemaLocationGenerator) throws MoXmlSchemaGenerationException
schemaLocationGenerator
- - filename generator for the schemas
MoXmlSchemaGenerationException
- thrown in case of error to generate the schemaspublic java.util.Collection<MoXmlSchema> getXmlSchemas()
public MoXmlSchema getSchema(java.lang.Class<?> aClass)
aClass
- a mapped bean class
public MoXmlSchema getSchema(MOPropertyDescriptor propertyDescriptor)
propertyDescriptor
- a property descriptor of a mapped bean
public MOPropertyEditorRegistry getPropertyEditorRegistry()
public MoXmlSchema defineSchema(java.lang.String beanXmlNamespace, java.lang.String schemaPrefix)
public boolean isMapExceptionTrace()
public void setMapExceptionTrace(boolean mapExceptionTrace)
public void inspectClassForPropertyEditorRegistryAnnotations(java.lang.Class clazz) throws MOBeansException
MORegisterPropertyEditor
or
MORegisterPropertyEditors
annotations and
registers the property editors defined using those annotations.
clazz
- - class to inspect
MOBeansException
- - on inspection errorpublic void inspectClassForSeeAlsoAnnotations(java.lang.Class clazz) throws MOBeansException
MOSeeAlso
annotation and
adds the references classes to the model.
clazz
- - class to inspect
MOBeansException
- - on inspection error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |