Package uk.gov.nationalarchives.droid.command.filter

Examples of uk.gov.nationalarchives.droid.command.filter.CommandLineFilter


       
        ArgumentCaptor<CommandLineFilter> filterCaptor = ArgumentCaptor.forClass(CommandLineFilter.class);
        verify(command).setFilter(filterCaptor.capture());
        verify(command).execute();
       
        CommandLineFilter filter = filterCaptor.getValue();
        assertArrayEquals(new String[] {
            "file_size = 720",
            "puid = 'fmt/101'"
        }, filter.getFilters());
       
        assertEquals(FilterType.ALL, filter.getFilterType());
       
    }
View Full Code Here


       
        ArgumentCaptor<CommandLineFilter> filterCaptor = ArgumentCaptor.forClass(CommandLineFilter.class);
        verify(command).setFilter(filterCaptor.capture());
        verify(command).execute();
       
        CommandLineFilter filter = filterCaptor.getValue();
        assertArrayEquals(new String[] {
            "file_size = 720",
            "puid = 'fmt/101'"
        }, filter.getFilters());
       
        assertEquals(FilterType.ANY, filter.getFilterType());
       
    }
View Full Code Here

        command.setExportManager(exportManager);
        command.setProfileManager(profileManager);
        command.setDestination("destination");
        command.setExportOptions(ExportOptions.ONE_ROW_PER_FORMAT);
       
        CommandLineFilter cliFilter = new CommandLineFilter(
                new String[] {
                    "file_size = 720",
                    "puid any fmt/101 fmt/666",
                }, FilterType.ALL);
       
View Full Code Here

        final ExportCommand cmd = context.getExportCommand(ExportOptions.ONE_ROW_PER_FILE);
        cmd.setDestination(destination);
        cmd.setProfiles(profiles);

        if (cli.hasOption(CommandLineParam.ALL_FILTER.toString())) {
            cmd.setFilter(new CommandLineFilter(cli.getOptionValues(
                CommandLineParam.ALL_FILTER.toString()), FilterType.ALL));
        }

        if (cli.hasOption(CommandLineParam.ANY_FILTER.toString())) {
            cmd.setFilter(new CommandLineFilter(cli.getOptionValues(
                CommandLineParam.ANY_FILTER.toString()), FilterType.ANY));
        }

        return cmd;
    }
View Full Code Here

        final ExportCommand cmd = context.getExportCommand(ExportOptions.ONE_ROW_PER_FORMAT);
        cmd.setDestination(destination);
        cmd.setProfiles(profiles);

        if (cli.hasOption(CommandLineParam.ALL_FILTER.toString())) {
            cmd.setFilter(new CommandLineFilter(cli.getOptionValues(
                CommandLineParam.ALL_FILTER.toString()), FilterType.ALL));
        }

        if (cli.hasOption(CommandLineParam.ANY_FILTER.toString())) {
            cmd.setFilter(new CommandLineFilter(cli.getOptionValues(
                CommandLineParam.ANY_FILTER.toString()), FilterType.ANY));
        }

        return cmd;
    }
View Full Code Here

        cmd.setProfiles(profiles);
        cmd.setReportType(reportType);
        cmd.setReportOutputType(reportOutputType);

        if (cli.hasOption(CommandLineParam.ALL_FILTER.toString())) {
            cmd.setFilter(new CommandLineFilter(cli.getOptionValues(
                CommandLineParam.ALL_FILTER.toString()), FilterType.ALL));
        }

        if (cli.hasOption(CommandLineParam.ANY_FILTER.toString())) {
            cmd.setFilter(new CommandLineFilter(cli.getOptionValues(
                CommandLineParam.ANY_FILTER.toString()), FilterType.ANY));
        }

        return cmd;
    }
View Full Code Here

TOP

Related Classes of uk.gov.nationalarchives.droid.command.filter.CommandLineFilter

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.