Search in sources :

Example 1 with BackgroundServiceProvider

use of de.catma.backgroundservice.BackgroundServiceProvider in project catma by forTEXT.

the class UploadStep method fetchFileURL.

private void fetchFileURL() {
    if (urlInputField.getValue() != null && !urlInputField.getValue().trim().isEmpty()) {
        String urlValue = urlInputField.getValue();
        try {
            if (urlValue.toLowerCase().startsWith("www")) {
                // $NON-NLS-1$
                // $NON-NLS-1$
                urlValue = "http://" + urlValue;
            }
            URL url = new URL(urlValue);
            urlInputField.setValue("");
            URLConnection conn = url.openConnection();
            String urlConnContentEncoding = conn.getContentEncoding();
            final String fileId = idGenerator.generateDocumentId();
            String tempDir = ((CatmaApplication) UI.getCurrent()).accquirePersonalTempFolder();
            final File tempFile = new File(new File(tempDir), fileId);
            if (tempFile.exists()) {
                tempFile.delete();
            }
            final String originalFilename = urlValue;
            progressBar.setIndeterminate(true);
            progressBar.setVisible(true);
            BackgroundServiceProvider backgroundServiceProvider = (BackgroundServiceProvider) UI.getCurrent();
            backgroundServiceProvider.submit("fetch URL", new DefaultProgressCallable<Long>() {

                @Override
                public Long call() throws Exception {
                    ReadableByteChannel readableByteChannel = Channels.newChannel(url.openStream());
                    try (FileOutputStream fos = new FileOutputStream(tempFile)) {
                        FileChannel outChannel = fos.getChannel();
                        outChannel.transferFrom(readableByteChannel, 0, Long.MAX_VALUE);
                        return outChannel.size();
                    }
                }
            }, new ExecutionListener<Long>() {

                @Override
                public void done(Long result) {
                    try {
                        progressBar.setVisible(false);
                        progressBar.setIndeterminate(false);
                        UploadFile uploadFile = new UploadFile(fileId, tempFile.toURI(), originalFilename, urlConnContentEncoding, result);
                        String type = urlConnContentEncoding;
                        Metadata metadata = new Metadata();
                        if (url.getFile() != null && !url.getFile().isEmpty()) {
                            metadata.set(Metadata.RESOURCE_NAME_KEY, url.getFile());
                        }
                        MediaType mediaType = MediaType.parse(uploadFile.getMimetype());
                        if (mediaType != null) {
                            metadata.set(Metadata.CONTENT_TYPE, mediaType.toString());
                        }
                        try (FileInputStream fis = new FileInputStream(tempFile)) {
                            tika.parseToString(fis, metadata);
                        }
                        mediaType = MediaType.parse(metadata.get("Content-Type"));
                        uploadFile.setEncoding(mediaType.getParameters().get("charset"));
                        uploadFile.setMimetype(metadata.get("Content-Type"));
                        if (type != null && type.toLowerCase().trim().equals(FileType.ZIP.getMimeType())) {
                            handleZipFile(uploadFile);
                        } else {
                            fileList.add(uploadFile);
                            fileDataProvider.refreshAll();
                            stepChangeListener.stepChanged(UploadStep.this);
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                        String errorMsg = e.getMessage();
                        if ((errorMsg == null) || (errorMsg.trim().isEmpty())) {
                            errorMsg = "";
                        }
                        Notification.show("Error", String.format("Error loading %1$s, file will be skipped!\n%2$s", originalFilename, errorMsg), Type.WARNING_MESSAGE);
                    }
                }

                @Override
                public void error(Throwable t) {
                    t.printStackTrace();
                    progressBar.setVisible(false);
                    progressBar.setIndeterminate(false);
                    String errorMsg = t.getMessage();
                    if ((errorMsg == null) || (errorMsg.trim().isEmpty())) {
                        errorMsg = "";
                    }
                    Notification.show("Error", String.format("Error loading %1$s, file will be skipped!\n" + "This can happen for a lot of reasons, e. g. archive providers block third party access to their archives " + " or problems with a SSL connection. Try to download the file with your browser and then use the upload mechanism\n\n" + "The underlying error was:" + "\n%2$s", originalFilename, errorMsg), Type.WARNING_MESSAGE);
                }
            });
        } catch (Exception e) {
            e.printStackTrace();
            String errorMsg = e.getMessage();
            if ((errorMsg == null) || (errorMsg.trim().isEmpty())) {
                errorMsg = "";
            }
            Notification.show("Error", String.format("Error loading %1$s, file will be skipped!\n" + "This can happen for a lot of reasons, e. g. archive providers block third party access to ther archives " + " or problems with SSL. Try to download the file with your browser and then use the upload mechanism\n" + "The underlying error was:" + "\n%2$s", urlValue, errorMsg), Type.WARNING_MESSAGE);
        }
    }
}
Also used : ReadableByteChannel(java.nio.channels.ReadableByteChannel) FileChannel(java.nio.channels.FileChannel) BackgroundServiceProvider(de.catma.backgroundservice.BackgroundServiceProvider) Metadata(org.apache.tika.metadata.Metadata) URL(java.net.URL) URLConnection(java.net.URLConnection) IOException(java.io.IOException) FileInputStream(java.io.FileInputStream) CatmaApplication(de.catma.ui.CatmaApplication) FileOutputStream(java.io.FileOutputStream) MediaType(org.apache.tika.mime.MediaType) ZipFile(org.apache.commons.compress.archivers.zip.ZipFile) Html5File(com.vaadin.ui.Html5File) File(java.io.File)

Example 2 with BackgroundServiceProvider

use of de.catma.backgroundservice.BackgroundServiceProvider in project catma by forTEXT.

the class ImportIntrinsicMarkupStep method enter.

@Override
public void enter(boolean back) {
    if (back) {
        return;
    }
    contentPanel.setEnabled(false);
    progressBar.setVisible(true);
    progressBar.setIndeterminate(true);
    @SuppressWarnings("unchecked") final ArrayList<UploadFile> files = new ArrayList<UploadFile>(((Collection<UploadFile>) wizardContext.get(DocumentWizard.WizardContextKey.UPLOAD_FILE_LIST)).stream().filter(uploadFile -> uploadFile.getMimetype().equals(FileType.XML2.getMimeType())).collect(Collectors.toList()));
    final TagManager tagmanager = new TagManager(new TagLibrary());
    BackgroundServiceProvider backgroundServiceProvider = (BackgroundServiceProvider) UI.getCurrent();
    backgroundServiceProvider.submit("inspecting-intrinsic-markup", new DefaultProgressCallable<List<UploadFile>>() {

        @Override
        public List<UploadFile> call() throws Exception {
            IDGenerator idGenerator = new IDGenerator();
            for (UploadFile uploadFile : files) {
                XML2ContentHandler contentHandler = new XML2ContentHandler();
                SourceDocument doc = new SourceDocument(uploadFile.getUuid(), contentHandler);
                SourceDocumentInfo documentInfo = new SourceDocumentInfo();
                TechInfoSet techInfoSet = new TechInfoSet();
                techInfoSet.setURI(uploadFile.getTempFilename());
                documentInfo.setTechInfoSet(techInfoSet);
                contentHandler.setSourceDocumentInfo(documentInfo);
                XmlMarkupCollectionSerializationHandler handler = new XmlMarkupCollectionSerializationHandler(tagmanager, contentHandler, project.getUser().getIdentifier());
                try (FileInputStream fis = new FileInputStream(new File(uploadFile.getTempFilename()))) {
                    AnnotationCollection collection = handler.deserialize(doc, idGenerator.generateCollectionId(), fis);
                    uploadFile.setIntrinsicMarkupCollection(collection);
                }
            }
            return files;
        }
    }, new ExecutionListener<List<UploadFile>>() {

        @Override
        public void done(List<UploadFile> result) {
            contentPanel.setEnabled(true);
            progressBar.setVisible(false);
            progressBar.setIndeterminate(false);
            fileList.clear();
            fileList.addAll(result);
            fileDataProvider.refreshAll();
            tagsetImportList.clear();
            String defaultIntrinsicXMLElmentsName = "Default Intrinsic XML Elements";
            for (TagsetDefinition tagset : tagmanager.getTagLibrary()) {
                if (!tagset.isEmpty()) {
                    TagsetDefinition targetTagset = project.getTagManager().getTagLibrary().getTagsetDefinition(tagset.getUuid());
                    boolean inProject = false;
                    if (targetTagset == null) {
                        targetTagset = tagset;
                    } else {
                        inProject = true;
                    }
                    String namespace = tagset.getName() == null ? "none" : tagset.getName();
                    if (tagset.getName() == null) {
                        tagset.setName(defaultIntrinsicXMLElmentsName);
                    }
                    TagsetImport tagsetImport = new TagsetImport(namespace, tagset, targetTagset, inProject ? TagsetImportState.WILL_BE_MERGED : TagsetImportState.WILL_BE_CREATED);
                    tagsetImportList.add(tagsetImport);
                }
            }
            tagsetDataProvider.refreshAll();
            wizardContext.put(DocumentWizard.WizardContextKey.TAGSET_IMPORT_LIST, tagsetImportList);
            if (stepChangeListener != null) {
                stepChangeListener.stepChanged(ImportIntrinsicMarkupStep.this);
            }
        }

        @Override
        public void error(Throwable t) {
            Logger.getLogger(ImportIntrinsicMarkupStep.class.getName()).log(Level.SEVERE, "Error inspecting files", t);
            String errorMsg = t.getMessage();
            if ((errorMsg == null) || (errorMsg.trim().isEmpty())) {
                errorMsg = "";
            }
            Notification.show("Error", String.format("Error inspecting the contents! " + "\n The underlying error message was:\n%1$s", errorMsg), Type.ERROR_MESSAGE);
        }
    });
}
Also used : SourceDocumentInfo(de.catma.document.source.SourceDocumentInfo) ArrayList(java.util.ArrayList) BackgroundServiceProvider(de.catma.backgroundservice.BackgroundServiceProvider) ArrayList(java.util.ArrayList) List(java.util.List) TechInfoSet(de.catma.document.source.TechInfoSet) TagLibrary(de.catma.tag.TagLibrary) AnnotationCollection(de.catma.document.annotation.AnnotationCollection) SourceDocument(de.catma.document.source.SourceDocument) XML2ContentHandler(de.catma.document.source.contenthandler.XML2ContentHandler) FileInputStream(java.io.FileInputStream) TagsetDefinition(de.catma.tag.TagsetDefinition) TagManager(de.catma.tag.TagManager) XmlMarkupCollectionSerializationHandler(de.catma.serialization.intrinsic.xml.XmlMarkupCollectionSerializationHandler) IDGenerator(de.catma.util.IDGenerator) File(java.io.File)

Example 3 with BackgroundServiceProvider

use of de.catma.backgroundservice.BackgroundServiceProvider in project catma by forTEXT.

the class TaggerView method loadReplies.

@Override
public void loadReplies(Optional<Comment> optionalComment) {
    if (optionalComment.isPresent()) {
        final Comment comment = optionalComment.get();
        final UI ui = UI.getCurrent();
        ((BackgroundServiceProvider) ui).submit("load-comment-replies", new DefaultProgressCallable<Void>() {

            @Override
            public Void call() throws Exception {
                ui.accessSynchronously(() -> {
                    try {
                        List<Reply> replies = project.getCommentReplies(comment);
                        tagger.setReplies(replies, comment);
                        ui.push();
                    } catch (IOException e) {
                        logger.log(Level.WARNING, "error loading replies", e);
                    }
                });
                return null;
            }
        }, new ExecutionListener<Void>() {

            @Override
            public void done(Void result) {
                ui.push();
            }

            @Override
            public void error(Throwable t) {
                errorHandler.showAndLogError("Error loading Replies!", t);
            }
        });
    }
}
Also used : ClientComment(de.catma.ui.client.ui.tagger.shared.ClientComment) Comment(de.catma.document.comment.Comment) UI(com.vaadin.ui.UI) BackgroundServiceProvider(de.catma.backgroundservice.BackgroundServiceProvider) ArrayList(java.util.ArrayList) List(java.util.List) IOException(java.io.IOException) ValueOutOfBoundsException(com.vaadin.ui.Slider.ValueOutOfBoundsException) IOException(java.io.IOException) URISyntaxException(java.net.URISyntaxException)

Example 4 with BackgroundServiceProvider

use of de.catma.backgroundservice.BackgroundServiceProvider in project catma by forTEXT.

the class KwicPanel method initActions.

private void initActions(EventBus eventBus) {
    ContextMenu moreOptionsMenu = kwicGridComponent.getActionGridBar().getBtnMoreOptionsContextMenu();
    moreOptionsMenu.addItem("Annotate selected rows", mi -> handleAnnotateSelectedRequest(eventBus));
    ActionGridBar actionBar = kwicGridComponent.getActionGridBar();
    actionBar.addButtonAfterSearchField(btnClearSelectedRows);
    btnClearSelectedRows.addClickListener(new ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            handleRemoveRowRequest();
        }
    });
    miRemoveAnnotations = moreOptionsMenu.addItem("Remove selected Annotations", mi -> handleRemoveAnnotationsRequest(eventBus));
    miRemoveAnnotations.setEnabled(false);
    MenuItem miExport = moreOptionsMenu.addItem("Export");
    MenuItem miCSVFlatExport = miExport.addItem("Export as CSV");
    StreamResource csvFlatExportResource = new StreamResource(new CSVExportFlatStreamSource(() -> getFilteredQueryResult(), project, kwicItemHandler.getKwicProviderCache(), ((BackgroundServiceProvider) UI.getCurrent())), "CATMA-KWIC_Export-" + LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME) + ".csv");
    csvFlatExportResource.setCacheTime(0);
    csvFlatExportResource.setMIMEType("text/comma-separated-values");
    FileDownloader csvFlatExportFileDownloader = new FileDownloader(csvFlatExportResource);
    csvFlatExportFileDownloader.extend(miCSVFlatExport);
    kwicGridComponent.setSearchFilterProvider(new SearchFilterProvider<QueryResultRow>() {

        @Override
        public SerializablePredicate<QueryResultRow> createSearchFilter(String searchInput) {
            return (row) -> kwicItemHandler.containsSearchInput(row, searchInput);
        }
    });
    btExpandCompress.addClickListener(clickEvent -> handleMaxMinRequest());
    defaultDoubleClickRegistration = kwicGrid.addItemClickListener(clickEvent -> handleKwicItemClick(clickEvent, eventBus));
}
Also used : BackgroundServiceProvider(de.catma.backgroundservice.BackgroundServiceProvider) DisplaySetting(de.catma.ui.module.analyze.queryresultpanel.DisplaySetting) MenuItem(com.vaadin.ui.MenuBar.MenuItem) LoadingCache(com.google.common.cache.LoadingCache) ZonedDateTime(java.time.ZonedDateTime) UI(com.vaadin.ui.UI) QueryResultRowArray(de.catma.queryengine.result.QueryResultRowArray) SearchFilterProvider(de.catma.ui.component.actiongrid.SearchFilterProvider) KwicProvider(de.catma.indexer.KwicProvider) ErrorHandler(de.catma.ui.module.main.ErrorHandler) Map(java.util.Map) TagQueryResultRow(de.catma.queryengine.result.TagQueryResultRow) VaadinIcons(com.vaadin.icons.VaadinIcons) Version(de.catma.tag.Version) AnnotationWizard(de.catma.ui.module.analyze.visualization.kwic.annotation.AnnotationWizard) IconButton(de.catma.ui.component.IconButton) ExpansionListener(de.catma.ui.module.analyze.visualization.ExpansionListener) Set(java.util.Set) TagInstance(de.catma.tag.TagInstance) Collectors(java.util.stream.Collectors) MarginInfo(com.vaadin.shared.ui.MarginInfo) ItemClick(com.vaadin.ui.Grid.ItemClick) ItemClickListener(com.vaadin.ui.components.grid.ItemClickListener) TagReference(de.catma.document.annotation.TagReference) CacheLoader(com.google.common.cache.CacheLoader) List(java.util.List) Type(com.vaadin.ui.Notification.Type) TagDefinition(de.catma.tag.TagDefinition) CacheBuilder(com.google.common.cache.CacheBuilder) SelectionMode(com.vaadin.ui.Grid.SelectionMode) RBACPermission(de.catma.rbac.RBACPermission) StreamResource(com.vaadin.server.StreamResource) Range(de.catma.document.Range) ClickListener(com.vaadin.ui.Button.ClickListener) Column(com.vaadin.ui.Grid.Column) VerticalLayout(com.vaadin.ui.VerticalLayout) AnnotationCollectionManager(de.catma.document.annotation.AnnotationCollectionManager) LocalDateTime(java.time.LocalDateTime) Query(com.vaadin.data.provider.Query) WizardContext(de.catma.ui.dialog.wizard.WizardContext) ActionGridComponent(de.catma.ui.component.actiongrid.ActionGridComponent) ActionGridBar(de.catma.ui.component.actiongrid.ActionGridBar) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) EventBus(com.google.common.eventbus.EventBus) Registration(com.vaadin.shared.Registration) Notification(com.vaadin.ui.Notification) Label(com.vaadin.ui.Label) IDGenerator(de.catma.util.IDGenerator) SaveCancelListener(de.catma.ui.dialog.SaveCancelListener) CSVExportGroupedStreamSource(de.catma.ui.module.analyze.CSVExportGroupedStreamSource) ListDataProvider(com.vaadin.data.provider.ListDataProvider) ContentMode(com.vaadin.shared.ui.ContentMode) Property(de.catma.tag.Property) ClickEvent(com.vaadin.ui.Button.ClickEvent) AnnotationCollectionReference(de.catma.document.annotation.AnnotationCollectionReference) Project(de.catma.project.Project) QueryResultRow(de.catma.queryengine.result.QueryResultRow) SourceDocument(de.catma.document.source.SourceDocument) Visualization(de.catma.ui.module.analyze.visualization.Visualization) ContextMenu(com.vaadin.contextmenu.ContextMenu) QueryResultRowInAnnotateEvent(de.catma.ui.events.QueryResultRowInAnnotateEvent) DateTimeFormatter(java.time.format.DateTimeFormatter) FileDownloader(com.vaadin.server.FileDownloader) SerializablePredicate(com.vaadin.server.SerializablePredicate) HtmlRenderer(com.vaadin.ui.renderers.HtmlRenderer) CSVExportFlatStreamSource(de.catma.ui.module.analyze.CSVExportFlatStreamSource) AnnotationWizardContextKey(de.catma.ui.module.analyze.visualization.kwic.annotation.AnnotationWizardContextKey) Grid(com.vaadin.ui.Grid) TagQueryResultRow(de.catma.queryengine.result.TagQueryResultRow) QueryResultRow(de.catma.queryengine.result.QueryResultRow) ClickEvent(com.vaadin.ui.Button.ClickEvent) ActionGridBar(de.catma.ui.component.actiongrid.ActionGridBar) ContextMenu(com.vaadin.contextmenu.ContextMenu) MenuItem(com.vaadin.ui.MenuBar.MenuItem) SerializablePredicate(com.vaadin.server.SerializablePredicate) CSVExportFlatStreamSource(de.catma.ui.module.analyze.CSVExportFlatStreamSource) StreamResource(com.vaadin.server.StreamResource) FileDownloader(com.vaadin.server.FileDownloader) ItemClickListener(com.vaadin.ui.components.grid.ItemClickListener) ClickListener(com.vaadin.ui.Button.ClickListener)

