Class InconsistencyPost

java.lang.Object
org.tweetyproject.web.services.Post
org.tweetyproject.web.services.incmes.InconsistencyPost

public class InconsistencyPost extends Post
Represents a data transfer object for inconsistency calculation requests. The InconsistencyPost class extends the Post class and encapsulates information about the parameters required for an inconsistency calculation, including the command, user email, inconsistency measure, knowledge base, response format, timeout, and unit timeout. This class provides getter and setter methods for accessing and modifying its attributes. Additionally, convenience methods are included for chaining attribute setting operations. The class overrides the equals, hashCode, and toString methods for proper comparison and string representation.
See Also:
  • Constructor Details

    • InconsistencyPost

      public InconsistencyPost()
      Constructs an empty InconsistencyPost. Use this constructor to create a post object that will be populated later.
    • InconsistencyPost

      public InconsistencyPost(String cmd, String email, String measure, String kb, String format, int timeout, String unit_timeout)
      Constructs an InconsistencyPost with specified values for each field.
      Parameters:
      cmd - The command to be executed during the analysis.
      email - The email address associated with this post.
      measure - The specific measure or metric to be analyzed.
      kb - Knowledge base reference or identifier used during the analysis.
      format - The data format or structure that is being analyzed.
      timeout - The maximum allowed duration for the analysis to complete.
      unit_timeout - The unit of time used for the timeout, such as seconds or minutes.
  • Method Details

    • getCmd

      public String getCmd()
      Returns the command associated with this post.
      Overrides:
      getCmd in class Post
      Returns:
      The command as a string.
    • setCmd

      public void setCmd(String cmd)
      Sets the command for this post.
      Overrides:
      setCmd in class Post
      Parameters:
      cmd - The command string to be set.
    • getEmail

      public String getEmail()
      Returns the email address associated with this post.
      Returns:
      The email as a string.
    • setEmail

      public void setEmail(String email)
      Sets the email address for this post.
      Parameters:
      email - The email string to be set.
    • getMeasure

      public String getMeasure()
      Returns the measure associated with this post.
      Returns:
      The measure as a string.
    • setMeasure

      public void setMeasure(String measure)
      Sets the measure for this post.
      Parameters:
      measure - The measure string to be set.
    • getKb

      public String getKb()
      Returns the knowledge base identifier associated with this post.
      Returns:
      The kb identifier as a string.
    • setKb

      public void setKb(String kb)
      Sets the knowledge base identifier for this post.
      Parameters:
      kb - The kb string to be set.
    • getFormat

      public String getFormat()
      Returns the data format for this post.
      Returns:
      The format as a string.
    • setFormat

      public void setFormat(String format)
      Sets the data format for this post.
      Parameters:
      format - The format string to be set.
    • getTimeout

      public int getTimeout()
      Returns the timeout value for this post.
      Returns:
      The timeout as an integer.
    • setTimeout

      public void setTimeout(int timeout)
      Sets the timeout value for this post.
      Parameters:
      timeout - The timeout value to be set.
    • getUnit_timeout

      public String getUnit_timeout()
      Returns the unit of time for the timeout of this post.
      Returns:
      The unit of timeout as a string.
    • setUnit_timeout

      public void setUnit_timeout(String unit_timeout)
      Sets the unit of time for the timeout of this post.
      Parameters:
      unit_timeout - The unit of timeout to be set.
    • cmd

      public InconsistencyPost cmd(String cmd)
      Sets the command for this post and returns this instance to allow method chaining.
      Overrides:
      cmd in class Post
      Parameters:
      cmd - The command to be executed, typically specifying the operation or action to perform.
      Returns:
      This InconsistencyPost instance, to facilitate chaining multiple settings calls.
    • email

      public InconsistencyPost email(String email)
      Sets the email address associated with this post and returns this instance for method chaining.
      Parameters:
      email - The email address related to the user or context of the post.
      Returns:
      This InconsistencyPost instance, to facilitate chaining multiple settings calls.
    • measure

      public InconsistencyPost measure(String measure)
      Sets the measure key, which specifies the metric or parameter to be analyzed, and returns this instance for method chaining.
      Parameters:
      measure - The measure or metric key that is the focus of the post.
      Returns:
      This InconsistencyPost instance, to facilitate chaining multiple settings calls.
    • kb

      public InconsistencyPost kb(String kb)
      Sets the knowledge base identifier (kb) used in the analysis and returns this instance for method chaining.
      Parameters:
      kb - The identifier for the knowledge base relevant to the post.
      Returns:
      This InconsistencyPost instance, to facilitate chaining multiple settings calls.
    • format

      public InconsistencyPost format(String format)
      Sets the format of the data to be analyzed and returns this instance for method chaining.
      Parameters:
      format - The data format, detailing the structure or type of data that the post concerns.
      Returns:
      This InconsistencyPost instance, to facilitate chaining multiple settings calls.
    • timeout

      public InconsistencyPost timeout(int timeout)
      Sets the timeout for the operation specified in the post and returns this instance for method chaining.
      Parameters:
      timeout - The maximum amount of time (in the unit specified by unit_timeout) that the operation should take.
      Returns:
      This InconsistencyPost instance, to facilitate chaining multiple settings calls.
    • unit_timeout

      public InconsistencyPost unit_timeout(String unit_timeout)
      Sets the unit of time for the timeout and returns this instance for method chaining.
      Parameters:
      unit_timeout - The unit of time for the timeout, such as seconds or minutes.
      Returns:
      This InconsistencyPost instance, to facilitate chaining multiple settings calls.
    • equals

      public boolean equals(Object o)
      Description copied from class: Post
      Determines whether this Post object is equal to another object. Two Post objects are considered equal if their command strings are the same.
      Overrides:
      equals in class Post
      Parameters:
      o - The object to compare with this Post.
      Returns:
      true if the specified object is a Post with the same command; false otherwise.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Description copied from class: Post
      Returns a string representation of this Post object.
      Overrides:
      toString in class Post
      Returns:
      A string representation of this Post, consisting of its command.