Class SparqlServices
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.external.services.sparql.SparqlServices
This class provides static functionality for SPARQL calls.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
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).
-
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
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.
-