Examples of GraphWriter


Examples of com.lunatech.doclets.jax.jpa.writers.GraphWriter

    for (final JPAClass klass : jpaClasses) {
      klass.write(conf);
    }
    new PackageListWriter(conf, registry).write();
    new SummaryWriter(conf, registry).write();
    new GraphWriter(conf, registry).write();
    new GraphDataWriter(conf, registry).write();
    Utils.copyResources(conf);
    Utils.copyJPAResources(conf);
  }
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.GraphWriter

        // todo: already registered a SimpleModule here......what do vendors do who already define one?

        final SimpleModule module = new SimpleModule();
        module.addSerializer(CustomId.class, new CustomId.CustomIdJacksonSerializer());
        module.addDeserializer(CustomId.class, new CustomId.CustomIdJacksonDeserializer());
        final GraphWriter writer = GraphSONWriter.build()
                .embedTypes(true)
                .customModule(module).create();

        try (final ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
            writer.writeGraph(baos, g);

            final JsonNode jsonGraph = new ObjectMapper().readTree(baos.toByteArray());
            final JsonNode onlyVertex = jsonGraph.findValues(GraphSONTokens.VERTICES).get(0).get(0);
            final JsonNode idValue = onlyVertex.get(GraphSONTokens.ID);
            assertTrue(idValue.has("cluster"));
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.GraphWriter

        @Test
        @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
        @BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
        public void writeGraphSON() throws Exception {
            final GraphWriter writer = GraphSONWriter.build().create();
            final OutputStream os = new ByteArrayOutputStream();
            writer.writeGraph(os, g);
        }
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.GraphWriter

        @Test
        @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
        @BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
        public void writeKryo() throws Exception {
            final GraphWriter writer = KryoWriter.build().create();
            final OutputStream os = new ByteArrayOutputStream();
            writer.writeGraph(os, g);
        }
View Full Code Here

Examples of com.tinkerpop.gremlin.structure.io.GraphWriter

        @Test
        @LoadGraphWith(LoadGraphWith.GraphData.GRATEFUL)
        @BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 0, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
        public void writeGraphML() throws Exception {
            final GraphWriter writer = GraphMLWriter.build().create();
            final OutputStream os = new ByteArrayOutputStream();
            writer.writeGraph(os, g);
        }
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.