Skip to content

Commit

Permalink
Update QanaryExplanationData.java
Browse files Browse the repository at this point in the history
  • Loading branch information
anbo-de authored Aug 10, 2024
1 parent a4261d0 commit dc58487
Showing 1 changed file with 75 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

import java.util.Map;

/**
* This class represents the data structure used to store information related to a Qanary explanation request.
* It contains details about the Qanary process graph, the question ID, the server host, the component being
* explained, and any explanations generated.
*/
public class QanaryExplanationData {

private String graph;
Expand All @@ -10,52 +15,112 @@ public class QanaryExplanationData {
private String component;
private Map<String,String> explanations;

/**
* Default constructor for creating an empty instance of {@link QanaryExplanationData}.
*/
public QanaryExplanationData() {

}

/**
* Constructor for creating an instance of {@link QanaryExplanationData} with the specified Qanary process graph, question ID, and server host.
*
* @param graph the graph representing the QA process
* @param questionId the identifier for the question being explained
* @param serverHost the host of the server processing the explanation request
*/
public QanaryExplanationData(String graph, String questionId, String serverHost) {
this.graph = graph;
this.questionId = questionId;
this.serverHost = serverHost;
}

/**
* Gets the component being explained.
*
* @return the component being explained
*/
public String getComponent() {
return component;
}

public void setExplanations(Map<String, String> explanations) {
this.explanations = explanations;
/**
* Sets the component being explained.
*
* @param component the component to set
*/
public void setComponent(String component) {
this.component = component;
}

/**
* Gets the explanations generated for the component.
*
* @return a map of explanations, where keys are explanation types and values are explanations
*/
public Map<String, String> getExplanations() {
return explanations;
}

/**
* Sets the explanations generated for the component.
*
* @param explanations a map of explanations, where keys are explanation types and values are explanations
*/
public void setExplanations(Map<String, String> explanations) {
this.explanations = explanations;
}

/**
* Gets the graph representing the Qanary process.
*
* @return the graph representing the Qanary process
*/
public String getGraph() {
return graph;
}

/**
* Sets the graph representing the QA process.
*
* @param graph the graph to set
*/
public void setGraph(String graph) {
this.graph = graph;
}

/**
* Gets the identifier for the question being explained.
*
* @return the question ID
*/
public String getQuestionId() {
return questionId;
}

/**
* Sets the identifier for the question being explained.
*
* @param questionId the question ID to set
*/
public void setQuestionId(String questionId) {
this.questionId = questionId;
}

public void setComponent(String component) {
this.component = component;
}

public void setGraph(String graph) {
this.graph = graph;
}

/**
* Gets the host of the server processing the explanation request.
*
* @return the server host
*/
public String getServerHost() {
return serverHost;
}

/**
* Sets the host of the server processing the explanation request.
*
* @param serverHost the server host to set
*/
public void setServerHost(String serverHost) {
this.serverHost = serverHost;
}
Expand Down

0 comments on commit dc58487

Please sign in to comment.