return obj;
}
public void marshal(RegistryObject object,Element parent)
{
TModelDetail detail = (TModelDetail)object;
Element element = parent.getOwnerDocument().createElementNS(null,TAG_NAME);
AbstractHandler handler = null;
String generic = detail.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 = detail.getOperator();
if (operator != null)
element.setAttribute("operator",operator);
else
element.setAttribute("operator","");
boolean truncated = detail.isTruncated();
if (truncated)
element.setAttribute("truncated","true");
Vector vector = detail.getTModelVector();
if ((vector!=null) && (vector.size() > 0))
{
handler = maker.lookup(TModelHandler.TAG_NAME);
for (int i=0; i < vector.size(); i++)
handler.marshal((TModel)vector.elementAt(i),element);