Package com.tinkerpop.gremlin.structure.util.batch

Examples of com.tinkerpop.gremlin.structure.util.batch.BatchGraph


    @Test
    @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
    @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
    @FeatureRequirement(featureClass = Graph.Features.EdgePropertyFeatures.class, feature = Graph.Features.EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
    public void shouldLoadEdgesIncrementallyNoIdSpecified() {
        final BatchGraph graph = BatchGraph.build(g)
                .incrementalLoading(true)
                .vertexIdKey("name")
                .bufferSize(1).create();
        final Vertex v2 = graph.addVertex(T.id, "marko", "age", 29);
        final Vertex v1 = graph.addVertex(T.id, "stephen", "age", 37);
        v1.addEdge("knows", v2, "weight", 1.0d);
        v1.addEdge("knows", v2, "weight", 0.5d);
        tryCommit(graph);

        final Vertex vStephen = g.V().<Vertex>has("name", "stephen").next();
View Full Code Here


    @Test
    @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
    @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
    @FeatureRequirement(featureClass = Graph.Features.EdgePropertyFeatures.class, feature = Graph.Features.EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
    public void shouldLoadEdgesIncrementallyWithNamedIdentifierAndNoIdSpecified() {
        final BatchGraph graph = BatchGraph.build(g)
                .incrementalLoading(true)
                .vertexIdKey("name")
                .edgeIdKey("uid")
                .bufferSize(1).create();
        final Vertex v2 = graph.addVertex(T.id, "marko", "age", 29);
        final Vertex v1 = graph.addVertex(T.id, "stephen", "age", 37);
        v1.addEdge("knows", v2, "weight", 1.0d);
        v1.addEdge("knows", v2, "weight", 0.5d);
        tryCommit(graph);

        final Vertex vStephen = g.V().<Vertex>has("name", "stephen").next();
View Full Code Here

TOP

Related Classes of com.tinkerpop.gremlin.structure.util.batch.BatchGraph

Copyright © 2018 www.massapicom. 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.