}
@Override
public UpdateContainer doIt(Workspace workspace) throws CommandException {
if(TripleStoreUtil.checkConnection(this.tripleStoreUrl)) {
return new UpdateContainer(new AbstractUpdate() {
@Override
public void generateJson(String prefix, PrintWriter pw, VWorkspace vWorkspace) {
JSONObject obj = new JSONObject();
try {
obj.put(JsonKeys.updateType.name(), "TestSPARQLEndPoint");
obj.put(JsonKeys.connectionStatus.name(), 1);
pw.println(obj.toString());
} catch (JSONException e) {
logger.error("Error occurred while performing connection test for sparql endpoint!", e);
}
}
});
}
return new UpdateContainer(new AbstractUpdate() {
@Override
public void generateJson(String prefix, PrintWriter pw, VWorkspace vWorkspace) {
JSONObject obj = new JSONObject();
try {
obj.put(JsonKeys.updateType.name(), "TestSPARQLEndPoint");