All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fr.inria.edelweiss.kgdqp.core.CallableGetEdges Maven / Gradle / Ivy

There is a newer version: 3.3.3
Show newest version
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.inria.edelweiss.kgdqp.core;

import fr.inria.edelweiss.kgram.api.core.Edge;
import fr.inria.edelweiss.kgram.api.core.Entity;
import fr.inria.edelweiss.kgram.api.core.Node;
import fr.inria.edelweiss.kgram.api.query.Environment;
import fr.inria.edelweiss.kgram.api.query.Producer;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import org.apache.log4j.Logger;

/**
 * Helper class to handle the retrieveing of results when getEdges() are
 * parallelized.
 *
 * @author Alban Gaignard, [email protected]
 */
public class CallableGetEdges implements Callable> {

    private final Logger logger = Logger.getLogger(CallableGetEdges.class);
    private Producer p = null;
    private Node gNode = null;
    private List from = null;
    private Edge qEdge = null;
    private Environment env = null;

    public CallableGetEdges(Producer p, Node gNode, List from, Edge qEdge, Environment env) {
        this.p = p;
        this.gNode = gNode;
        this.from = from;
        this.qEdge = qEdge;
        this.env = env;
    }

    @Override
    public Iterable call() {
        Iterable res  = p.getEdges(gNode, from, qEdge, env);
        return res;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy