com.ibm.j2ca.extension.emd.description
Class WBIDataDescriptionImpl

java.lang.Object
  extended bycom.ibm.j2ca.extension.emd.description.WBIDataDescriptionImpl
All Implemented Interfaces:
commonj.connector.metadata.description.DataDescription

public abstract class WBIDataDescriptionImpl
extends java.lang.Object
implements commonj.connector.metadata.description.DataDescription

Implementation for DataDescription interface. Provides utility methods that help in filling the BO structure for serialization.


Constructor Summary
WBIDataDescriptionImpl()
           
 
Method Summary
protected  java.lang.String createBusinessObjectSchema()
           
 java.lang.String createContainerDefinition()
          Returns a container definition for the BO
 java.lang.String createGraphDefinition()
          Returns the String representing the Graph definition for the BO
abstract  java.lang.String getASISchemaName()
          Returns the namespace for the ASI Schema
 java.util.LinkedHashMap getAttributeList()
          The list of attributes for the BO.
abstract  java.lang.String getAttributeName(java.lang.String attrName)
          Returns the attribute name that should be added in xsd
 java.lang.String getBOName()
          Returns the BO name for the data description.
abstract  java.lang.String getCardinality(java.lang.String name)
          Returns cardinality of the attribute.
abstract  java.util.Iterator getChildList()
          Returns the list of child objects as an Iterator.
 java.lang.String getComment()
           
 java.lang.String getDataBindingGeneratorClassName()
          This method is used by the tooling to get the DataBinding class name
 commonj.connector.metadata.description.DataFile[] getDataFiles()
          These values are not needed.
 java.lang.String getGenericDataBindingClassName()
          This method is used by the tool to get the generic data binding class name
abstract  java.util.List getImportNameSpaces()
          Returns the list of namespaces that should be imported in schema
abstract  int getMaxLength(java.lang.String name)
          Returns the maxlenght for the attribute
abstract  WBIMetadata getMetadataForAttribute(java.lang.String attrName)
          Returns the metadata object for the attribute
abstract  WBIMetadata getMetadataForBusinessObject()
          Returns the BO Level metadata object
 WBIMetadataObjectImpl getMetadataObject()
          Returns the MetadataObject instance for this description object.
 javax.xml.namespace.QName getName()
          Returns the namespace for Data Description
abstract  java.util.List getNameSpaces()
          Returns the list of namespaces that should be included in XSD
 java.lang.String getRelativePath()
          Returns the relative path for XSDs
abstract  boolean getRequired(java.lang.String name)
          Returns if the attribute is required or not
 commonj.connector.metadata.description.SchemaDefinition[] getSchemaDefinitions()
          List of schema defintions.
abstract  java.lang.String getType(java.lang.String attrName)
          Returns the type for an attribute that should be used for an attribute
abstract  java.util.List getVerbs()
          Returns the list of verbs that should be added to BGs for a top level BO
abstract  boolean isContainer()
          Returns if container is needed for this BO defintion
 boolean isTopLevel()
          Checks if the object is a TopLevel BO This is used to generate Business Graph definitions.
 void populateSchemaDefinitions()
          This method should be called when the instance of data descriptions are being added to method descriptions and the xsd creation is needed.
abstract  void prepareChildSchemaFiles()
          If the top level BO creating can cover creating XSD's for all the children that have been selected then this method need not have anything just a dummy implementation would work, but if there is a need for separate and recursive creating of child objects then this method should be implemented.
protected  java.lang.String prepareSchemaFiles()
          Prepares the schema file for the BO mapping to the data description
 void put(java.lang.String namespace, java.net.URI location, java.lang.String buffer)
          Put the XSD to the list of schema defintions.
 void setComment(java.lang.String comment)
           
 void setDataBindingGeneratorClassName(java.lang.String dataBindingGeneratorClassName)
          This parameter is not needed.
 void setGenericDataBindingClassName(java.lang.String genericDataBindingClassName)
          Use this method to override the name of the default data binding class name provided by the base class.
 void setMetadataObject(WBIMetadataObjectImpl metadataObject)
          Set the MetadataObject for the data description.
 void setName(javax.xml.namespace.QName name)
           
 void setName(java.lang.String uri, java.lang.String name)
          Sets the namespace for data description
 void setRelativePath(java.lang.String relativePath)
          Set the relative path that must be used for XSDs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WBIDataDescriptionImpl

public WBIDataDescriptionImpl()
Method Detail

setComment

public void setComment(java.lang.String comment)
Parameters:
comment - The comment to set.

setDataBindingGeneratorClassName

public void setDataBindingGeneratorClassName(java.lang.String dataBindingGeneratorClassName)
This parameter is not needed.

Parameters:
dataBindingGeneratorClassName - The dataBindingGeneratorClassName to set.

getDataFiles

public commonj.connector.metadata.description.DataFile[] getDataFiles()
These values are not needed.

Specified by:
getDataFiles in interface commonj.connector.metadata.description.DataDescription
See Also:
DataDescription.getDataFiles()

getSchemaDefinitions

public commonj.connector.metadata.description.SchemaDefinition[] getSchemaDefinitions()
List of schema defintions.

Specified by:
getSchemaDefinitions in interface commonj.connector.metadata.description.DataDescription
See Also:
DataDescription.getSchemaDefinitions()

setGenericDataBindingClassName

public void setGenericDataBindingClassName(java.lang.String genericDataBindingClassName)
Use this method to override the name of the default data binding class name provided by the base class. The default used is com.ibm.j2ca.extension.emd.runtime.WBIDataBindingImpl.

Parameters:
genericDataBindingClassName - The genericDataBindingClassName to set.

setName

public void setName(javax.xml.namespace.QName name)

getDataBindingGeneratorClassName

