Search in sources :

Example 1 with Entry

use of org.neo4j.internal.batchimport.input.csv.Header.Entry in project neo4j by neo4j.

the class DataGeneratorInput method bareboneNodeHeader.

public static Header bareboneNodeHeader(String idKey, IdType idType, Extractors extractors, Entry... additionalEntries) {
    List<Entry> entries = new ArrayList<>();
    entries.add(new Entry(idKey, Type.ID, null, idExtractor(idType, extractors)));
    entries.add(new Entry(null, Type.LABEL, null, extractors.stringArray()));
    entries.addAll(asList(additionalEntries));
    return new Header(entries.toArray(new Entry[0]));
}
Also used : Entry(org.neo4j.internal.batchimport.input.csv.Header.Entry) Header(org.neo4j.internal.batchimport.input.csv.Header) ArrayList(java.util.ArrayList)

Example 2 with Entry

use of org.neo4j.internal.batchimport.input.csv.Header.Entry in project neo4j by neo4j.

the class DataGeneratorInput method bareboneRelationshipHeader.

public static Header bareboneRelationshipHeader(IdType idType, Extractors extractors, Entry... additionalEntries) {
    List<Entry> entries = new ArrayList<>();
    entries.add(new Entry(null, Type.START_ID, null, idExtractor(idType, extractors)));
    entries.add(new Entry(null, Type.END_ID, null, idExtractor(idType, extractors)));
    entries.add(new Entry(null, Type.TYPE, null, extractors.string()));
    entries.addAll(asList(additionalEntries));
    return new Header(entries.toArray(new Entry[0]));
}
Also used : Entry(org.neo4j.internal.batchimport.input.csv.Header.Entry) Header(org.neo4j.internal.batchimport.input.csv.Header) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)2 Header (org.neo4j.internal.batchimport.input.csv.Header)2 Entry (org.neo4j.internal.batchimport.input.csv.Header.Entry)2