}
// ---------------------------------------------------------------------------
private void createTypeHierarchy(Dms oDms, DocumentType oParentType, String[] aTypesHierarchy) {
DocumentType oChildType;
for (int t=0; t<aTypesHierarchy.length; t++) {
try {
oChildType = oDms.getDocumentType(aTypesHierarchy[t]);
} catch (ElementNotFoundException enf) {
oChildType = oDms.newDocumentType(aTypesHierarchy[t], oParentType);
try {
Class oCls = Class.forName("com.zesped.model."+aTypesHierarchy[t]);
BaseModelObject oObj = (BaseModelObject) oCls.newInstance();
oChildType.setItem(oObj.isItem());
if (oObj.isItem()) oChildType.expectedSize(102400);
} catch (ClassNotFoundException e) {
oChildType.setItem(false);
} catch (InstantiationException e) {
oChildType.setItem(false);
} catch (IllegalAccessException e) {
oChildType.setItem(false);
}
oChildType.save();
}
oParentType = oChildType;
}
}