THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Source Concrete Type | Source Declared Type | Target Concrete Type | Target Declared Type | Support | |||||
---|---|---|---|---|---|---|---|---|---|
JAXBCustomer | java.lang.Object | SDOCustomer | java.lang.Object | Y | |||||
JAXBCustomer | customer.Customer | SDOCustomer | customer.Customer |
| |||||
|
|
|
|
| |||||
|
|
|
|
| |||||
|
|
|
|
| |||||
|
|
|
|
| |||||
|
|
|
|
| |||||
|
|
|
|
| |||||
|
|
|
|
|
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
Operation-level transformations
...
Code Block |
---|
/** * DataBinding represents a data representation, for example, SDO, JAXB and AXIOM */ public interface DataBinding { /** * A special databinding for input message of an operation */ String IDL_INPUT = "idl:input"; /** * A special databinding for output message of an operation */ String IDL_OUTPUT = "idl:output"; /** * A special databinding for fault message of an operation */ String IDL_FAULT = "idl:fault"; /** * The name of a databinding should be case-insensitive and unique * * @return The name of the databinding */ String getName(); /** * Get the aliases for the databinding * * @return An array of aliases */ String[] getAliases(); /** * Introspect and populate information to a DataType model * * @param javaType The java class or interface to be introspected * @param annotations The java annotations * @return true if the databinding has recognized the given data type */ boolean introspect(DataType dataType, Annotation[] annotations); /** * Introspect the data to figure out the corresponding data type * * @param value The object to be checked * @return The DataType or null if the java type is not supported by this databinding */ DataType introspect(Object value); /** * Provide a WrapperHandler for this databinding * @return A wrapper handler which can handle wrapping/wrapping for this databinding */ WrapperHandler getWrapperHandler(); /** * Make a copy of the object for "pass-by-value" semantics * @param source object to copy * @return copy of the object passed in as argument */ Object copy(Object object); /** * Get the type mapper for simple types * @return The databinding-specific simple type mapper */ SimpleTypeMapper getSimpleTypeMapper(); /** * Get the handler that can handle exceptions/faults in the * databinding-specific way * * @return An instance of the exception handler */ ExceptionHandler getExceptionHandler(); } |
...
Code Block |
---|
/**
* Module activator for AXIOM databinding
*
* @version $Rev: 529327 $ $Date: 2007-04-16 10:10:43 -0700 (Mon, 16 Apr 2007) $
*/
public class AxiomDataBindingModuleActivator implements ModuleActivator {
public Map<Class, Object> getExtensionPoints() {
return null;
}
public void start(ExtensionPointRegistry registry) {
DataBindingExtensionPoint dataBindingRegistry = registry.getExtensionPoint(DataBindingExtensionPoint.class);
dataBindingRegistry.register(new AxiomDataBinding());
TransformerExtensionPoint transformerRegistry = registry.getExtensionPoint(TransformerExtensionPoint.class);
transformerRegistry.registerTransformer(new Object2OMElement());
transformerRegistry.registerTransformer(new OMElement2Object());
transformerRegistry.registerTransformer(new OMElement2String());
transformerRegistry.registerTransformer(new OMElement2XMLStreamReader());
transformerRegistry.registerTransformer(new String2OMElement());
transformerRegistry.registerTransformer(new XMLStreamReader2OMElement());
}
public void stop(ExtensionPointRegistry registry) {
}
}
|
TODO List
- Support Collection or Array data types
- Better support interface/operation level databinding mappings
- Support databinding for java types which can be used for multiple datatypes, for example, InputStream or String can be used to represent various formats
- Better support exception/fault
- Support application data based introspection of operations