edu.northwestern.at.morphadorner.tools.compareadornedfiles

## Class WordChange

- java.lang.Object
- - edu.northwestern.at.morphadorner.tools.compareadornedfiles.WordChange

-     public class WordChange
      extends java.lang.Object

  Records a token-level change in an adorned file.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.lang.String` | `attributeName` Name of field for attribute (empty if word text).
    `boolean` | `blankPrecedes` If word is preceded by a blank element.
    `WordChangeType` | `changeType` Type of change: addition, deletion, or modification.
    `FieldType` | `fieldType` Field to which change is applied: text or attribute.
    `java.lang.String` | `id` ID for word changed.
    `java.lang.String` | `newValue` New field value.
    `java.lang.String` | `oldValue` Old field value.
    `java.lang.String` | `siblingID` Sibling to determine parent element when adding a word.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WordChange()` Create empty word change.
    `WordChange(java.lang.String id, WordChangeType changeType, FieldType fieldType, java.lang.String attributeName, java.lang.String oldValue, java.lang.String newValue, java.lang.String siblingID, boolean blankPrecedes)` Create fully populated word change.

  - ### Method Summary

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

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

- - ### Field Detail

    - #### id

          public java.lang.String id

      ID for word changed.

      The ID is usually provided by the xml:id attribute. A "*" means the change applies to all words.

    - #### changeType

          public WordChangeType changeType

      Type of change: addition, deletion, or modification.

    - #### fieldType

          public FieldType fieldType

      Field to which change is applied: text or attribute.

    - #### attributeName

          public java.lang.String attributeName

      Name of field for attribute (empty if word text).

    - #### oldValue

          public java.lang.String oldValue

      Old field value.

    - #### newValue

          public java.lang.String newValue

      New field value.

    - #### siblingID

          public java.lang.String siblingID

      Sibling to determine parent element when adding a word.

    - #### blankPrecedes

          public boolean blankPrecedes

      If word is preceded by a blank element.

  - ### Constructor Detail

    - #### WordChange

          public WordChange()

      Create empty word change.

    - #### WordChange

          public WordChange(java.lang.String id,
                    WordChangeType changeType,
                    FieldType fieldType,
                    java.lang.String attributeName,
                    java.lang.String oldValue,
                    java.lang.String newValue,
                    java.lang.String siblingID,
                    boolean blankPrecedes)

      Create fully populated word change.
      Parameters:
        `id` - ID (usually xml:id) of word to change.
        `changeType` - Type of change (addition, deletion, modification).
        `fieldType` - Type of field to change (text or attribute).
        `attributeName` - Name of attribute (empty if not attribute).
        `oldValue` - Old value of field.
        `newValue` - New value of field.
        `siblingID` - Word ID of sibling when adding new word.
        `blankPrecedes` - Word is preceded by a blank element.