public class AnswerSyncer extends Object
IQuestions against an endpoint and sets the endpoint's answers as golden answers.| Constructor | Description |
|---|---|
AnswerSyncer() |
| Modifier and Type | Method | Description |
|---|---|---|
private static void |
answer(ThreadedSPARQL sp,
IQuestion q) |
|
static void |
syncAnswers(List<IQuestion> questions,
String endpoint) |
Retrieves answers for the sparql in all IQuestions from given endpoint, and sets it as goldenAnswers.
|
static void |
syncAnswers(List<IQuestion> questions,
String endpoint,
int queryTimeoutInSecs) |
Retrieves answers for the sparql in all IQuestions from given endpoint, and sets it as goldenAnswers.
|
static void |
syncAnswers(IQuestion q,
String endpoint) |
Retrieves answers for the sparql in this IQuestion from given endpoint, and sets it as goldenAnswers.
|
static void |
syncAnswers(IQuestion q,
String endpoint,
int queryTimeoutInSecs) |
Retrieves answers for the sparql in this IQuestion from given endpoint, and sets it as goldenAnswers.
|
public static void syncAnswers(IQuestion q, String endpoint) throws ExecutionException
If the resultSet of server is null(e.g. sparql timed out) golden answers will be an empty Set.
Using syncAnswers(List, String) for multiple questions may increase performance.
q - endpoint - an endpoint e.g. SPARQLEndpoints.DBPEDIA_ORGExecutionException - e.g. server error, times out, thread gets interrupted....public static void syncAnswers(IQuestion q, String endpoint, int queryTimeoutInSecs) throws ExecutionException
If the resultSet of server is null(e.g. sparql timed out) golden answers will be an empty Set.
Using syncAnswers(List, String) for multiple questions may increase performance.
q - endpoint - an endpoint e.g. SPARQLEndpoints.DBPEDIA_ORGqueryTimeoutInSecs - Self-explanatory. if ! > 0 it will be ignored. (default 10secs)ExecutionException - e.g. server error, times out, thread gets interrupted....public static void syncAnswers(List<IQuestion> questions, String endpoint) throws ExecutionException
If the resultSet of server is null(e.g. sparql timed out) golden answers will be an empty Set.
q - endpoint - an endpoint e.g. SPARQLEndpoints.DBPEDIA_ORGqueryTimeoutInSecs - Self-explanatory. if ! > 0 it will be ignored. (default 10secs)ExecutionException - e.g. server error, times out, thread gets interrupted....public static void syncAnswers(List<IQuestion> questions, String endpoint, int queryTimeoutInSecs) throws ExecutionException
If the resultSet of server is null(e.g. sparql timed out) golden answers will be an empty Set.
q - endpoint - an endpoint e.g. SPARQLEndpoints.DBPEDIA_ORGExecutionException - e.g. server error, times out, thread gets interrupted....private static void answer(ThreadedSPARQL sp, IQuestion q) throws ExecutionException
ExecutionExceptionCopyright © 2016–2018 Pivotal Software, Inc.. All rights reserved.