Class DelpService

java.lang.Object
org.tweetyproject.web.services.DelpService

@Path("delp") public class DelpService extends Object
Web service for defeasible logic programming.
  • Field Details

    • ID

      public static final String ID
      The identifier of this service.
      See Also:
    • JSON_ATTR_CMD

      public static final String JSON_ATTR_CMD
      Attribute "cmd" of queries referring to the requested command.
      See Also:
    • JSON_ATTR_REPLY

      public static final String JSON_ATTR_REPLY
      Attribute "reply" of replies referring to the reply type (same values as "cmd").
      See Also:
    • JSON_VAL_QUERY

      public static final String JSON_VAL_QUERY
      "query" command.
      See Also:
    • JSON_ATTR_EMAIL

      public static final String JSON_ATTR_EMAIL
      Attribute "email" of queries/replies, used for identification and logging purposes.
      See Also:
    • JSON_ATTR_ANSWER

      public static final String JSON_ATTR_ANSWER
      Attribute "answer" of replies.
      See Also:
    • JSON_ATTR_ERROR

      public static final String JSON_ATTR_ERROR
      Attribute "error" of replies giving some explanation of an error.
      See Also:
    • JSON_ATTR_KB

      public static final String JSON_ATTR_KB
      Attribute "kb" of queries.
      See Also:
    • JSON_ATTR_QUERY

      public static final String JSON_ATTR_QUERY
      Attribute "query" of queries.
      See Also:
    • JSON_ATTR_COMP

      public static final String JSON_ATTR_COMP
      Attribute "comparison criterion" of queries.
      See Also:
    • JSON_ATTR_COMP_GENSPEC

      public static final String JSON_ATTR_COMP_GENSPEC
      Value "generalized specificity" of attribute "comparison criterion" of queries.
      See Also:
    • JSON_ATTR_COMP_EMPTY

      public static final String 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.codehaus.jettison.json.JSONException
      Handles all requests for the delp service.
      Parameters:
      query - the query
      Returns:
      String A serialized JSON containing the reply.
      Throws:
      org.codehaus.jettison.json.JSONException - thrown if something is completely going wrong.