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

org.aksw.sparqlify.sparqlview.SparqlViewConjunction Maven / Gradle / Ivy

There is a newer version: 3.17.0-1
Show newest version
package org.aksw.sparqlify.sparqlview;

import java.util.ArrayList;
import java.util.List;

import org.aksw.jena_sparql_api.restriction.RestrictionManagerImpl;
import org.aksw.jena_sparql_api.views.TwoWayBinding;

public class SparqlViewConjunction {
    private List viewBindings;		// Maybe set of views???
    private RestrictionManagerImpl restrictions;

    private TwoWayBinding completeBinding; // Not sure if that is needed - maybe the restrictions already contain all information

    public List getViewNames() {
        List result = new ArrayList(viewBindings.size());

        for(SparqlViewInstance instance : viewBindings) {
            result.add(instance.getParent().getName());
        }

        return result;
    }

    @Deprecated
    public SparqlViewConjunction(List viewBindings,
            RestrictionManagerImpl restrictions, TwoWayBinding completeBinding) {
        super();
        this.viewBindings = viewBindings;
        this.restrictions = restrictions;
        this.completeBinding = completeBinding;

//		throw new RuntimeException("Deprecated");
    }

    public SparqlViewConjunction(List viewBindings,
            RestrictionManagerImpl restrictions) //, TwoWayBinding completeBinding)
    {
        super();
        this.viewBindings = viewBindings;
        this.restrictions = restrictions;
        //this.completeBinding = completeBinding;
    }

    public List getViewBindings()
    {
        return viewBindings;
    }

    public RestrictionManagerImpl getRestrictions() {
        return restrictions;
    }

    @Deprecated
    public TwoWayBinding getCompleteBinding()
    {
        //throw new RuntimeException("Deprecated");
        return completeBinding;
    }

    @Override
    public String toString()
    {
        return "" + viewBindings;
    }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy