Search in sources :

Example 1 with CSVImportDescriptor

use of edu.stanford.bmir.protege.web.shared.csv.CSVImportDescriptor in project webprotege by protegeproject.

the class CsvImportPresenter method startImport.

public void startImport() {
    UploadFileResultHandler uploadResultHandler = new UploadFileResultHandler() {

        @Override
        public void handleFileUploaded(final DocumentId fileDocumentId) {
            WebProtegeDialog<CSVImportDescriptor> csvImportDialog = new WebProtegeDialog<>(new CSVImportDialogController(projectId, fileDocumentId, baseClass, dispatchServiceManager, new CSVImportViewImpl(primitiveDataEditorProvider)));
            csvImportDialog.setVisible(true);
        }

        @Override
        public void handleFileUploadFailed(String errorMessage) {
            ProgressMonitor.get().hideProgressMonitor();
            MessageBox.showAlert("Error uploading CSV file", errorMessage);
        }
    };
    UploadFileDialogController controller = new UploadFileDialogController("Upload CSV", uploadResultHandler);
    WebProtegeDialog.showDialog(controller);
}
Also used : CSVImportViewImpl(edu.stanford.bmir.protege.web.client.csv.CSVImportViewImpl) UploadFileResultHandler(edu.stanford.bmir.protege.web.client.upload.UploadFileResultHandler) WebProtegeDialog(edu.stanford.bmir.protege.web.client.library.dlg.WebProtegeDialog) DocumentId(edu.stanford.bmir.protege.web.shared.csv.DocumentId) CSVImportDialogController(edu.stanford.bmir.protege.web.client.csv.CSVImportDialogController) UploadFileDialogController(edu.stanford.bmir.protege.web.client.upload.UploadFileDialogController) CSVImportDescriptor(edu.stanford.bmir.protege.web.shared.csv.CSVImportDescriptor)

Aggregations

CSVImportDialogController (edu.stanford.bmir.protege.web.client.csv.CSVImportDialogController)1 CSVImportViewImpl (edu.stanford.bmir.protege.web.client.csv.CSVImportViewImpl)1 WebProtegeDialog (edu.stanford.bmir.protege.web.client.library.dlg.WebProtegeDialog)1 UploadFileDialogController (edu.stanford.bmir.protege.web.client.upload.UploadFileDialogController)1 UploadFileResultHandler (edu.stanford.bmir.protege.web.client.upload.UploadFileResultHandler)1 CSVImportDescriptor (edu.stanford.bmir.protege.web.shared.csv.CSVImportDescriptor)1 DocumentId (edu.stanford.bmir.protege.web.shared.csv.DocumentId)1