Class InconsistencyMeasurementService


  • @Path("incmes")
    public class InconsistencyMeasurementService
    extends Object
    Inconsistency measurement service.
    • Field Detail

      • satSolver

        public static net.sf.tweety.logics.pl.sat.SatSolver satSolver
        The SAT solver configured for this service.
      • musEnumerator

        public static net.sf.tweety.logics.commons.analysis.AbstractMusEnumerator<net.sf.tweety.logics.pl.syntax.PlFormula> musEnumerator
        The MUS enumerator configured for this service.
      • linearSolver

        public static net.sf.tweety.math.opt.Solver linearSolver
        The linear optimization solver configured for this service.
      • integerLinearSolver

        public static net.sf.tweety.math.opt.Solver integerLinearSolver
        The integer linear optimization solver configured for this service.
      • timeout

        public static long timeout
        Time out for the update operation (in seconds).
      • JSON_ATTR_CMD

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

        public static final String JSON_VAL_MEASURES
        "list inconsistency measures" command.
        See Also:
        Constant Field Values
      • JSON_ATTR_MEASURE

        public static final String JSON_ATTR_MEASURE
        Attribute "measure" of queries requesting a specific inconsistency value.
        See Also:
        Constant Field Values
      • JSON_ATTR_FORMAT

        public static final String JSON_ATTR_FORMAT
        Attribute "format" of queries requesting a specific inconsistency value.
        See Also:
        Constant Field Values
      • JSON_ATTR_KB

        public static final String JSON_ATTR_KB
        Attribute "kb" of queries requesting a specific inconsistency value.
        See Also:
        Constant Field Values
      • JSON_ATTR_VALUE

        public static final String JSON_ATTR_VALUE
        Attribute "value" of replies containing the requested inconsistency value.
        See Also:
        Constant Field Values
      • JSON_ATTR_TIME

        public static final String JSON_ATTR_TIME
        Attribute "time" of replies containing the time needed to compute the value.
        See Also:
        Constant Field Values
      • JSON_ATTR_ERROR

        public static final String JSON_ATTR_ERROR
        Attribute "error" of replies giving some explanation of an error.
        See Also:
        Constant Field Values
      • 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:
        Constant Field Values
      • JSON_ATTR_EMAIL

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

        public static final String JSON_ATTR_MEASURES
        Attribute "measures" of replies, used for listing all available inconsistency measures.
        See Also:
        Constant Field Values
      • JSON_ATTR_FORMATS

        public static final String JSON_ATTR_FORMATS
        Attribute "formats" of replies, used for listing all available kb formats.
        See Also:
        Constant Field Values
      • JSON_ATTR_LABEL

        public static final String JSON_ATTR_LABEL
        Attribute "label" of replies to list queries
        See Also:
        Constant Field Values
    • Constructor Detail

      • InconsistencyMeasurementService

        public InconsistencyMeasurementService()
        Default constructor
    • Method Detail

      • handleRequest

        @POST
        @Produces("application/json")
        @Consumes("application/json")
        public String handleRequest​(String query)
                             throws org.codehaus.jettison.json.JSONException
        Handles all requests for the inconsistency measurement 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.