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

org.aksw.facete.v3.api.FacetValueQueryBuilder Maven / Gradle / Ivy

There is a newer version: 5.2.0-1
Show newest version
package org.aksw.facete.v3.api;

import org.aksw.jena_sparql_api.data_query.api.DataQuery;
import org.apache.jena.rdf.model.RDFNode;

/**
 * Idea for API improvement to give more control over how to construct the query for facet values
 * 
 * Status quo: facetDirNode.facetValueCounts().exec()
 * Goal of this class: facetDirNode.facetValues().withCounts().includeAbsent().query().exec();
 * 
 * @author Claus Stadler, Dec 29, 2018
 *
 * @param 
 */
public interface FacetValueQueryBuilder {
	// TODO Add a capabilities() method so client code can query for supported features
	
	FacetDirNode parent();
	FacetValueQueryBuilder withCounts(boolean onOrOff);

	default FacetValueQueryBuilder withCounts() {
		return withCounts(true);
	}

	default FacetValueQueryBuilder withoutCounts() {
		return withCounts(false);
	}

	
	FacetValueQueryBuilder includeAbsent(boolean onOrOff);

	default FacetValueQueryBuilder withAbsent() {
		return includeAbsent(true);
	}

	default FacetValueQueryBuilder withoutAbsent() {
		return includeAbsent(false);
	}

	
	
	 FacetValueQueryBuilder itemsAs(Class itemClazz);
	
	
//	default FacetValueQueryBuilder includeAbsent() {
//		return includeAbsent(true);
//	}

	DataQuery query();
	//DataQuery2 query2();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy