edu.northwestern.at.morphadorner.tools.countadornedwords

## Class AdornedWordCountInfo

- java.lang.Object
- - edu.northwestern.at.morphadorner.corpuslinguistics.adornedword.BaseAdornedWord
  - - edu.northwestern.at.morphadorner.tools.countadornedwords.AdornedWordCountInfo

- All Implemented Interfaces:
    AdornedWord, XCloneable, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

      public class AdornedWordCountInfo
      extends BaseAdornedWord

  An adorned word with work and spelling count information.

  An AdornedWordCountInfo adds the following to a BaseAAdornedWord.

  - The work ID of the work in which the word appears.
  - The number of times the word appears in the work.
  - The div type of the nearest ancestral div element.
  - The nearest ancestor element which is not a soft tag.
  - The text section (front, middle, back) in which the word appears.
  - The number of times the word appears in the work.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `count` Count.
    `protected java.lang.String` | `divType` Div type of nearest ancestral div.
    `protected java.lang.String` | `nearestAncestor` Nearest ancestral element which is not a soft tag.
    `protected java.lang.String` | `textSection` Text section (front, middle, back).
    `protected java.lang.String` | `workID` Work ID.

    - ### Fields inherited from class edu.northwestern.at.morphadorner.corpuslinguistics.adornedword.BaseAdornedWord

      `lemmata, partsOfSpeech, spelling, standardSpelling, token`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AdornedWordCountInfo()` Create empty adorned word info object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(java.lang.Object object)` Compare this key with another.
    `boolean` | `equals(java.lang.Object object)` Check if another object is equal to this one.
    `int` | `getCount()` Get the count.
    `java.lang.String` | `getDivType()` Get the div type.
    `java.lang.String` | `getNearestAncestor()` Get the nearest ancestor.
    `java.lang.String` | `getTextSection()` Get the text section.
    `java.lang.String` | `getWorkID()` Get the work ID.
    `int` | `hashCode()` Get the hash code of the keys.
    `void` | `setCount(int count)` Set the count.
    `void` | `setDivType(java.lang.String divType)` Set the div type.
    `void` | `setNearestAncestor(java.lang.String nearestAncestor)` Set the nearest ancestor.
    `void` | `setTextSection(java.lang.String textSection)` Set the text section.
    `void` | `setWorkID(java.lang.String workID)` Set the work ID.
    `java.lang.String` | `toString()` Return a string representation of this object.
    `java.lang.String` | `toString2()` Return a string representation of this object.

    - ### Methods inherited from class edu.northwestern.at.morphadorner.corpuslinguistics.adornedword.BaseAdornedWord

      `clone, getLemmata, getPartsOfSpeech, getSpelling, getStandardSpelling, getToken, setLemmata, setPartsOfSpeech, setSpelling, setStandardSpelling, setToken`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### count

          protected int count

      Count.

    - #### workID

          protected java.lang.String workID

      Work ID.

    - #### divType

          protected java.lang.String divType

      Div type of nearest ancestral div.

    - #### nearestAncestor

          protected java.lang.String nearestAncestor

      Nearest ancestral element which is not a soft tag.

    - #### textSection

          protected java.lang.String textSection

      Text section (front, middle, back).

  - ### Constructor Detail

    - #### AdornedWordCountInfo

          public AdornedWordCountInfo()

      Create empty adorned word info object.

  - ### Method Detail

    - #### getCount

          public int getCount()

      Get the count.
      Returns:
        The count.

    - #### setCount

          public void setCount(int count)

      Set the count.
      Parameters:
        `count` - The count.

    - #### getWorkID

          public java.lang.String getWorkID()

      Get the work ID.
      Returns:
        The work ID.

    - #### setWorkID

          public void setWorkID(java.lang.String workID)

      Set the work ID.
      Parameters:
        `workID` - The workID.

    - #### getDivType

          public java.lang.String getDivType()

      Get the div type.
      Returns:
        The div type.

    - #### setDivType

          public void setDivType(java.lang.String divType)

      Set the div type.
      Parameters:
        `divType` - The div type.

    - #### getNearestAncestor

          public java.lang.String getNearestAncestor()

      Get the nearest ancestor.
      Returns:
        The nearest ancestral element which is not soft tag.

    - #### setNearestAncestor

          public void setNearestAncestor(java.lang.String nearestAncestor)

      Set the nearest ancestor.
      Parameters:
        `nearestAncestor` - The nearest ancestral element.

    - #### getTextSection

          public java.lang.String getTextSection()

      Get the text section.
      Returns:
        The text section.

    - #### setTextSection

          public void setTextSection(java.lang.String textSection)

      Set the text section.
      Parameters:
        `textSection` - The text section.

    - #### equals

          public boolean equals(java.lang.Object object)

      Check if another object is equal to this one.
      Overrides:
        `equals` in class `BaseAdornedWord`
      Parameters:
        `object` - Other object to test for equality.
      Returns:
        true if other object is equal to this one.

        Two word objects are equal if their spellings, lemmata, and parts of speech are equal.

    - #### compareTo

          public int compareTo(java.lang.Object object)

      Compare this key with another.
      Specified by:
        `compareTo` in interface `java.lang.Comparable`
      Overrides:
        `compareTo` in class `BaseAdornedWord`
      Parameters:
        `object` - The other CompoundKey.
      Returns:
        -1, 0, 1 depending opne whether this adorned word is less than, equal to, or greater than another adorned word.

        Two word objects are compared first on their spellings, then their lemmata, and finally their parts of speech.

    - #### toString

          public java.lang.String toString()

      Return a string representation of this object.
      Overrides:
        `toString` in class `BaseAdornedWord`
      Returns:
        A string representation of this object.

        Return a tab separated string of the fields in the following order.

        1. workID
        2. spelling
        3. standardSpelling
        4. partsOfSpeech
        5. lemmata
        6. nearestAncestor
        7. divType
        8. textSection

    - #### toString2

          public java.lang.String toString2()

      Return a string representation of this object.
      Returns:
        A string representation of this object.

        Return a tab separated string of the fields in the following order.

        1. workID
        2. spelling
        3. reversed spelling
        4. standardSpelling
        5. lemmata
        6. partsOfSpeech
        7. nearestAncestor
        8. divType
        9. textSection

    - #### hashCode

          public int hashCode()

      Get the hash code of the keys.
      Overrides:
        `hashCode` in class `BaseAdornedWord`
      Returns:
        The hash code.