public static CmisTypeDefinitionListType convert(TypeDefinitionList typeList) {
if (typeList == null) {
return null;
}
CmisTypeDefinitionListType result = new CmisTypeDefinitionListType();
if (typeList.getList() != null) {
for (TypeDefinition tdd : typeList.getList()) {
result.getTypes().add(convert(tdd));
}
}
result.setHasMoreItems(convertBoolean(typeList.hasMoreItems(), false));
result.setNumItems(typeList.getNumItems());
// handle extensions
convertExtension(typeList, result);
return result;