Package org.tweetyproject.web.services
Class DelpService
java.lang.Object
org.tweetyproject.web.services.DelpService
Web service for defeasible logic programming.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The identifier of this service.static final String
Attribute "answer" of replies.static final String
Attribute "cmd" of queries referring to the requested command.static final String
Attribute "comparison criterion" of queries.static final String
Value "empty criterion" of attribute "comparison criterion" of queries.static final String
Value "generalized specificity" of attribute "comparison criterion" of queries.static final String
Attribute "email" of queries/replies, used for identification and logging purposes.static final String
Attribute "error" of replies giving some explanation of an error.static final String
Attribute "kb" of queries.static final String
Attribute "query" of queries.static final String
Attribute "reply" of replies referring to the reply type (same values as "cmd").static final String
"query" command. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionhandleRequest
(String query) Handles all requests for the delp service.
-
Field Details
-
ID
The identifier of this service.- See Also:
-
JSON_ATTR_CMD
Attribute "cmd" of queries referring to the requested command.- See Also:
-
JSON_ATTR_REPLY
Attribute "reply" of replies referring to the reply type (same values as "cmd").- See Also:
-
JSON_VAL_QUERY
"query" command.- See Also:
-
JSON_ATTR_EMAIL
Attribute "email" of queries/replies, used for identification and logging purposes.- See Also:
-
JSON_ATTR_ANSWER
Attribute "answer" of replies.- See Also:
-
JSON_ATTR_ERROR
Attribute "error" of replies giving some explanation of an error.- See Also:
-
JSON_ATTR_KB
Attribute "kb" of queries.- See Also:
-
JSON_ATTR_QUERY
Attribute "query" of queries.- See Also:
-
JSON_ATTR_COMP
Attribute "comparison criterion" of queries.- See Also:
-
JSON_ATTR_COMP_GENSPEC
Value "generalized specificity" of attribute "comparison criterion" of queries.- See Also:
-
JSON_ATTR_COMP_EMPTY
Value "empty criterion" of attribute "comparison criterion" of queries.- See Also:
-
-
Constructor Details
-
DelpService
public DelpService()
-
-
Method Details
-
handleRequest
@POST @Produces("application/json") @Consumes("application/json") public String handleRequest(String query) throws org.json.JSONException Handles all requests for the delp service.- Parameters:
query
- the query- Returns:
- String A serialized JSON containing the reply.
- Throws:
org.json.JSONException
- thrown if something is completely going wrong.
-