Class DelpService


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

      Fields 
      Modifier and Type Field Description
      static java.lang.String ID
      The identifier of this service.
      static java.lang.String JSON_ATTR_ANSWER
      Attribute "answer" of replies.
      static java.lang.String JSON_ATTR_CMD
      Attribute "cmd" of queries referring to the requested command.
      static java.lang.String JSON_ATTR_COMP
      Attribute "comparison criterion" of queries.
      static java.lang.String JSON_ATTR_COMP_EMPTY
      Value "empty criterion" of attribute "comparison criterion" of queries.
      static java.lang.String JSON_ATTR_COMP_GENSPEC
      Value "generalized specificity" of attribute "comparison criterion" of queries.
      static java.lang.String JSON_ATTR_EMAIL
      Attribute "email" of queries/replies, used for identification and logging purposes.
      static java.lang.String JSON_ATTR_ERROR
      Attribute "error" of replies giving some explanation of an error.
      static java.lang.String JSON_ATTR_KB
      Attribute "kb" of queries.
      static java.lang.String JSON_ATTR_QUERY
      Attribute "query" of queries.
      static java.lang.String JSON_ATTR_REPLY
      Attribute "reply" of replies referring to the reply type (same values as "cmd").
      static java.lang.String JSON_VAL_QUERY
      "query" command.
    • Constructor Summary

      Constructors 
      Constructor Description
      DelpService()  
    • Method Summary

      Modifier and Type Method Description
      java.lang.String handleRequest​(java.lang.String query)
      Handles all requests for the delp service.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ID

        public static final java.lang.String ID
        The identifier of this service.
        See Also:
        Constant Field Values
      • JSON_ATTR_CMD

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

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

        public static final java.lang.String JSON_VAL_QUERY
        "query" command.
        See Also:
        Constant Field Values
      • JSON_ATTR_EMAIL

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

        public static final java.lang.String JSON_ATTR_ANSWER
        Attribute "answer" of replies.
        See Also:
        Constant Field Values
      • JSON_ATTR_ERROR

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

        public static final java.lang.String JSON_ATTR_KB
        Attribute "kb" of queries.
        See Also:
        Constant Field Values
      • JSON_ATTR_QUERY

        public static final java.lang.String JSON_ATTR_QUERY
        Attribute "query" of queries.
        See Also:
        Constant Field Values
      • JSON_ATTR_COMP

        public static final java.lang.String JSON_ATTR_COMP
        Attribute "comparison criterion" of queries.
        See Also:
        Constant Field Values
      • JSON_ATTR_COMP_GENSPEC

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

        public static final java.lang.String JSON_ATTR_COMP_EMPTY
        Value "empty criterion" of attribute "comparison criterion" of queries.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DelpService

        public DelpService()
    • Method Detail

      • handleRequest

        @POST
        @Produces("application/json")
        @Consumes("application/json")
        public java.lang.String handleRequest​(java.lang.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.