Skip to content

Commit

Permalink
Update QanaryComponent.java
Browse files Browse the repository at this point in the history
  • Loading branch information
anbo-de authored Aug 10, 2024
1 parent 06b14d8 commit d084743
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ public String getQuestionRawData() throws Exception {
return this.getQanaryQuestion().getTextualRepresentation();
}

/**
* Generates an explanation for the component regarding the {@link QanaryExplanationData} object.
* This method sets the component name in the provided data, logs the explanation request,
* and then sends the data to a web service for processing. The explanation is returned as a string.
*
* @param data the {@link QanaryExplanationData} object containing details needed for generating the explanation.
* This includes the graph, question ID, server host, and any other relevant information.
* @return a {@link String} containing the explanation generated by the web service.
* @throws IOException if an I/O error occurs during communication with the web service.
* @throws URISyntaxException if the URI of the web service is malformed.
* @throws SparqlQueryFailed if the SPARQL query related to the explanation fails.
*/
@Override
public String explain(QanaryExplanationData data) throws IOException, URISyntaxException, SparqlQueryFailed {
data.setComponent(this.getApplicationName());
Expand Down

0 comments on commit d084743

Please sign in to comment.