@Test public void shouldImportMultipleInputsWithAddedLabelsAndDefaultRelationshipType() throws Exception { List<String> nodeIds = nodeIds(); Configuration config = Configuration.COMMAS; final String[] firstLabels = {"AddedOne", "AddedTwo"}; final String[] secondLabels = {"AddedThree"}; final String firstType = "TYPE_1"; final String secondType = "TYPE_2"; importTool( "--into", graphDbDir().getAbsolutePath(), "--nodes:" + node_label + join( firstLabels, ":" ), nodeData( true, config, nodeIds, lines( 0, NODE_COUNT / 2 ) ).getAbsolutePath(), "--nodes:" + node_label + join( secondLabels, ":" ), nodeData( true, config, nodeIds, lines( NODE_COUNT / 2, NODE_COUNT ) ).getAbsolutePath(), "--edges:" + relationship_label + firstType, relationshipData( true, config, nodeIds, lines( 0, RELATIONSHIP_COUNT / 2 )).getAbsolutePath(), "--edges:" + relationship_label + secondType, relationshipData( true, config, nodeIds, lines( RELATIONSHIP_COUNT / 2, RELATIONSHIP_COUNT )).getAbsolutePath() ); MutableInt numberOfNodesWithFirstSetOfLabels = new MutableInt(); MutableInt numberOfNodesWithSecondSetOfLabels = new MutableInt(); MutableInt numberOfRelationshipsWithFirstType = new MutableInt(); MutableInt numberOfRelationshipsWithSecondType = new MutableInt(); }
public static Iterable<DataFactory> nodeData(final Charset encoding, Collection<Args.Option<File[]>> nodesFiles ) { return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles ) { @Override protected DataFactory underlyingObjectToObject( Args.Option<File[]> input ) { Decorator decorator = input.metadata() != null ? InputEntityDecorators.additiveLabels( input.metadata().split( ":" ) ) : InputEntityDecorators.NO_DECORATOR; return data( decorator, encoding, input.value() ); } }; }
BulkLoad { public static Iterable<DataFactory> nodeData(final Charset encoding, Collection<Args.Option<File[]>> nodesFiles ) { return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles ) { @Override protected DataFactory underlyingObjectToObject( Args.Option<File[]> input ) { Decorator decorator = input.metadata() != null ? InputEntityDecorators.additiveLabels( input.metadata().split( ":" ) ) : InputEntityDecorators.NO_DECORATOR; return data( decorator, encoding, input.value() ); } }; } }
BulkLoad { public static Iterable<DataFactory> nodeData(final Charset encoding, Collection<Args.Option<File[]>> nodesFiles ) { return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles ) { @Override protected DataFactory underlyingObjectToObject( Args.Option<File[]> input ) { Decorator decorator = input.metadata() != null ? InputEntityDecorators.additiveLabels( input.metadata().split( ":" ) ) : InputEntityDecorators.NO_DECORATOR; return data( decorator, encoding, input.value() ); } }; }  }
BulkLoad { public static Iterable<DataFactory> nodeData(final Charset encoding, Collection<Args.Option<File[]>> nodesFiles ) { return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles ) { @Override protected DataFactory underlyingObjectToObject( Args.Option<File[]> input ) { Decorator decorator = input.metadata() != null ? InputEntityDecorators.additiveLabels( input.metadata().split( ":" ) ) : InputEntityDecorators.NO_DECORATOR; return data( decorator, encoding, input.value() ); } }; }  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 Iterable<DataFactory> nodeData(final Charset encoding, Collection<Args.Option<File[]>> nodesFiles ) { return new IterableWrapper<DataFactory,Args.Option<File[]>>( nodesFiles ) { @Override protected DataFactory underlyingObjectToObject( Args.Option<File[]> input ) { Decorator decorator = input.metadata() != null ? InputEntityDecorators.additiveLabels( input.metadata().split( ":" ) ) : InputEntityDecorators.NO_DECORATOR; return data( decorator, encoding, input.value() ); } }; }  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 );  }