Package com.google.refine.history

Examples of com.google.refine.history.HistoryEntry


    }

    @Test
    public void canAddEntry(){
        //local dependencies
        HistoryEntry entry = mock(HistoryEntry.class);
        Project project = mock(Project.class);
        ProjectMetadata projectMetadata = mock(ProjectMetadata.class);

        when(projectManager.getProject(Mockito.anyLong())).thenReturn(project);
        when(projectManager.getProjectMetadata(Mockito.anyLong())).thenReturn(projectMetadata);
View Full Code Here


        Process process
    ) throws Exception {
        response.setCharacterEncoding("UTF-8");
        response.setHeader("Content-Type", "application/json");

        HistoryEntry historyEntry = project.processManager.queueProcess(process);
        if (historyEntry != null) {
            Writer w = response.getWriter();
            JSONWriter writer = new JSONWriter(w);
            Properties options = new Properties();

            writer.object();
            writer.key("code"); writer.value("ok");
            writer.key("historyEntry"); historyEntry.write(writer, options);
            writer.endObject();

            w.flush();
            w.close();
        } else {
View Full Code Here

            this.starred = starred;
        }

        @Override
        protected HistoryEntry createHistoryEntry(long historyEntryID) throws Exception {
            return new HistoryEntry(
                historyEntryID,
                _project,
                (starred ? "Star row " : "Unstar row ") + (rowIndex + 1),
                null,
                new RowStarChange(rowIndex, starred)
View Full Code Here

            this.flagged = flagged;
        }

        @Override
        protected HistoryEntry createHistoryEntry(long historyEntryID) throws Exception {
            return new HistoryEntry(
                historyEntryID,
                _project,
                (flagged ? "Flag row " : "Unflag row ") + (rowIndex + 1),
                null,
                new RowFlagChange(rowIndex, flagged)
View Full Code Here

                match,
                request.getParameter("identifierSpace"),
                request.getParameter("schemaSpace")
            );

            HistoryEntry historyEntry = project.processManager.queueProcess(process);
            if (historyEntry != null) {
                /*
                 * If the process is done, write back the cell's data so that the
                 * client side can update its UI right away.
                 */
                JSONWriter writer = new JSONWriter(response.getWriter());

                Pool pool = new Pool();
                Properties options = new Properties();
                options.put("pool", pool);

                writer.object();
                writer.key("code"); writer.value("ok");
                writer.key("historyEntry"); historyEntry.write(writer, options);
                writer.key("cell"); process.newCell.write(writer, options);
                writer.key("pool"); pool.write(writer, options);
                writer.endObject();
            } else {
                respond(response, "{ \"code\" : \"pending\" }");
View Full Code Here

                column.getName(),
                column.getReconConfig(),
                stats
            );

            return new HistoryEntry(
                historyEntryID, _project, description, null, change);
        }
View Full Code Here

                "Clear one cell's recon data",
                rowIndex,
                cellIndex
            );

            HistoryEntry historyEntry = project.processManager.queueProcess(process);
            if (historyEntry != null) {
                /*
                 * If the process is done, write back the cell's data so that the
                 * client side can update its UI right away.
                 */
                JSONWriter writer = new JSONWriter(response.getWriter());

                Pool pool = new Pool();
                Properties options = new Properties();
                options.put("pool", pool);

                writer.object();
                writer.key("code"); writer.value("ok");
                writer.key("historyEntry"); historyEntry.write(writer, options);
                writer.key("cell"); process.newCell.write(writer, options);
                writer.key("pool"); pool.write(writer, options);
                writer.endObject();
            } else {
                respond(response, "{ \"code\" : \"pending\" }");
View Full Code Here

                column.getName(),
                column.getReconConfig(),
                stats
            );

            return new HistoryEntry(
                historyEntryID, _project, description, null, change);
        }
View Full Code Here

    @Override
    protected HistoryEntry createHistoryEntry(Project project, long historyEntryID) throws Exception {
        Change change = new ProtographChange(_protograph);
       
        return new HistoryEntry(historyEntryID, project, getBriefDescription(project), SaveProtographOperation.this, change);
    }
View Full Code Here

                List<FreebaseType> columnTypes = new ArrayList<FreebaseType>();
                for (ColumnInfo info : _job.columns) {
                    columnTypes.add(info.expectedType);
                }
               
                HistoryEntry historyEntry = new HistoryEntry(
                    _historyEntryID,
                    _project,
                    _description,
                    ExtendDataOperation.this,
                    new DataExtensionChange(
View Full Code Here

TOP

Related Classes of com.google.refine.history.HistoryEntry

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.