java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.external.services.sparql.SparqlServices

public class SparqlServices extends Object
This class provides static functionality for SPARQL calls.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final org.slf4j.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    safeAsk(String askQuery, String endpoint)
    When executing queries it sometimes comes to exceptions (most likely http exceptions).
    static boolean
    safeAsk(org.apache.jena.query.QueryExecution queryExecutionInstance)
    When executing queries it sometimes comes to exceptions (most likely http exceptions).
    static org.apache.jena.query.ResultSet
    safeExecution(org.apache.jena.query.QueryExecution queryExecutionInstance)
    When executing queries it sometimes comes to exceptions (most likely http exceptions).

    Methods inherited from class java.lang.Object

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

    • LOGGER

      private static final org.slf4j.Logger LOGGER
  • Constructor Details

    • SparqlServices

      public SparqlServices()
  • Method Details

    • safeExecution

      public static org.apache.jena.query.ResultSet safeExecution(org.apache.jena.query.QueryExecution queryExecutionInstance)
      When executing queries it sometimes comes to exceptions (most likely http exceptions). This method executes in a safe environment and will retry after some seconds, when the execution fails.
      Parameters:
      queryExecutionInstance - Query Execution Object.
      Returns:
      ResultSet Object. Null, if no result after second attempt.
    • safeAsk

      public static boolean safeAsk(org.apache.jena.query.QueryExecution queryExecutionInstance)
      When executing queries it sometimes comes to exceptions (most likely http exceptions). This method executes in a safe environment and will retry after some seconds, when the execution fails.
      Parameters:
      queryExecutionInstance - Query execution object.
      Returns:
      True if ask query evaluates to true, else false.
    • safeAsk

      public static boolean safeAsk(String askQuery, String endpoint)
      When executing queries it sometimes comes to exceptions (most likely http exceptions). This method executes in a safe environment and will retry after some seconds, when the execution fails.
      Parameters:
      askQuery - The query to be asked.
      endpoint - The SPARQL endpoint
      Returns:
      True if ask query evaluates to true, else false.