Class ServiceUtils

java.lang.Object
org.aksw.jena_sparql_api.core.utils.ServiceUtils

public class ServiceUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.aksw.commons.util.range.CountInfo
    fetchCountConcept(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 Integer
    fetchInteger(QueryExecutionFactoryQuery qef, org.apache.jena.query.Query query, org.apache.jena.sparql.core.Var v)
     
    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.
    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>
    fetchList(org.apache.jena.rdfconnection.SparqlQueryConnection qef, Fragment1 concept)
     
    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 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.
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ServiceUtils

      public ServiceUtils()
  • Method Details

    • fetchListResources

      public static List<org.apache.jena.rdf.model.Resource> fetchListResources(org.apache.jena.rdfconnection.SparqlQueryConnection qef, Concept concept)
    • fetchList

      public static List<org.apache.jena.graph.Node> fetchList(org.apache.jena.rdfconnection.SparqlQueryConnection qef, OrderedConcept orderedConcept, Long limit, Long offset)
    • fetchList

      public static List<org.apache.jena.graph.Node> fetchList(org.apache.jena.rdfconnection.SparqlQueryConnection qef, Fragment1 concept, Long limit, Long offset)
    • fetchList

      public static List<org.apache.jena.graph.Node> fetchList(org.apache.jena.rdfconnection.SparqlQueryConnection qef, Fragment1 concept)
    • 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