Search in sources :

Example 11 with GetEdges

use of uk.gov.gchq.gaffer.operation.impl.get.GetEdges in project Gaffer by gchq.

the class ExamplesService method getEdges.

@Override
public GetEdges getEdges() {
    final GetEdges op = new GetEdges();
    final List<ElementSeed> seeds = new ArrayList<>();
    if (hasEntities()) {
        seeds.add(getEntitySeed(1));
    } else if (hasEdges()) {
        seeds.add(new EntitySeed(getEdgeSeed(1, 2).getSource()));
    }
    if (hasEdges()) {
        seeds.add(getEdgeSeed(1, 2));
    }
    op.setSeeds(seeds);
    populateOperation(op);
    return op;
}
Also used : GetEdges(uk.gov.gchq.gaffer.operation.impl.get.GetEdges) ArrayList(java.util.ArrayList) EntitySeed(uk.gov.gchq.gaffer.operation.data.EntitySeed) ElementSeed(uk.gov.gchq.gaffer.operation.data.ElementSeed)

Aggregations

GetEdges (uk.gov.gchq.gaffer.operation.impl.get.GetEdges)11 Edge (uk.gov.gchq.gaffer.data.element.Edge)7 EntitySeed (uk.gov.gchq.gaffer.operation.data.EntitySeed)7 ArrayList (java.util.ArrayList)5 AddElements (uk.gov.gchq.gaffer.operation.impl.add.AddElements)4 User (uk.gov.gchq.gaffer.user.User)4 Test (org.junit.Test)3 Element (uk.gov.gchq.gaffer.data.element.Element)3 View (uk.gov.gchq.gaffer.data.elementdefinition.view.View)3 Graph (uk.gov.gchq.gaffer.graph.Graph)3 CloseableIterable (uk.gov.gchq.gaffer.commonutil.iterable.CloseableIterable)2 WrappedCloseableIterable (uk.gov.gchq.gaffer.commonutil.iterable.WrappedCloseableIterable)2 ElementFilter (uk.gov.gchq.gaffer.data.element.function.ElementFilter)2 ViewElementDefinition (uk.gov.gchq.gaffer.data.elementdefinition.view.ViewElementDefinition)2 EdgeSeed (uk.gov.gchq.gaffer.operation.data.EdgeSeed)2 ElementSeed (uk.gov.gchq.gaffer.operation.data.ElementSeed)2 ElementTransformer (uk.gov.gchq.gaffer.data.element.function.ElementTransformer)1 MeanTransform (uk.gov.gchq.gaffer.example.gettingstarted.function.transform.MeanTransform)1 DataGenerator2 (uk.gov.gchq.gaffer.example.gettingstarted.generator.DataGenerator2)1 DataGenerator3 (uk.gov.gchq.gaffer.example.gettingstarted.generator.DataGenerator3)1