Class ServiceUtils
java.lang.Object
org.aksw.jena_sparql_api.core.utils.ServiceUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.aksw.commons.util.range.CountInfofetchCountConcept(QueryExecutionFactory sparqlService, Concept concept, Long itemLimit, Long rowLimit) static com.google.common.collect.Range<Long>fetchCountQuery(QueryExecutionFactoryQuery sparqlService, org.apache.jena.query.Query query, Long itemLimit, Long rowLimit) static IntegerfetchInteger(QueryExecutionFactoryQuery qef, org.apache.jena.query.Query query, org.apache.jena.sparql.core.Var v) static IntegerfetchInteger(org.apache.jena.query.QueryExecution qe, org.apache.jena.sparql.core.Var v) Fetches the first column of the first row of a result set and parses it as int.static List<org.apache.jena.graph.Node>fetchList(org.apache.jena.query.QueryExecution qe, org.apache.jena.sparql.core.Var v) static List<org.apache.jena.graph.Node>static List<org.apache.jena.graph.Node>fetchList(org.apache.jena.rdfconnection.SparqlQueryConnection qef, Fragment1 concept, Long limit, Long offset) static List<org.apache.jena.graph.Node>fetchList(org.apache.jena.rdfconnection.SparqlQueryConnection qef, OrderedConcept orderedConcept, Long limit, Long offset) static List<org.apache.jena.graph.Node>fetchList(org.apache.jena.rdfconnection.SparqlQueryConnection qef, org.apache.jena.query.Query query, org.apache.jena.sparql.core.Var v) static List<org.apache.jena.rdf.model.Resource>fetchListResources(org.apache.jena.rdfconnection.SparqlQueryConnection qef, Concept concept) static NumberfetchNumber(org.apache.jena.query.QueryExecution qe, org.apache.jena.sparql.core.Var v) Attempt to get a Number from the first row of a result set for a given variable.static org.apache.jena.query.ResultSetforceExecResultSet(org.apache.jena.query.QueryExecution qe, org.apache.jena.query.Query query) CONSTRUCT queries are mapped to result sets with the variables ?s ?p ?o
-
Constructor Details
-
ServiceUtils
public ServiceUtils()
-
-
Method Details
-
fetchListResources
-
fetchList
public static List<org.apache.jena.graph.Node> fetchList(org.apache.jena.rdfconnection.SparqlQueryConnection qef, OrderedConcept orderedConcept, Long limit, Long offset) -
fetchList
-
fetchList
-
fetchList
public static List<org.apache.jena.graph.Node> fetchList(org.apache.jena.rdfconnection.SparqlQueryConnection qef, org.apache.jena.query.Query query, org.apache.jena.sparql.core.Var v) -
fetchList
public static List<org.apache.jena.graph.Node> fetchList(org.apache.jena.query.QueryExecution qe, org.apache.jena.sparql.core.Var v) -
fetchInteger
public static Integer fetchInteger(QueryExecutionFactoryQuery qef, org.apache.jena.query.Query query, org.apache.jena.sparql.core.Var v) -
fetchInteger
public static Integer fetchInteger(org.apache.jena.query.QueryExecution qe, org.apache.jena.sparql.core.Var v) Fetches the first column of the first row of a result set and parses it as int. -
fetchNumber
public static Number fetchNumber(org.apache.jena.query.QueryExecution qe, org.apache.jena.sparql.core.Var v) Attempt to get a Number from the first row of a result set for a given variable. Returns null if there is no row or the value is unbound. Raises an exception if the obtained RDFNode cannot be converted to a number or if there is more than 1 result row.- Parameters:
qe-v-- Returns:
-
fetchCountConcept
public static org.aksw.commons.util.range.CountInfo fetchCountConcept(QueryExecutionFactory sparqlService, Concept concept, Long itemLimit, Long rowLimit) -
fetchCountQuery
public static com.google.common.collect.Range<Long> fetchCountQuery(QueryExecutionFactoryQuery sparqlService, org.apache.jena.query.Query query, Long itemLimit, Long rowLimit) -
forceExecResultSet
public static org.apache.jena.query.ResultSet forceExecResultSet(org.apache.jena.query.QueryExecution qe, org.apache.jena.query.Query query) CONSTRUCT queries are mapped to result sets with the variables ?s ?p ?o
-