public OMElement convert(T document)  { return convertIntermediateDoc(document);
public T convert(OMElement element) { XMLStreamReader reader = element.getXMLStreamReader(); try { XmlObject xmlObject = T.Factory.parse(reader); T t; try { t=(T)xmlObject; } catch (ClassCastException e) { throw new BaseException(ERROR_WRONG_TYPE +xmlObject);  }  return t;  } catch (XmlException e) { throw new BaseException(e); }
    public OMElement convert(T document)  {        return convertIntermediateDoc(document);        //return convertDirect(document);    }