beautypg.com

IBM WebSphere Adapters User Manual

Page 160

background image

WBIMetadataDiscoveryImpl.getLogUtils().traceMethodExit

(CLASSNAME, "getImportNameSpaces");

return list;

}

getNameSpaces

The getNameSpaces() method returns the NameSpaces listed in the XML schema
definition. Typically these are application specific information schema definition
namespaces. Note that this list is for outside namespaces only; child object
namespaces are included by the Adapter Foundation Classes.

public List getNameSpaces() {

WBIMetadataDiscoveryImpl.getLogUtils().traceMethodEntrance

(CLASSNAME, "getNameSpaces");

ArrayList list = new ArrayList();
list.add(new QName(Constants.ASI_TARGET_NAMESPACE, Constants.ASI));
WBIMetadataDiscoveryImpl.getLogUtils().traceMethodExit

(CLASSNAME, "getNameSpaces");

return list;

}

getASISchemaName

The getASISchemaName() method returns the target namespace that represents the
application specific information schema.

public String getASISchemaName() {

return Constants.ASI_TARGET_NAMESPACE;

}

getCardinality

The getCardinality() method returns the cardinality for an elements in the
business object definition. This value is used to formulate the maxOccurs and
minOccurs tag.

public String getCardinality(String attrName) {

TwineBallAttribute definition =

(TwineBallAttribute) this.getAttributeList().get(attrName);

if (definition.isChild)

return Constants.N_CARDINALITY;

else

return "1";

}

getMaxLength

The getMaxLength() method returns the maxLength for the elements in the
business object definition. This is used to fill in the maxLength tag for the XML
schema definition.

public int getMaxLength(String name) {

return 0;

}

getRequired

The getRequired() method returns true if the element is marked as required in the
XML schema definition. Otherwise, this method returns false.

public boolean getRequired(String attrName) { return false; }

154

WebSphere Adapters: WebSphere Adapter Toolkit User Guide