org.apache.tuscany.sca.databinding
Interface DataBinding


public interface DataBinding

DataBinding represents a data representation, for example, SDO, JAXB and AXIOM


Field Summary
static java.lang.String IDL_FAULT
          A special databinding for fault message of an operation
static java.lang.String IDL_INPUT
          A special databinding for input message of an operation
static java.lang.String IDL_OUTPUT
          A special databinding for output message of an operation
 
Method Summary
 java.lang.Object copy(java.lang.Object object)
          Make a copy of the object for "pass-by-value" semantics
 java.lang.String[] getAliases()
          Get the aliases for the databinding
 ExceptionHandler getExceptionHandler()
          Get the handler that can handle exceptions/faults in the databinding-specific way
 java.lang.String getName()
          The name of a databinding should be case-insensitive and unique
 SimpleTypeMapper getSimpleTypeMapper()
          Get the type mapper for simple types
 WrapperHandler getWrapperHandler()
          Provide a WrapperHandler for this databinding
 boolean introspect(DataType dataType, java.lang.annotation.Annotation[] annotations)
          Introspect and populate information to a DataType model
 DataType introspect(java.lang.Object value)
          Introspect the data to figure out the corresponding data type
 

Field Detail

IDL_INPUT

static final java.lang.String IDL_INPUT
A special databinding for input message of an operation

See Also:
Constant Field Values

IDL_OUTPUT

static final java.lang.String IDL_OUTPUT
A special databinding for output message of an operation

See Also:
Constant Field Values

IDL_FAULT

static final java.lang.String IDL_FAULT
A special databinding for fault message of an operation

See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
The name of a databinding should be case-insensitive and unique

Returns:
The name of the databinding

getAliases

java.lang.String[] getAliases()
Get the aliases for the databinding

Returns:
An array of aliases

introspect

boolean introspect(DataType dataType,
                   java.lang.annotation.Annotation[] annotations)
Introspect and populate information to a DataType model

Parameters:
javaType - The java class or interface to be introspected
annotations - The java annotations
Returns:
true if the databinding has recognized the given data type

introspect

DataType introspect(java.lang.Object value)
Introspect the data to figure out the corresponding data type

Parameters:
value - The object to be checked
Returns:
The DataType or null if the java type is not supported by this databinding

getWrapperHandler

WrapperHandler getWrapperHandler()
Provide a WrapperHandler for this databinding

Returns:
A wrapper handler which can handle wrapping/wrapping for this databinding

copy

java.lang.Object copy(java.lang.Object object)
Make a copy of the object for "pass-by-value" semantics

Parameters:
source - object to copy
Returns:
copy of the object passed in as argument

getSimpleTypeMapper

SimpleTypeMapper getSimpleTypeMapper()
Get the type mapper for simple types

Returns:
The databinding-specific simple type mapper

getExceptionHandler

ExceptionHandler getExceptionHandler()
Get the handler that can handle exceptions/faults in the databinding-specific way

Returns:
An instance of the exception handler