private ResourceDetailModel toResourceDetailModel(ResourceDetail[] resourceDetailAnnotations, KnowledgeNamespace knowledgeNamespace) {
if (resourceDetailAnnotations == null || resourceDetailAnnotations.length == 0) {
return null;
}
ResourceDetailModel resourceDetailModel = null;
for (ResourceDetail resourceDetailAnnotation : resourceDetailAnnotations) {
resourceDetailModel = new V1ResourceDetailModel(knowledgeNamespace.uri());
String inputType = resourceDetailAnnotation.inputType();
if (!UNDEFINED.equals(inputType)) {
resourceDetailModel.setInputType(inputType);
}
String worksheetName = resourceDetailAnnotation.worksheetName();
if (!UNDEFINED.equals(worksheetName)) {
resourceDetailModel.setWorksheetName(worksheetName);
}
/* SWITCHYARD-1662
boolean usingExternalTypes = resourceDetailAnnotation.usingExternalTypes();
resourceDetailModel.setUsingExternalTypes(usingExternalTypes);
*/