return obj;
}
public void marshal(RegistryObject object,Element parent)
{
RelatedBusinessesList list = (RelatedBusinessesList)object;
Element element = parent.getOwnerDocument().createElementNS(null,TAG_NAME);
AbstractHandler handler = null;
String generic = list.getGeneric();
if ((generic != null) && (generic.trim().length() > 0))
{
element.setAttribute("generic",generic);
if (generic.equals(IRegistry.UDDI_V1_GENERIC))
element.setAttribute("xmlns",IRegistry.UDDI_V1_NAMESPACE);
else if (generic.equals(IRegistry.UDDI_V2_GENERIC))
element.setAttribute("xmlns",IRegistry.UDDI_V2_NAMESPACE);
else if (generic.equals(IRegistry.UDDI_V3_GENERIC))
element.setAttribute("xmlns",IRegistry.UDDI_V3_NAMESPACE);
}
else // Default to UDDI v2 values
{
element.setAttribute("generic",IRegistry.UDDI_V2_GENERIC);
element.setAttribute("xmlns",IRegistry.UDDI_V2_NAMESPACE);
}
String operator = list.getOperator();
if (operator != null)
element.setAttribute("operator",operator);
else
element.setAttribute("operator","");
boolean truncated = list.isTruncated();
if (truncated)
element.setAttribute("truncated","true");
BusinessKey key = list.getBusinessKey();
if (key != null)
{
handler = maker.lookup(BusinessKeyHandler.TAG_NAME);
handler.marshal(key,element);
}
RelatedBusinessInfos infos = list.getRelatedBusinessInfos();
if (infos != null)
{
handler = maker.lookup(RelatedBusinessInfosHandler.TAG_NAME);
handler.marshal(infos,element);
}