net.sf.okapi.lib.xliff2.core

## Class Note

- java.lang.Object
- - net.sf.okapi.lib.xliff2.core.DataWithExtAttributes
  - - net.sf.okapi.lib.xliff2.core.Note

- All Implemented Interfaces:
    IWithExtAttributes

      public class Note
      extends DataWithExtAttributes

  Represents a note object.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Note.AppliesTo` Types of object a note can apply to.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Note()` Creates a new empty `Note` object.
    `Note(Note original)` Copy constructor.
    `Note(java.lang.String content)` Creates a new `Note` object with a content with a scope set to `Note.AppliesTo.UNDEFINED`.
    `Note(java.lang.String content, Note.AppliesTo appliesTo)` Creates a new `Note` object with a content and a scope.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Note.AppliesTo` | `getAppliesTo()` Gets the type of object this note applies to.
    `java.lang.String` | `getCategory()` Gets the category for this note.
    `java.lang.String` | `getId()` Gets the id for this note.
    `int` | `getPriority()` Gets the priority for this note.
    `java.lang.String` | `getText()` Gets the text content of this note.
    `boolean` | `isEmpty()` Indicates if this note is empty, that is if the content is null or empty.
    `void` | `setAppliesTo(Note.AppliesTo appliesTo)` Sets the type of object this note applies to.
    `void` | `setCategory(java.lang.String category)` Sets the category for this note.
    `void` | `setId(java.lang.String id)` Sets the id for this note.
    `void` | `setPriority(int priority)` Sets the priority for this note.
    `void` | `setText(java.lang.String content)` Sets the content of this note.
    `java.lang.String` | `toString()` Gets a representation for this note: its content.

    - ### Methods inherited from class net.sf.okapi.lib.xliff2.core.DataWithExtAttributes

      `getExtAttributes, getExtAttributeValue, hasExtAttribute, setExtAttributes`

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

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

- - ### Constructor Detail

    - #### Note

          public Note()

      Creates a new empty `Note` object.

    - #### Note

          public Note(Note original)

      Copy constructor.
      Parameters:
        `original` - the original object to duplicate.

    - #### Note

          public Note(java.lang.String content)

      Creates a new `Note` object with a content with a scope set to `Note.AppliesTo.UNDEFINED`.
      Parameters:
        `content` - the content of the note.

    - #### Note

          public Note(java.lang.String content,
              Note.AppliesTo appliesTo)

      Creates a new `Note` object with a content and a scope.
      Parameters:
        `content` - the content of this note.
        `appliesTo` - the scope of this note.

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Gets a representation for this note: its content.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        the text content of this note.

    - #### getText

          public java.lang.String getText()

      Gets the text content of this note.
      Returns:
        the text content of this note.

    - #### setText

          public void setText(java.lang.String content)

      Sets the content of this note.
      Parameters:
        `content` - the new content to set.

    - #### isEmpty

          public boolean isEmpty()

      Indicates if this note is empty, that is if the content is null or empty.
      Returns:
        true if the content is null or empty.

    - #### getAppliesTo

          public Note.AppliesTo getAppliesTo()

      Gets the type of object this note applies to.
      Returns:
        the type of object this note applies to.

    - #### setAppliesTo

          public void setAppliesTo(Note.AppliesTo appliesTo)

      Sets the type of object this note applies to.
      Parameters:
        `appliesTo` - the type of object this note applies to.

    - #### getId

          public java.lang.String getId()

      Gets the id for this note.
      Returns:
        the id of this note (can be null).

    - #### setId

          public void setId(java.lang.String id)

      Sets the id for this note.
      Parameters:
        `id` - the new id to set.

    - #### getCategory

          public java.lang.String getCategory()

      Gets the category for this note.
      Returns:
        the category for this note (can be null).

    - #### setCategory

          public void setCategory(java.lang.String category)

      Sets the category for this note.
      Parameters:
        `category` - the new category to set (can be null).

    - #### getPriority

          public int getPriority()

      Gets the priority for this note.
      Returns:
        the priority for this note. 1 indicates the highest priority, 10 the lowest.

    - #### setPriority

          public void setPriority(int priority)

      Sets the priority for this note.
      Parameters:
        `priority` - the new priority to set. The value must be between 1 (inclusive) and 10 (inclusive). 1 indicates the highest priority, 10 the lowest.