Search in sources :

Example 21 with CloseableIterable

use of uk.gov.gchq.gaffer.commonutil.iterable.CloseableIterable in project Gaffer by gchq.

the class GetExportsHandler method doOperation.

@Override
public Map<String, CloseableIterable<?>> doOperation(final GetExports getExports, final Context context, final Store store) throws OperationException {
    final Map<String, CloseableIterable<?>> exports = new LinkedHashMap<>();
    for (final GetExport getExport : getExports.getGetExports()) {
        final CloseableIterable<?> export = store._execute(new OperationChain<>(getExport), context);
        exports.put(getExport.getClass().getName() + ": " + getExport.getKey(), export);
    }
    return exports;
}
Also used : CloseableIterable(uk.gov.gchq.gaffer.commonutil.iterable.CloseableIterable) GetExport(uk.gov.gchq.gaffer.operation.impl.export.GetExport) LinkedHashMap(java.util.LinkedHashMap)

Aggregations

CloseableIterable (uk.gov.gchq.gaffer.commonutil.iterable.CloseableIterable)21 Test (org.junit.Test)16 OperationChain (uk.gov.gchq.gaffer.operation.OperationChain)11 EntitySeed (uk.gov.gchq.gaffer.operation.data.EntitySeed)11 User (uk.gov.gchq.gaffer.user.User)11 Graph (uk.gov.gchq.gaffer.graph.Graph)10 ViewElementDefinition (uk.gov.gchq.gaffer.data.elementdefinition.view.ViewElementDefinition)6 AddElements (uk.gov.gchq.gaffer.operation.impl.add.AddElements)6 Element (uk.gov.gchq.gaffer.data.element.Element)5 View (uk.gov.gchq.gaffer.data.elementdefinition.view.View)5 IsLessThan (uk.gov.gchq.gaffer.function.filter.IsLessThan)5 GetEdges (uk.gov.gchq.gaffer.operation.impl.get.GetEdges)4 SimpleEntityDataObject (uk.gov.gchq.gaffer.arrayliststore.data.SimpleEntityDataObject)3 SimpleEntityGenerator (uk.gov.gchq.gaffer.arrayliststore.data.generator.SimpleEntityGenerator)3 JSONSerialiser (uk.gov.gchq.gaffer.jsonserialisation.JSONSerialiser)3 Builder (uk.gov.gchq.gaffer.operation.OperationChain.Builder)3 GetElements (uk.gov.gchq.gaffer.operation.impl.get.GetElements)3 SimpleEdgeDataObject (uk.gov.gchq.gaffer.arrayliststore.data.SimpleEdgeDataObject)2 SimpleEdgeGenerator (uk.gov.gchq.gaffer.arrayliststore.data.generator.SimpleEdgeGenerator)2 JobDetail (uk.gov.gchq.gaffer.jobtracker.JobDetail)2