@Test public void shouldTrimStringsIfConfiguredTo() throws Exception { String name = " This is a line with leading and trailing whitespaces "; File data = data( "id:ID,name", "1,\"" + name + "\"", "2," + name ); importTool( "--into", graphDbDir().getAbsolutePath(), "--nodes:" + node_label, data.getAbsolutePath(), "--trim-strings", "true" ); }
public static DataFactory data( final Decorator decorator, final Charset charset, final File... files ) { if ( files.length == 0 ) { throw new IllegalArgumentException( "No files specified" ); } return config -> new Data() { @Override public RawIterator<CharReadable,IOException> stream() { return Readables.individualFiles( charset, files ); } @Override public Decorator decorator() { return decorator; } }; }
BulkLoad { public static DataFactory data( final Decorator decorator, final Charset charset, final File... files ) { if ( files.length == 0 ) { throw new IllegalArgumentException( "No files specified" ); } return config -> new Data() { @Override public RawIterator<CharReadable,IOException> stream() { return Readables.individualFiles( charset, files ); } @Override public Decorator decorator() { return decorator; } }; } }
BulkLoad { public static DataFactory data( final Decorator decorator, final Charset charset, final File... files ) { if ( files.length == 0 ) { throw new IllegalArgumentException( "No files specified" ); } return config -> new Data() { @Override public RawIterator<CharReadable,IOException> stream() { return Readables.individualFiles( charset, files ); } @Override public Decorator decorator() { return decorator; } }; }  }
BulkLoad { public static DataFactory data( final Decorator decorator, final Charset charset, final File... files ) { if ( files.length == 0 ) { throw new IllegalArgumentException( "No files specified" ); } return config -> new Data() { @Override public RawIterator<CharReadable,IOException> stream() { return Readables.individualFiles( charset, files ); } @Override public Decorator decorator() { return decorator; } }; }  static Function<String,T> withDefault( final T defaultValue ); static void main(String[] args0); static void doImport(StandardJanusGraph graph,PrintStream out, PrintStream err, InputStream in, File storeDir, File logsDir, File badFile,
                                FileSystem fs, Collection<Args.Option<File[]>> nodesFiles,
                                Collection<Args.Option<File[]>> edgesFiles, boolean enableStacktrace, Input input,
                                OutputStream badOutput,
                                Configuration configuration ); static Collection<Args.Option<File[]>> extractInputFiles(Args args, String key, PrintStream err ); static Collection<Args.Option<String>> extractJanusConfig(Args args, String key, PrintStream err ); static Iterable<DataFactory> nodeData(final Charset encoding,
                                                 Collection<Args.Option<File[]>> nodesFiles ); static Iterable<DataFactory> edgeData(final Charset encoding,
                                                 Collection<Args.Option<File[]>> edgesFiles ); static DataFactory data( final Decorator decorator,
                                    final Charset charset, final File... files ); static janusgraph.util.batchimport.unsafe.input.csv.Configuration csvConfiguration(
            Args args, final boolean defaultSettingsSuitableForTests ); static long parseLongWithUnit( String numberWithPotentialUnit ); static Args useArgumentsFromFileArgumentIfPresent( Args args ); static String[] parseFileArgumentList( File file ); static void validateInputFiles( Collection<Args.Option<File[]>> nodesFiles,
                                           Collection<Args.Option<File[]>> edgesFiles ); static Configuration importConfiguration(boolean bulkLoading,
            Number processors, Long maxMemory, File storeDir,
            boolean allowCacheOnHeap, Boolean defaultHighIO ); }
BulkLoad { public static DataFactory data( final Decorator decorator, final Charset charset, final File... files ) { if ( files.length == 0 ) { throw new IllegalArgumentException( "No files specified" ); } return config -> new Data() { @Override public RawIterator<CharReadable,IOException> stream() { return Readables.individualFiles( charset, files ); } @Override public Decorator decorator() { return decorator; } }; }  static Function<String,T> withDefault( final T defaultValue ); static void main(String[] args0); static void doImport(StandardJanusGraph graph,PrintStream out, PrintStream err, InputStream in, File storeDir, File logsDir, File badFile,
                                FileSystem fs, Collection<Args.Option<File[]>> nodesFiles,
                                Collection<Args.Option<File[]>> edgesFiles, boolean enableStacktrace, Input input,
                                OutputStream badOutput,
                                Configuration configuration ); static Collection<Args.Option<File[]>> extractInputFiles(Args args, String key, PrintStream err ); static Collection<Args.Option<String>> extractJanusConfig(Args args, String key, PrintStream err ); static Iterable<DataFactory> nodeData(final Charset encoding,
                                                 Collection<Args.Option<File[]>> nodesFiles ); static Iterable<DataFactory> edgeData(final Charset encoding,
                                                 Collection<Args.Option<File[]>> edgesFiles ); static DataFactory data( final Decorator decorator,
                                    final Charset charset, final File... files ); static janusgraph.util.batchimport.unsafe.input.csv.Configuration csvConfiguration(
            Args args, final boolean defaultSettingsSuitableForTests ); static long parseLongWithUnit( String numberWithPotentialUnit ); static Args useArgumentsFromFileArgumentIfPresent( Args args ); static String[] parseFileArgumentList( File file ); static void validateInputFiles( Collection<Args.Option<File[]>> nodesFiles,
                                           Collection<Args.Option<File[]>> edgesFiles ); static Configuration importConfiguration(boolean bulkLoading,
            Number processors, Long maxMemory, File storeDir,
            boolean allowCacheOnHeap, Boolean defaultHighIO );  }