return obj;
}
public void marshal(RegistryObject object,Element parent)
{
BindingTemplate binding = (BindingTemplate)object;
String generic = getGeneric(null);
String namespace = getUDDINamespace(generic);
Element element = parent.getOwnerDocument().createElementNS(namespace,TAG_NAME);
AbstractHandler handler = null;
String bindingKey = binding.getBindingKey();
if (bindingKey != null)
element.setAttribute("bindingKey",bindingKey);
else
element.setAttribute("bindingKey","");
String serviceKey = binding.getServiceKey();
if (serviceKey != null)
element.setAttribute("serviceKey",serviceKey);
Vector descrVector = binding.getDescriptionVector();
if ((descrVector!=null) && (descrVector.size() > 0))
{
handler = maker.lookup(DescriptionHandler.TAG_NAME);
for (int i=0; i < descrVector.size(); i++)
handler.marshal((Description)descrVector.elementAt(i),element);
}
AccessPoint accessPoint = binding.getAccessPoint();
if (accessPoint != null)
{
handler = maker.lookup(AccessPointHandler.TAG_NAME);
handler.marshal(accessPoint,element);
}
else // Can never contain both a AccessPoint and a HostingRedirector
{
HostingRedirector redirector = binding.getHostingRedirector();
if (redirector != null)
{
handler = maker.lookup(HostingRedirectorHandler.TAG_NAME);
handler.marshal(redirector,element);
}
}
TModelInstanceDetails tModInstDet = binding.getTModelInstanceDetails();
if (tModInstDet != null)
{
handler = maker.lookup(TModelInstanceDetailsHandler.TAG_NAME);
handler.marshal(tModInstDet,element);
}