return obj;
}
public void marshal(RegistryObject object,Element parent)
{
BusinessEntity business = (BusinessEntity)object;
String generic = getGeneric(null);
String namespace = getUDDINamespace(generic);
Element element = parent.getOwnerDocument().createElementNS(namespace,TAG_NAME);
AbstractHandler handler = null;
String businessKey = business.getBusinessKey();
if (businessKey != null)
element.setAttribute("businessKey",businessKey);
else
element.setAttribute("businessKey","");
String operator = business.getOperator();
if (operator != null)
element.setAttribute("operator",operator);
String authName = business.getAuthorizedName();
if (authName != null)
element.setAttribute("authorizedName",authName);
DiscoveryURLs discURLs = business.getDiscoveryURLs();
if (discURLs != null)
{
handler = maker.lookup(DiscoveryURLsHandler.TAG_NAME);
handler.marshal(discURLs,element);
}
Vector nameVector = business.getNameVector();
if ((nameVector!=null) && (nameVector.size() > 0))
{
handler = maker.lookup(NameHandler.TAG_NAME);
for (int i=0; i < nameVector.size(); i++)
handler.marshal((Name)nameVector.elementAt(i),element);
}
Vector descrVector = business.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);
}
Contacts contacts = business.getContacts();
if (contacts != null)
{
handler = maker.lookup(ContactsHandler.TAG_NAME);
handler.marshal(contacts,element);
}
BusinessServices services = business.getBusinessServices();
if (services != null)
{
handler = maker.lookup(BusinessServicesHandler.TAG_NAME);
handler.marshal(services,element);
}
IdentifierBag identifierBag = business.getIdentifierBag();
if ((identifierBag != null) && (identifierBag.getKeyedReferenceVector() != null) && (!identifierBag.getKeyedReferenceVector().isEmpty()))
{
handler = maker.lookup(IdentifierBagHandler.TAG_NAME);
handler.marshal(identifierBag,element);
}
CategoryBag categoryBag = business.getCategoryBag();
if ((categoryBag != null) && (categoryBag.getKeyedReferenceVector() != null) && (!categoryBag.getKeyedReferenceVector().isEmpty()))
{
handler = maker.lookup(CategoryBagHandler.TAG_NAME);
handler.marshal(categoryBag,element);
}