commonj.connector.metadata.description
Interface DataBindingGenerator


public interface DataBindingGenerator

Generator supplied by the Metadata Discovery service that generates a DataBinding or Record from the schema definition for input and output.

The DataBindingClassName must be unique. To reduce the chance of collisions, it is recommended that the DataBindingClassName in the DataBindingDescription be derived from the schema following the naming rules in SDO 1.1. If the name of the service data object would be "abc.Customer" then the name of the DataBindingClassName should be "abc.<"binding">.CustomerDataBinding". The <"binding"> name must be a valid token of a Java package, and should be meaningful, such as "sap", "cicseci", or "psft".

Since:
1.0

Method Summary
 DataBindingDescription[] generateDataBinding(QName name, URL schema)
          The tool framework is responsible for keeping track of the URL of the schema and QName of the global element or complexType definition.
 String[] getDataBindingClassNames(QName name, URL schema)
          A light weight convenience method providing tooling with the list of DataBindings or Records that would be generated for a given global element or complexType.
 

Method Detail

generateDataBinding

DataBindingDescription[] generateDataBinding(QName name,
                                             URL schema)
                                             throws MetadataException
The tool framework is responsible for keeping track of the URL of the schema and QName of the global element or complexType definition. When the tool framework invokes the DataBindingGenerator it passes its own URL implementation. The DataBindingGenerator can access the schema using the URL.openstream() call.

If the schema imports other schema then the import must be absolute or relative to the URL argument so that all schema can be found.

Given an element or complexType definition that is specified using a URL for the schema and the QName of the element or complexType, the DataBinding generator will return a List of DataBindingDescriptions.

Parameters:
name - Global element or complexType that is an argument for input or output. If a global element is specified then it must have a complexType.
schema - URL location of schema.
Returns:
Array of DataBindingDescription
Throws:
MetadataException - If any error occurs generating the DataBinding implementation.

getDataBindingClassNames

String[] getDataBindingClassNames(QName name,
                                  URL schema)
                                  throws MetadataException
A light weight convenience method providing tooling with the list of DataBindings or Records that would be generated for a given global element or complexType. The first entry in the array must be the top level DataBinding or Record. Refer to DataBindingDescription.isRoot()

Parameters:
name - Global element or complexType that is an argument for input or output. If a global element is specified then it must have a complexType.
schema - URL location of the schema.
Returns:
an array of the fully qualified names of the DataBinding or Record classes.
Throws:
MetadataException - If any error occurs generating the DataBinding className.
Since:
1.1
See Also:
DataBindingDescription.isRoot()