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

org.aksw.jenax.sparql.relation.query.PartitionedQueryN Maven / Gradle / Ivy

There is a newer version: 5.0.0-1
Show newest version
package org.aksw.jenax.sparql.relation.query;

import java.util.List;

import org.apache.jena.query.Query;
import org.apache.jena.sparql.core.Var;

public class PartitionedQueryN
    implements PartitionedQuery
{
    protected Query query;
    protected List partitionVars;

    public PartitionedQueryN(Query query, List partitionVars) {
        super();
        this.query = query;
        this.partitionVars = partitionVars;
    }

    public Query getQuery() {
        return query;
    }

    public List getPartitionVars() {
        return partitionVars;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result
                + ((partitionVars == null) ? 0 : partitionVars.hashCode());
        result = prime * result + ((query == null) ? 0 : query.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        PartitionedQueryN other = (PartitionedQueryN) obj;
        if (partitionVars == null) {
            if (other.partitionVars != null)
                return false;
        } else if (!partitionVars.equals(other.partitionVars))
            return false;
        if (query == null) {
            if (other.query != null)
                return false;
        } else if (!query.equals(other.query))
            return false;
        return true;
    }

    @Override
    public String toString() {
        return "PartitionedQueryN [query=" + query + ", partitionVars="
                + partitionVars + "]";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy