use of edu.stanford.bmir.protege.web.client.upload.UploadFileDialogController in project webprotege by protegeproject.
the class UploadAndMergeProjectWorkflow method uploadProject.
private void uploadProject(final ProjectId projectId) {
UploadFileDialogController uploadFileDialogController = new UploadFileDialogController("Upload ontologies", new UploadFileResultHandler() {
@Override
public void handleFileUploaded(DocumentId fileDocumentId) {
startMergeWorkflow(projectId, fileDocumentId);
}
@Override
public void handleFileUploadFailed(String errorMessage) {
GWT.log("Upload failed");
}
});
WebProtegeDialog.showDialog(uploadFileDialogController);
}
use of edu.stanford.bmir.protege.web.client.upload.UploadFileDialogController 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);
}
Aggregations