Example 5 with BackgroundServiceProvider

use of de.catma.backgroundservice.BackgroundServiceProvider in project catma by forTEXT.

the class QueryResultPanel method initActions.

private void initActions(CloseListener resultPanelCloseListener) {
    if (cardStyle) {
        caretRightBt.addClickListener(new ClickListener() {

            public void buttonClick(ClickEvent event) {
                addComponent(treeGridPanel);
                ((HorizontalLayout) caretRightBt.getParent()).replaceComponent(caretRightBt, caretDownBt);
                searchField.setEnabled(true);
            }
        });
        caretDownBt.addClickListener(new ClickListener() {

            public void buttonClick(ClickEvent event) {
                removeComponent(treeGridPanel);
                ((HorizontalLayout) caretDownBt.getParent()).replaceComponent(caretDownBt, caretRightBt);
                searchField.setEnabled(false);
            }
        });
    }
    optionsBt.addClickListener((evt) -> optionsMenu.open(evt.getClientX(), evt.getClientY()));
    miGroupByPhrase = optionsMenu.addItem("Group by Phrase", mi -> initPhraseBasedData());
    miGroupByPhrase.setEnabled(false);
    miGroupByTagPath = optionsMenu.addItem("Group by Tag Path", mi -> initTagBasedData());
    miFlatTable = optionsMenu.addItem("Display Annotations as flat table", mi -> initFlatTagBasedData());
    miPropertiesAsColumns = optionsMenu.addItem("Display Properties as columns", mi -> initPropertiesAsColumnsTagBasedData());
    MenuItem miExport = optionsMenu.addItem("Export");
    MenuItem miCSVFlatExport = miExport.addItem("Export flat as CSV");
    StreamResource csvFlatExportResource = new StreamResource(new CSVExportFlatStreamSource(() -> getFilteredQueryResult(), project, kwicProviderCache, ((BackgroundServiceProvider) UI.getCurrent())), "CATMA-Query-Result_Export-" + LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME) + ".csv");
    csvFlatExportResource.setCacheTime(0);
    csvFlatExportResource.setMIMEType("text/comma-separated-values");
    FileDownloader csvFlatExportFileDownloader = new FileDownloader(csvFlatExportResource);
    csvFlatExportFileDownloader.extend(miCSVFlatExport);
    MenuItem miCSVGroupedByPhraseExport = miExport.addItem("Export grouped as CSV");
    StreamResource csvGroupedByPhraseExportResource = new StreamResource(new CSVExportGroupedStreamSource(() -> getFilteredQueryResult(), project, () -> getDisplaySetting().equals(DisplaySetting.GROUPED_BY_TAG), kwicProviderCache, ((BackgroundServiceProvider) UI.getCurrent())), "CATMA-Query-Result_Export-" + LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME) + ".csv");
    csvGroupedByPhraseExportResource.setCacheTime(0);
    csvGroupedByPhraseExportResource.setMIMEType("text/comma-separated-values");
    FileDownloader csvGroupedByPhraseExportFileDownloader = new FileDownloader(csvGroupedByPhraseExportResource);
    csvGroupedByPhraseExportFileDownloader.extend(miCSVGroupedByPhraseExport);
    MenuItem miFilterPunctuation = optionsMenu.addItem("Filter punctuation", mi -> queryResultGrid.getDataProvider().refreshAll());
    miFilterPunctuation.setCheckable(true);
    miFilterPunctuation.setChecked(true);
    punctuationFilter = new PunctuationFilter(() -> miFilterPunctuation.isChecked());
    if (resultPanelCloseListener != null) {
        removeBt.addClickListener(clickEvent -> resultPanelCloseListener.closeRequest(QueryResultPanel.this));
    } else {
        removeBt.setVisible(false);
    }
    searchField.addValueChangeListener(event -> handleSearchValueInput(event.getValue()));
}
Also used : BackgroundServiceProvider(de.catma.backgroundservice.BackgroundServiceProvider) GroupedQueryResult(de.catma.queryengine.result.GroupedQueryResult) GridSortOrderBuilder(com.vaadin.data.provider.GridSortOrderBuilder) MenuItem(com.vaadin.ui.MenuBar.MenuItem) LoadingCache(com.google.common.cache.LoadingCache) SelectionListener(com.vaadin.event.selection.SelectionListener) TextField(com.vaadin.ui.TextField) Alignment(com.vaadin.ui.Alignment) UI(com.vaadin.ui.UI) FooterRow(com.vaadin.ui.components.grid.FooterRow) QueryResultRowArray(de.catma.queryengine.result.QueryResultRowArray) KwicProvider(de.catma.indexer.KwicProvider) ErrorHandler(de.catma.ui.module.main.ErrorHandler) Map(java.util.Map) TreeDataProvider(com.vaadin.data.provider.TreeDataProvider) TagQueryResultRow(de.catma.queryengine.result.TagQueryResultRow) VaadinIcons(com.vaadin.icons.VaadinIcons) QueryId(de.catma.queryengine.QueryId) IconButton(de.catma.ui.component.IconButton) Set(java.util.Set) TreeGrid(com.vaadin.ui.TreeGrid) AnnotatedTextProvider(de.catma.ui.module.annotate.annotationpanel.AnnotatedTextProvider) Collectors(java.util.stream.Collectors) BinaryOperator(java.util.function.BinaryOperator) List(java.util.List) Type(com.vaadin.ui.Notification.Type) TagDefinition(de.catma.tag.TagDefinition) ExpandEvent(com.vaadin.event.ExpandEvent) StreamResource(com.vaadin.server.StreamResource) ClickListener(com.vaadin.ui.Button.ClickListener) Column(com.vaadin.ui.Grid.Column) VerticalLayout(com.vaadin.ui.VerticalLayout) LocalDateTime(java.time.LocalDateTime) HashMap(java.util.HashMap) TreeSet(java.util.TreeSet) ArrayList(java.util.ArrayList) Registration(com.vaadin.shared.Registration) Notification(com.vaadin.ui.Notification) TreeGridFactory(de.catma.ui.component.TreeGridFactory) ButtonRenderer(com.vaadin.ui.renderers.ButtonRenderer) WeakReference(java.lang.ref.WeakReference) CSVExportGroupedStreamSource(de.catma.ui.module.analyze.CSVExportGroupedStreamSource) InMemoryDataProvider(com.vaadin.data.provider.InMemoryDataProvider) ContentMode(com.vaadin.shared.ui.ContentMode) QueryResult(de.catma.queryengine.result.QueryResult) Iterator(java.util.Iterator) TreeData(com.vaadin.data.TreeData) ClickEvent(com.vaadin.ui.Button.ClickEvent) Project(de.catma.project.Project) Command(com.vaadin.ui.MenuBar.Command) QueryResultRow(de.catma.queryengine.result.QueryResultRow) ContextMenu(com.vaadin.contextmenu.ContextMenu) FooterCell(com.vaadin.ui.components.grid.FooterCell) Button(com.vaadin.ui.Button) HorizontalLayout(com.vaadin.ui.HorizontalLayout) DateTimeFormatter(java.time.format.DateTimeFormatter) FileDownloader(com.vaadin.server.FileDownloader) SerializablePredicate(com.vaadin.server.SerializablePredicate) HierarchicalQuery(com.vaadin.data.provider.HierarchicalQuery) HtmlRenderer(com.vaadin.ui.renderers.HtmlRenderer) CSVExportFlatStreamSource(de.catma.ui.module.analyze.CSVExportFlatStreamSource) Component(com.vaadin.ui.Component) StreamResource(com.vaadin.server.StreamResource) ClickEvent(com.vaadin.ui.Button.ClickEvent) MenuItem(com.vaadin.ui.MenuBar.MenuItem) FileDownloader(com.vaadin.server.FileDownloader) CSVExportFlatStreamSource(de.catma.ui.module.analyze.CSVExportFlatStreamSource) CSVExportGroupedStreamSource(de.catma.ui.module.analyze.CSVExportGroupedStreamSource) ClickListener(com.vaadin.ui.Button.ClickListener)

Aggregations

BackgroundServiceProvider (de.catma.backgroundservice.BackgroundServiceProvider)12 UI (com.vaadin.ui.UI)8 ArrayList (java.util.ArrayList)8 List (java.util.List)8 ErrorHandler (de.catma.ui.module.main.ErrorHandler)6 IOException (java.io.IOException)6 Notification (com.vaadin.ui.Notification)5 Type (com.vaadin.ui.Notification.Type)5 File (java.io.File)5 ListDataProvider (com.vaadin.data.provider.ListDataProvider)4 VaadinIcons (com.vaadin.icons.VaadinIcons)4 Label (com.vaadin.ui.Label)4 VerticalLayout (com.vaadin.ui.VerticalLayout)4 IconButton (de.catma.ui.component.IconButton)4 WizardContext (de.catma.ui.dialog.wizard.WizardContext)4 LocalDateTime (java.time.LocalDateTime)4 DateTimeFormatter (java.time.format.DateTimeFormatter)4 LoadingCache (com.google.common.cache.LoadingCache)3 EventBus (com.google.common.eventbus.EventBus)3 ContextMenu (com.vaadin.contextmenu.ContextMenu)3