return obj;
}
public void marshal(RegistryObject object,Element parent)
{
Contact contact = (Contact)object;
String generic = getGeneric(null);
String namespace = getUDDINamespace(generic);
Element element = parent.getOwnerDocument().createElementNS(namespace,TAG_NAME);
AbstractHandler handler = null;
String useType = contact.getUseType();
if ((useType != null) && (useType.trim().length() > 0))
element.setAttribute("useType",useType);
Vector descrVector = contact.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);
}
PersonName personName = contact.getPersonName();
if ((personName != null))
{
handler = maker.lookup(PersonNameHandler.TAG_NAME);
handler.marshal(personName,element);
}
Vector phoneVector = contact.getPhoneVector();
if ((phoneVector!=null) && (phoneVector.size() > 0))
{
handler = maker.lookup(PhoneHandler.TAG_NAME);
for (int i=0; i < phoneVector.size(); i++)
handler.marshal((Phone)phoneVector.elementAt(i),element);
}
Vector emailVector = contact.getEmailVector();
if ((emailVector!=null) && (emailVector.size() > 0))
{
handler = maker.lookup(EmailHandler.TAG_NAME);
for (int i=0; i < emailVector.size(); i++)
handler.marshal((Email)emailVector.elementAt(i),element);
}
Vector addressVector = contact.getAddressVector();
if ((addressVector!=null) && (addressVector.size() > 0))
{
handler = maker.lookup(AddressHandler.TAG_NAME);
for (int i=0; i < addressVector.size(); i++)
handler.marshal((Address)addressVector.elementAt(i),element);