public java.lang.String getDataBindingGeneratorClassName()
This method is used by the tooling to get the DataBinding class name

Specified by:
getDataBindingGeneratorClassName in interface commonj.connector.metadata.description.DataDescription
See Also:
DataDescription.getDataBindingGeneratorClassName()

getGenericDataBindingClassName

public java.lang.String getGenericDataBindingClassName()
This method is used by the tool to get the generic data binding class name

Specified by:
getGenericDataBindingClassName in interface commonj.connector.metadata.description.DataDescription
See Also:
DataDescription.getGenericDataBindingClassName()

getName

public javax.xml.namespace.QName getName()
Returns the namespace for Data Description

Specified by:
getName in interface commonj.connector.metadata.description.DataDescription
See Also:
DataDescription.getName()

populateSchemaDefinitions

public void populateSchemaDefinitions()
                               throws commonj.connector.metadata.MetadataException
This method should be called when the instance of data descriptions are being added to method descriptions and the xsd creation is needed. This method results in creation of XSD's for parent as well as the contained children that are selected for generation.

Throws:
commonj.connector.metadata.MetadataException

getComment

public java.lang.String getComment()
Specified by:
getComment in interface commonj.connector.metadata.description.DataDescription
See Also:
DataDescription.getComment()

getChildList

public abstract java.util.Iterator getChildList()
                                         throws commonj.connector.metadata.MetadataException
Returns the list of child objects as an Iterator. The child objects should be instances of MetadataObject

Returns:
Throws:
commonj.connector.metadata.MetadataException

getAttributeList

public java.util.LinkedHashMap getAttributeList()
The list of attributes for the BO. Its a hashtable of name value pairs.

Returns:

prepareChildSchemaFiles

public abstract void prepareChildSchemaFiles()
                                      throws commonj.connector.metadata.MetadataException
If the top level BO creating can cover creating XSD's for all the children that have been selected then this method need not have anything just a dummy implementation would work, but if there is a need for separate and recursive creating of child objects then this method should be implemented.

Throws:
commonj.connector.metadata.MetadataException

isTopLevel

public boolean isTopLevel()
Checks if the object is a TopLevel BO This is used to generate Business Graph definitions.

Returns:

setMetadataObject

public void setMetadataObject(WBIMetadataObjectImpl metadataObject)
Set the MetadataObject for the data description. A handle to this might be needed during the generation of the BO.

Parameters:
metadataObject -

getMetadataObject

public WBIMetadataObjectImpl getMetadataObject()
Returns the MetadataObject instance for this description object.

Returns:
WBIMetadataObjectImpl

put

public void put(java.lang.String namespace,
                java.net.URI location,
                java.lang.String buffer)
Put the XSD to the list of schema defintions.

Parameters:
location - The physical relative location
buffer - XSD string

prepareSchemaFiles

protected java.lang.String prepareSchemaFiles()
                                       throws commonj.connector.metadata.MetadataException
Prepares the schema file for the BO mapping to the data description

Returns:
Throws:
commonj.connector.metadata.MetadataException

setRelativePath

public void setRelativePath(java.lang.String relativePath)
Set the relative path that must be used for XSDs

Parameters:
relativePath -

getRelativePath

public java.lang.String getRelativePath()
Returns the relative path for XSDs

Returns:

createBusinessObjectSchema

protected java.lang.String createBusinessObjectSchema()
                                               throws commonj.connector.metadata.MetadataException
Throws:
commonj.connector.metadata.MetadataException

createGraphDefinition

public java.lang.String createGraphDefinition()
Returns the String representing the Graph definition for the BO

Returns:

createContainerDefinition

public java.lang.String createContainerDefinition()
Returns a container definition for the BO

Returns:

getBOName

public java.lang.String getBOName()
Returns the BO name for the data description. This is needed because the BO Name can be different from the name we have in EIS system because of adding prefix or removing special characters

Returns:

setName

public void setName(java.lang.String uri,
                    java.lang.String name)
Sets the namespace for data description

Parameters:
uri -
name -

getNameSpaces

public abstract java.util.List getNameSpaces()
Returns the list of namespaces that should be included in XSD


getVerbs

public abstract java.util.List getVerbs()
Returns the list of verbs that should be added to BGs for a top level BO

Returns:

getImportNameSpaces

public abstract java.util.List getImportNameSpaces()
                                            throws commonj.connector.metadata.MetadataException
Returns the list of namespaces that should be imported in schema

Returns:
Throws:
commonj.connector.metadata.MetadataException

getMetadataForBusinessObject

public abstract WBIMetadata getMetadataForBusinessObject()
Returns the BO Level metadata object

Returns:

getAttributeName

public abstract java.lang.String getAttributeName(java.lang.String attrName)
Returns the attribute name that should be added in xsd

Parameters:
attrName -
Returns:

getType

public abstract java.lang.String getType(java.lang.String attrName)
Returns the type for an attribute that should be used for an attribute

Parameters:
attrName -
Returns:

getMetadataForAttribute

public abstract WBIMetadata getMetadataForAttribute(java.lang.String attrName)
Returns the metadata object for the attribute

Parameters:
attrName -
Returns:

isContainer

public abstract boolean isContainer()
Returns if container is needed for this BO defintion

Returns:

getASISchemaName

public abstract java.lang.String getASISchemaName()
Returns the namespace for the ASI Schema

Returns:

getRequired

public abstract boolean getRequired(java.lang.String name)
Returns if the attribute is required or not

Parameters:
name -
Returns:

getCardinality

public abstract java.lang.String getCardinality(java.lang.String name)
Returns cardinality of the attribute.

Parameters:
name -
Returns:

getMaxLength

public abstract int getMaxLength(java.lang.String name)
Returns the maxlenght for the attribute

Parameters:
name -
Returns: