Examples of processLine()


Examples of org.neo4j.batchimport.importer.RowData.processLine()

    }

    @Test
    public void testRelationshipWithNoProperty() throws Exception {
        RowData data = new RowData("start\tend\ttype", "\t", 3);
        data.processLine("1\t2\tTYPE");
        assertEquals("1", data.getValue(0));
        assertEquals("2", data.getValue(1));
        assertEquals("TYPE", data.getTypeLabels()[0]);
    }
View Full Code Here

Examples of org.neo4j.batchimport.importer.RowData.processLine()

    }

    @Test
    public void testNodeLabels() throws Exception {
        RowData data = new RowData("labels", "\t", 3);
        data.processLine("TYPE1,TYPE2");
        assertEquals("TYPE1", data.getTypeLabels()[0]);
        assertEquals("TYPE2", data.getTypeLabels()[1]);
    }
    @Test
    public void testNodeLabelsWithLabelType() throws Exception {
View Full Code Here

Examples of org.neo4j.batchimport.importer.RowData.processLine()

        assertEquals("TYPE2", data.getTypeLabels()[1]);
    }
    @Test
    public void testNodeLabelsWithLabelType() throws Exception {
        RowData data = new RowData("foo:label", "\t", 3);
        data.processLine("TYPE1,TYPE2");
        assertEquals("TYPE1", data.getTypeLabels()[0]);
        assertEquals("TYPE2", data.getTypeLabels()[1]);
    }
    @Test
    public void testArrayType() throws Exception {
View Full Code Here

Examples of org.neo4j.batchimport.importer.RowData.processLine()

        assertEquals("TYPE2", data.getTypeLabels()[1]);
    }
    @Test
    public void testArrayType() throws Exception {
        RowData data = new RowData("a:int\tb:float\tc:string_array", "\t", 0);
        data.processLine("100\t100.0\tbagels,coffee,tea");
        Map<String,Object> row = data.getProperties();
        assertEquals(100, row.get("a"));
        assertEquals(true,row.get("b") instanceof Float);
        assertEquals(100.0F, row.get("b"));
        assertEquals(true,row.get("b") instanceof Float);
View Full Code Here

Examples of org.neo4j.batchimport.importer.RowData.processLine()

    }

    @Test
    public void testBooleanArrayType() throws Exception {
        RowData data = new RowData("a:int\tb:float\tc:boolean_array", "\t", 0);
        data.processLine("100\t100.0\ttrue,false,true");
        Map<String,Object> row = data.getProperties();
        assertEquals(100, row.get("a"));
        assertEquals(true,row.get("b") instanceof Float);
        assertEquals(100.0F, row.get("b"));
        assertEquals(true,row.get("b") instanceof Float);
View Full Code Here

Examples of org.neo4j.batchimport.importer.RowData.processLine()

        Assert.assertTrue(Arrays.equals(new boolean[]{true, false, true}, (boolean[]) row.get("c")));
    }
    @Test
    public void testIntArrayType() throws Exception {
        RowData data = new RowData("a:int\tb:float\tc:int_array", "\t", 0);
        data.processLine("100\t100.0\t1,2,3");
        Map<String,Object> row = data.getProperties();
        assertEquals(100, row.get("a"));
        assertEquals(true,row.get("b") instanceof Float);
        assertEquals(100.0F, row.get("b"));
        assertEquals(true,row.get("b") instanceof Float);
View Full Code Here

Examples of org.neo4j.batchimport.importer.RowData.processLine()

        int res = 0;
        long time = System.currentTimeMillis();
        String line;
        while ((line = reader.readLine()) != null) {
            rowData.processLine(line);
            res += rowData.getColumnCount();
        }
        time = System.currentTimeMillis() - time;
        System.out.println("time = " + time + " ms.");
        Assert.assertEquals((ROWS-1) * COLS, res);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.