Package org.zanata.webtrans.client.ui

Examples of org.zanata.webtrans.client.ui.DocumentNode


        nodes.clear();
        idsByPath.clear();

        for (DocumentInfo doc : sortedDocumentList) {
            idsByPath.put(doc.getPath() + doc.getName(), doc.getId());
            nodes.put(doc.getId(), new DocumentNode(doc));
        }
        runFilter();
    }
View Full Code Here


     *            the id of the document
     * @return document info corresponding to the id, or null if the document is
     *         not in the document list
     */
    public DocumentInfo getDocumentInfo(DocumentId docId) {
        DocumentNode node = nodes.get(docId);
        return (node == null ? null : node.getDocInfo());
    }
View Full Code Here

        if (currentDocument != null && currentDocument.getId() == documentId) {
            Log.info("same selection doc id:" + documentId);
            return;
        }
        currentDocument = null;
        DocumentNode node = nodes.get(documentId);
        if (node != null) {
            userWorkspaceContext.setSelectedDoc(node.getDocInfo());
            // required in order to show the document selected in doclist when
            // loading from bookmarked history token
            userWorkspaceContext.setSelectedDoc(node.getDocInfo());


        }
    }
View Full Code Here

                                        + result.getResultMap().size());

                                for (Entry<DocumentId, Boolean> entry : result
                                        .getResultMap().entrySet()) {
                                    Integer row = pageRows.get(entry.getKey());
                                    DocumentNode node =
                                            nodes.get(entry.getKey());

                                    DocValidationStatus status =
                                            entry.getValue() ? DocValidationStatus.HasError
                                                    : DocValidationStatus.NoError;

                                    if (row != null) {
                                        display.updateRowHasError(
                                                row.intValue(), status);

                                        if (node != null) {
                                            node.getDocInfo().setHasError(
                                                    entry.getValue());
                                        }
                                    }
                                }
                                eventBus.fireEvent(new DocValidationResultEvent(
View Full Code Here

            new DocumentInfo(new DocumentId(1111L, "no/filter/matches"),
                "matches", "no/filter", LocaleId.EN_US, stats,
                new AuditInfo(new Date(), "Translator"),
                new HashMap<String, String>(), new AuditInfo(
                new Date(), "last translator"));
        docList.add(new DocumentNode(docInfo));

        docInfo =
            new DocumentInfo(new DocumentId(2222L, "match/exact/filter"),
                "filter", "match/exact/", LocaleId.EN_US, stats,
                new AuditInfo(new Date(), "Translator"),
                new HashMap<String, String>(), new AuditInfo(
                new Date(), "last translator"));
        docList.add(new DocumentNode(docInfo));

        docInfo =
            new DocumentInfo(new DocumentId(3333L,
                "does/not/match/exact/filter"), "filter",
                "does/not/match/exact/", LocaleId.EN_US, stats,
                new AuditInfo(new Date(), "Translator"),
                new HashMap<String, String>(), new AuditInfo(
                new Date(), "last translator"));
        docList.add(new DocumentNode(docInfo));

        return docList;
    }
View Full Code Here

                new HashMap<DocumentId, ContainerTranslationStatistics>();
        HashMap<DocumentId, AuditInfo> lastTranslatedMap =
                new HashMap<DocumentId, AuditInfo>();

        for (DocumentInfo docInfo : documentInfoList) {
            DocumentNode node = new DocumentNode(docInfo);
            nodes.put(docInfo.getId(), node);
            sortedNodes.add(node);
            statMap.put(docInfo.getId(), new ContainerTranslationStatistics());
        }
        documentListPresenter.setStatesForTest(sortedNodes, nodes);
View Full Code Here

TOP

Related Classes of org.zanata.webtrans.client.ui.DocumentNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.