use of edu.stanford.bmir.protege.web.shared.csv.GetCSVGridResult in project webprotege by protegeproject.
the class GetCSVGridActionHandler method execute.
@Nonnull
@Override
public GetCSVGridResult execute(@Nonnull GetCSVGridAction action, @Nonnull ExecutionContext executionContext) {
DocumentId documentId = action.getCSVDocumentId();
File file = new File(uploadsDirectory, documentId.getDocumentId());
if (!file.exists()) {
throw new RuntimeException("CSV file does not exist");
}
CSVGrid grid = getCSVGrid(file, action.getRowLimit());
return new GetCSVGridResult(grid);
}
Aggregations