Search in sources :

Example 31 with EdgeSeed

use of uk.gov.gchq.gaffer.operation.data.EdgeSeed in project Gaffer by gchq.

the class AbstractStoreIT method createDefaultEdges.

public static Map<EdgeSeed, Edge> createDefaultEdges() {
    final Map<EdgeSeed, Edge> edges = new HashMap<>();
    for (int i = 0; i <= 10; i++) {
        for (int j = 0; j < VERTEX_PREFIXES.length; j++) {
            final Edge edge = new Edge(TestGroups.EDGE, VERTEX_PREFIXES[0] + i, VERTEX_PREFIXES[j] + i, false);
            edge.putProperty(TestPropertyNames.INT, 1);
            edge.putProperty(TestPropertyNames.COUNT, 1L);
            addToMap(edge, edges);
        }
        final Edge firstEdge = new Edge(TestGroups.EDGE, SOURCE + i, DEST + i, false);
        firstEdge.putProperty(TestPropertyNames.INT, 1);
        firstEdge.putProperty(TestPropertyNames.COUNT, 1L);
        addToMap(firstEdge, edges);
        final Edge secondEdge = new Edge(TestGroups.EDGE, SOURCE_DIR + i, DEST_DIR + i, true);
        secondEdge.putProperty(TestPropertyNames.INT, 1);
        secondEdge.putProperty(TestPropertyNames.COUNT, 1L);
        addToMap(secondEdge, edges);
    }
    return edges;
}
Also used : HashMap(java.util.HashMap) EdgeSeed(uk.gov.gchq.gaffer.operation.data.EdgeSeed) Edge(uk.gov.gchq.gaffer.data.element.Edge)

Aggregations

EdgeSeed (uk.gov.gchq.gaffer.operation.data.EdgeSeed)31 Edge (uk.gov.gchq.gaffer.data.element.Edge)16 Test (org.junit.Test)14 Element (uk.gov.gchq.gaffer.data.element.Element)12 User (uk.gov.gchq.gaffer.user.User)11 ElementSeed (uk.gov.gchq.gaffer.operation.data.ElementSeed)9 View (uk.gov.gchq.gaffer.data.elementdefinition.view.View)8 EntitySeed (uk.gov.gchq.gaffer.operation.data.EntitySeed)8 AddElements (uk.gov.gchq.gaffer.operation.impl.add.AddElements)8 Graph (uk.gov.gchq.gaffer.graph.Graph)7 ViewElementDefinition (uk.gov.gchq.gaffer.data.elementdefinition.view.ViewElementDefinition)6 OperationChain (uk.gov.gchq.gaffer.operation.OperationChain)6 ElementFilter (uk.gov.gchq.gaffer.data.element.function.ElementFilter)5 TraitRequirement (uk.gov.gchq.gaffer.integration.TraitRequirement)5 GetElements (uk.gov.gchq.gaffer.operation.impl.get.GetElements)5 HashSet (java.util.HashSet)4 Entity (uk.gov.gchq.gaffer.data.element.Entity)4 IsLessThan (uk.gov.gchq.gaffer.function.filter.IsLessThan)4 ArrayList (java.util.ArrayList)3 Iterator (java.util.Iterator)3