IBM WebSphere Adapters User Manual page 159

Version 6 release 2
Table of Contents

Advertisement

bometadata.setNameSpace(namespace);
bometadata.setObjectNameSpace(Constants.BUS_OBJ_APPINFO_ASI_TYPE_TAG);
bometadata.setASI(Constants.ASI_OBJECTNAME,
this.getMetadataObject().getDisplayName());
WBIMetadataDiscoveryImpl.getLogUtils().traceMethodExit
(CLASSNAME, "getMetadataForBusinessObject");
return bometadata;
} // End of BO level metadata
isContainer
The isContainer() method returns true when the complexType definition requires
a Container definition with the graph definition. The Container definition is used
when the adapter supports a RetrieveAll operation.
public boolean isContainer() {
WBIMetadataDiscoveryImpl.getLogUtils().traceMethodEntrance
boolean retValue = false;
String objName = getName().getLocalPart();
if (objName.endsWith("Container") && !objName.equals(getBOName()))
retValue = true;
WBIMetadataDiscoveryImpl.getLogUtils().traceMethodExit
return retValue;
}
getType
The getType() method returns the XML schema definition type that represents the
element or field of the object definition.
public String getType(String attrName) {
if (getCardinality(attrName) == Constants.N_CARDINALITY) {
return attrName.toLowerCase() + ":"
+ StringCaseChanger.toCamelCase(attrName);
}
return Constants.XS_STRING;
}
getAttributeName
The getAttributeName() method returns the element name that represents the field
in the object. This is the element name that would be used in the XML schema
definition.
public String getAttributeName(String attrName) {
return StringCaseChanger.toCamelCase(attrName);
}
getImportNameSpaces
The getImportNameSpaces() method returns a list of ImportedNameSpace instances
that should be imported in the business object schema.
public List getImportNameSpaces() throws MetadataException {
WBIMetadataDiscoveryImpl.getLogUtils().traceMethodEntrance
ArrayList list = new ArrayList();
ImportedNameSpace namespace = new ImportedNameSpace();
namespace.setLocation(Constants.TWINEBALLASI_XSD);
namespace.setNameSpace(Constants.ASI_TARGET_NAMESPACE);
list.add(namespace);
(CLASSNAME, "isContainer");
(CLASSNAME, "isContainer");
(CLASSNAME, "getImportNameSpaces");
WebSphere Adapter development overview
153

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Websphere adapter toolkit

Table of Contents