edu.northwestern.at.morphadorner.tools.annolex

## Class CorrectedWord

- java.lang.Object
- - edu.northwestern.at.morphadorner.tools.annolex.CorrectedWord

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<CorrectedWord>

      public class CorrectedWord
      extends java.lang.Object
      implements java.lang.Comparable<CorrectedWord>, java.io.Serializable

  Information about a single word element correction.
  - The work ID.
  - The permanent word ID.
  - The updated word ID for gaps.
  - The old spelling.
  - The corrected spelling.
  - The corrected standard spelling.
  - The corrected lemma.
  - The corrected part of speech.
  - The correction type.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `correctionType` Correction type.
    `protected java.lang.String` | `id` Word ID.
    `protected java.lang.String` | `lemmata` Corrected lemmata.
    `protected java.lang.String` | `oldSpelling` Old spelling.
    `protected java.lang.String` | `partsOfSpeech` Corrected parts of speech.
    `protected java.lang.String` | `spelling` Corrected spelling.
    `protected java.lang.String` | `standardSpelling` Corrected standard spelling.
    `protected java.lang.String` | `updatedId` Updated word ID.
    `protected java.lang.String` | `workId` Work ID.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CorrectedWord()` Create empty CorrectedWord object.
    `CorrectedWord(java.lang.String workId, java.lang.String id, java.lang.String oldSpelling, java.lang.String spelling, java.lang.String standardSpelling, java.lang.String lemmata, java.lang.String partsOfSpeech, java.lang.String correctionType)` Create populated CorrectedWord object.
    `CorrectedWord(java.lang.String workId, java.lang.String id, java.lang.String updatedId, java.lang.String oldSpelling, java.lang.String spelling, java.lang.String standardSpelling, java.lang.String lemmata, java.lang.String partsOfSpeech, java.lang.String correctionType)` Create populated CorrectedWord object.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(CorrectedWord otherWord)` Compare this corrected word to another.
    `java.lang.String` | `getCorrectionType()` Get correctionType.
    `java.lang.String` | `getId()` Get word ID.
    `java.lang.String` | `getLemmata()` Get the lemmata.
    `java.lang.String` | `getOldSpelling()` Get the old spelling.
    `java.lang.String` | `getPartsOfSpeech()` Get the parts of speech.
    `java.lang.String` | `getSpelling()` Get the spelling.
    `java.lang.String` | `getStandardSpelling()` Get the standard spelling.
    `java.lang.String` | `getUpdatedId()` Get updated word ID.
    `java.lang.String` | `getWorkId()` Get work ID.
    `void` | `setCorrectionType(java.lang.String correctionType)` Set the correctionType.
    `void` | `setId(java.lang.String id)` Set word ID.
    `void` | `setLemmata(java.lang.String lemmata)` Set the lemmata.
    `void` | `setOldSpelling(java.lang.String oldSpelling)` Set the old spelling.
    `void` | `setPartsOfSpeech(java.lang.String partsOfSpeech)` Set the parts of speech.
    `void` | `setSpelling(java.lang.String spelling)` Set the spelling.
    `void` | `setStandardSpelling(java.lang.String standardSpelling)` Set the standard spelling.
    `void` | `setUpdatedId(java.lang.String updatedId)` Set updated word ID.
    `void` | `setWorkId(java.lang.String workId)` Set work ID.
    `java.lang.String` | `toString()` Return correction as a tabbed string.

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### workId

          protected java.lang.String workId

      Work ID.

    - #### id

          protected java.lang.String id

      Word ID.

    - #### updatedId

          protected java.lang.String updatedId

      Updated word ID.

    - #### oldSpelling

          protected java.lang.String oldSpelling

      Old spelling.

    - #### spelling

          protected java.lang.String spelling

      Corrected spelling.

    - #### standardSpelling

          protected java.lang.String standardSpelling

      Corrected standard spelling.

    - #### lemmata

          protected java.lang.String lemmata

      Corrected lemmata.

    - #### partsOfSpeech

          protected java.lang.String partsOfSpeech

      Corrected parts of speech.

    - #### correctionType

          protected java.lang.String correctionType

      Correction type.

  - ### Constructor Detail

    - #### CorrectedWord

          public CorrectedWord()

      Create empty CorrectedWord object.

    - #### CorrectedWord

          public CorrectedWord(java.lang.String workId,
                       java.lang.String id,
                       java.lang.String oldSpelling,
                       java.lang.String spelling,
                       java.lang.String standardSpelling,
                       java.lang.String lemmata,
                       java.lang.String partsOfSpeech,
                       java.lang.String correctionType)

      Create populated CorrectedWord object.

    - #### CorrectedWord

          public CorrectedWord(java.lang.String workId,
                       java.lang.String id,
                       java.lang.String updatedId,
                       java.lang.String oldSpelling,
                       java.lang.String spelling,
                       java.lang.String standardSpelling,
                       java.lang.String lemmata,
                       java.lang.String partsOfSpeech,
                       java.lang.String correctionType)

      Create populated CorrectedWord object.

  - ### Method Detail

    - #### getWorkId

          public java.lang.String getWorkId()

      Get work ID.
      Returns:
        The work ID.

    - #### setWorkId

          public void setWorkId(java.lang.String workId)

      Set work ID.
      Parameters:
        `workId` - The work ID.

    - #### getId

          public java.lang.String getId()

      Get word ID.
      Returns:
        The word ID.

    - #### setId

          public void setId(java.lang.String id)

      Set word ID.
      Parameters:
        `id` - The word ID.

    - #### getUpdatedId

          public java.lang.String getUpdatedId()

      Get updated word ID.
      Returns:
        The updated word ID.

    - #### setUpdatedId

          public void setUpdatedId(java.lang.String updatedId)

      Set updated word ID.
      Parameters:
        `updatedId` - The updated word ID.

    - #### getSpelling

          public java.lang.String getSpelling()

      Get the spelling.
      Returns:
        The spelling.

    - #### setSpelling

          public void setSpelling(java.lang.String spelling)

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

    - #### getStandardSpelling

          public java.lang.String getStandardSpelling()

      Get the standard spelling.
      Returns:
        The standard spelling.

    - #### setStandardSpelling

          public void setStandardSpelling(java.lang.String standardSpelling)

      Set the standard spelling.
      Parameters:
        `standardSpelling` - The standard spelling.

    - #### getOldSpelling

          public java.lang.String getOldSpelling()

      Get the old spelling.
      Returns:
        The old spelling.

    - #### setOldSpelling

          public void setOldSpelling(java.lang.String oldSpelling)

      Set the old spelling.
      Parameters:
        `oldSpelling` - The old spelling.

    - #### getLemmata

          public java.lang.String getLemmata()

      Get the lemmata.
      Returns:
        The lemmata.

        Compound lemmata are separated by a separator tring.

    - #### setLemmata

          public void setLemmata(java.lang.String lemmata)

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

    - #### getPartsOfSpeech

          public java.lang.String getPartsOfSpeech()

      Get the parts of speech.
      Returns:
        The parts of speech.

    - #### setPartsOfSpeech

          public void setPartsOfSpeech(java.lang.String partsOfSpeech)

      Set the parts of speech.
      Parameters:
        `partsOfSpeech` - The parts of speech.

    - #### getCorrectionType

          public java.lang.String getCorrectionType()

      Get correctionType.
      Returns:
        The correctionType.

    - #### setCorrectionType

          public void setCorrectionType(java.lang.String correctionType)

      Set the correctionType.
      Parameters:
        `correctionType` - The correction type.

    - #### toString

          public java.lang.String toString()

      Return correction as a tabbed string.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        Tabbed string: workididold-spellingspellingstandardspellinglemmaposcortypecorrectedId

    - #### compareTo

          public int compareTo(CorrectedWord otherWord)

      Compare this corrected word to another.
      Specified by:
        `compareTo` in interface `java.lang.Comparable<CorrectedWord>`
      Parameters:
        `otherWord` - Other word to compare to this one.
      Returns:
        < 0 if the other object is greater than this one, = 0 if the two objects are equal, > 0 if the other object is less than this one.

        We only compare the word IDs.