Search in sources :

Example 11 with GenerateObjects

use of uk.gov.gchq.gaffer.operation.impl.generate.GenerateObjects in project Gaffer by gchq.

the class ExamplesService method generateObjects.

@Override
public GenerateObjects generateObjects() {
    final GenerateObjects<Element, ExampleDomainObject> op = new GenerateObjects<>(new ExampleDomainObjectGenerator());
    List<Element> elements = new ArrayList<>();
    if (hasEntities()) {
        elements.add(getEntity(1));
        elements.add(getEntity(2));
    }
    if (hasEdges()) {
        elements.add(getEdge(1, 2));
    }
    op.setInput(elements);
    populateOperation(op);
    return op;
}
Also used : GenerateObjects(uk.gov.gchq.gaffer.operation.impl.generate.GenerateObjects) Element(uk.gov.gchq.gaffer.data.element.Element) ArrayList(java.util.ArrayList) ExampleDomainObjectGenerator(uk.gov.gchq.gaffer.rest.example.ExampleDomainObjectGenerator) ExampleDomainObject(uk.gov.gchq.gaffer.rest.example.ExampleDomainObject)

Aggregations

GenerateObjects (uk.gov.gchq.gaffer.operation.impl.generate.GenerateObjects)11 Test (org.junit.Test)10 OperationChain (uk.gov.gchq.gaffer.operation.OperationChain)10 User (uk.gov.gchq.gaffer.user.User)10 GetAdjacentEntitySeeds (uk.gov.gchq.gaffer.operation.impl.get.GetAdjacentEntitySeeds)5 UnauthorisedException (uk.gov.gchq.gaffer.commonutil.exception.UnauthorisedException)4 ArrayList (java.util.ArrayList)1 Element (uk.gov.gchq.gaffer.data.element.Element)1 GetAllEdges (uk.gov.gchq.gaffer.operation.impl.get.GetAllEdges)1 ExampleDomainObject (uk.gov.gchq.gaffer.rest.example.ExampleDomainObject)1 ExampleDomainObjectGenerator (uk.gov.gchq.gaffer.rest.example.ExampleDomainObjectGenerator)1