public static void delete(AtrilSession oSes, String sDocId)
throws DmsException, ElementNotFoundException, ClassNotFoundException, InstantiationException,
IllegalAccessException, ClassCastException, IllegalStateException {
Dms oDms = oSes.getDms();
Document d = oDms.getDocument(sDocId);
Log.out.debug("BaseModelObject.delete(AtrilSession, "+sDocId+")");
if (null==d) throw new ElementNotFoundException("Document "+sDocId+" not found");
Class t = Class.forName("com.zesped.model."+d.type().name());
BaseModelObject o = (BaseModelObject) t.newInstance();
o.setDocument(d);
o.delete(oSes, oDms);
}