package com.github.bot.curiosone.core.knowledge;

import java.util.List;

import java.util.Objects;

/**
 * Handles interrogations to the SemanticNetwork.
 * Provides methods to create and manage an interrogation to the SemanticNetwork.
 * @see  com.github.bot.curiosone.core.knowledge.SemanticNetwork The SemanticNetwork Class
 */
public class SemanticQuery {

  /**
   * Stores the SemanticRelationType of this interrogation.
   * @see  com.github.bot.curiosone.core.knowledge.SemanticRelationType The SemanticRelationType
   *       Enum
   */
  private SemanticRelationType relation;

  /**
   * Stores the subject of this interrogaiton.
   */
  private String subject;

  /**
   * Stores the object of this interrogaiton.
   */
  private String object;

  /**
   * Lists the adjectives of the object of this SemanticQuery.
   */
  private List<String> objAdjectives;

  /**
   * Stores the verb of this verb.
   */
  private String verb;

  /**
   * Constructs this SemanticQuery.
   * @param  relation
   *         the SemanticRelationType of this SemanticQuery
   * @param  subject
   *         the subject of this SemanticQuery
   * @param  object
   *         the object of this SemanticQuery
   * @param  adjectives
   *         the List of the adjectives of this SemanticQuery
   * @param  verb
   *         the verb of this SemanticQuery
   */
  public SemanticQuery(SemanticRelationType relation, String subject,String object,
      List<String> adjectives, String verb) {

    this.relation = relation;
    this.subject = subject;
    this.object = object;
    this.objAdjectives = adjectives;
    this.verb = verb;
  }

  /**
   * Constructs this SemanticQuery.
   * @param  relation
   *         the SemanticRelationType of this SemanticQuery
   * @param  subject
   *         the subject of this SemanticQuery
   * @param  object
   *         the object of this SemanticQuery
   * @param  verb
   *         the verb of this SemanticQuery
   */
  public SemanticQuery(SemanticRelationType relation,String subject, String object, String verb) {

    this(relation, subject, object, null, verb);
  }

  /**
   * Constructs this SemanticQuery.
   * @param  relation
   *         the SemanticRelationType of this SemanticQuery
   * @param  object
   *         the object of this SemanticQuery
   * @param  adjectives
   *         the List of the adjectives of this SemanticQuery
   * @param  verb
   *         the verb of this SemanticQuery
   */
  public SemanticQuery(SemanticRelationType relation, String object,
      List<String> adjectives, String verb) {

    this(relation, null, object, adjectives, verb);
  }

  /**
   * Constructs this SemanticQuery.
   * @param  relation
   *         the SemanticRelationType of this SemanticQuery
   * @param  object
   *         the object of this SemanticQuery
   * @param  verb
   *         the verb of this SemanticQuery
   */
  public SemanticQuery(SemanticRelationType relation, String object, String verb) {

    this(relation, null, object, null, verb);
  }

  /**
   * @return  the object of this SemanticQuery.
   */
  public String getObject() {
    return object;
  }

  /**
   * @return  the subject of this SemanticQuery.
   */
  public String getSubject() {
    return subject;
  }

  /**
   * @return  a List containing all the adjectives of this SemanticQuery.
   */
  public List<String> getAdjectives() {
    return objAdjectives;
  }

  /**
   * @return  the relation of this SemanticQuery.
   */
  public SemanticRelationType getRelation() {
    return relation;
  }

  /**
   * @return  the verb of this SemanticQuery.
   */
  public String getVerb() {
    return verb;
  }

  /**
   * Checks whether this SemanticQuery equals to the given Object.
   * @param  other
   *         the other object to be compared against
   * @return  {@code true} if this SemanticQuery equals to the given object;
   *          {@code false} otherwise
   */
  @Override
  public boolean equals(Object other) {
    if (other == this) {
      return true;
    }
    if (other == null || other.getClass() != this.getClass()) {
      return false;
    }
    SemanticQuery that = (SemanticQuery) other;
    return this.relation.equals(that.relation)
        && this.subject.equals(that.subject)
        && this.object.equals(that.object)
        && this.verb.equals(that.verb);
  }

  /**
   * Calculates the HashCode of this SemanticQuery.
   * The HashCode depends on the relation, subject, object and verb of this SemanticQuery.
   * @return  the HashCode of this SemanticQuery
   */
  @Override
  public int hashCode() {
    return Objects.hash(relation, subject, object, verb);
  }
}

@@ -3017,32 +3017,76 @@
 rb);%0A  %7D%0A%0A  /**%0A
+   * Gets the object of this SemanticQuery.%0A
    * @return  th
@@ -3107,33 +3107,32 @@
 is SemanticQuery
-.
 %0A   */%0A  public 
@@ -3174,32 +3174,77 @@
 ect;%0A  %7D%0A%0A  /**%0A
+   * Gets the subject of this SemanticQuery.%0A
    * @return  th
@@ -3266,33 +3266,32 @@
 is SemanticQuery
-.
 %0A   */%0A  public 
@@ -3335,32 +3335,80 @@
 ect;%0A  %7D%0A%0A  /**%0A
+   * Gets the adjectives of this SemanticQuery.%0A
    * @return  a 
@@ -3455,33 +3455,32 @@
 is SemanticQuery
-.
 %0A   */%0A  public 
@@ -3539,32 +3539,78 @@
 ves;%0A  %7D%0A%0A  /**%0A
+   * Gets the relation of this SemanticQuery.%0A
    * @return  th
@@ -3633,33 +3633,32 @@
 is SemanticQuery
-.
 %0A   */%0A  public 
@@ -3722,24 +3722,66 @@
 %0A  %7D%0A%0A  /**%0A
+   * Gets the verb of this SemanticQuery.%0A
    * @return
@@ -3804,33 +3804,32 @@
 is SemanticQuery
-.
 %0A   */%0A  public 

fix SemanticQuery codestyle errors