sigmlgen

## Class HNSSiGMLNonManuals

- java.lang.Object
- - sigmlgen.HNSSiGMLNonManuals

-     public class HNSSiGMLNonManuals
      extends java.lang.Object

  A collection of static data and method definitions relating to the non-manual aspects of a sign as represented in the `<hamnosys_nonmanual>` element used in HML and HNS-SiGML. The methods provided here support conversion in either direction between the children of a `<hamnosys_nonmanual>` element and the corresponding string of non-manual tags forming the non-manual component of an `HNSSign`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String[]` | `EYE_RELATED_HML_TAGS` The HML non-manual element tags for the following three articulators: eye-gaze, eye-brows, eye-lids.
    `static char` | `EYES_LETTER` HML/HNS-SiGML non-manual letter code for an eyes-related primitives (eye-gaze, eye-brows, eye-lids).
    `static java.lang.String[]` | `EYES_TAG_LISTS` Space-separated lists of tags for eye-related HNS non-manuals, with one list for each of the following articulators: eye-gaze, eye-brows, eye-lids; each tag is a string containing exactly two upper-case letters.
    `static java.lang.String` | `MOUTH_GESTURE_LETTERS` HML/HNS-SiGML non-manual letter codes for the different categories of mouth gesture: Teeth (D), Jaws, Lips, Cheeks, Tongue.
    `static int[]` | `MOUTH_GESTURE_TAG_LIMITS` Counts of mouth-gesture non-manual in each of the following categories: Teeth (D), Jaws, Lips, Cheeks, Tongue.
    `static char` | `MOUTH_PICTURE_LETTER` HML/HNS-SiGML non-manual letter code for a mouth picture
    `static java.lang.String[]` | `NON_MOUTH_RELATED_HNM_TAGS` The HML non-manual element tags related to the following articulators: shoulders, body, head, eyes, nose -- but with a `null` entry for the eyes, for which there are three distinct tags, held in `EYE_RELATED_HML_TAGS`.
    `static java.lang.String` | `NON_MOUTH_RELATED_LETTERS` HML/HNS-SiGML non-manual letter codes for all categories except for the mouth-related ones: shoulders, body, head, eyes, nose.
    `static java.lang.String[]` | `NON_MOUTH_TAG_LISTS` Space-separated lists of tags for HNS non-manuals non-manuals, with one list for each of the following articulators: shoulders, body, head, eyes (gaze, brows and lids), nose; each tag is a string containing exactly two upper-case letters.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `checkAndNormalizeNMTag(java.lang.String nmtag)` Checks that the given HNST non-manual primitive tag is valid: if so this method returns the tag itself in its normalized form; otherwise it returns `null`.
    `static java.lang.String` | `hnsNMAttrName(java.lang.String hnstnm)` Returns the HML/HNS-SiGML non-manual attribute tag for the given HNST non-manual token, which is assumed to be valid; for a mouth-picture token, the tag is `"picture"`, while in all other cases it is `"tag"`.
    `static java.lang.String` | `hnsNMAttrValue(java.lang.String hnstnm)` Returns the HML/HNS-SiGML non-manual attribute value for the given HNST non-manual token, which is assumed to be valid.
    `static java.lang.String` | `hnsNMAttrValueFull(java.lang.String hnstnm)` Returns the HML/HNS-SiGML non-manual attribute value for the given HNST non-manual token, which is not assumed to be valid.
    `static java.lang.String` | `hnsNMElementTag(java.lang.String hnstnm)` Returns the HML/HNS-SiGML non-manual element tag for the given HNST non-manual token, which is assumed to be valid.
    `static java.lang.String` | `hnsNMElementTagSafe(java.lang.String hnstnm)` Returns the HML/HNS-SiGML non-manual element tag for the given HNST non-manual token, which is not assumed to be valid.
    `static java.lang.String` | `hnsNMTokenForNMElement(org.w3c.dom.Element nmtagel)` Determines the HNSSign (or old HNST) non-manual token for a given HML/HNS-SiGML non-manual DOM element.
    `static java.lang.String` | `hnsNMTokenForNMElement(java.lang.String nmeltag, org.xml.sax.Attributes nmattrs)`
    `static java.lang.String` | `xmlAttrValueString(java.lang.String aval)` Converts an XML attribute value string to a correct form in which special characters -- '<', '&', etc. -- are replaced by the appropriate character entities.

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

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

- - ### Field Detail

    - #### MOUTH_PICTURE_LETTER

          public static final char MOUTH_PICTURE_LETTER

      HML/HNS-SiGML non-manual letter code for a mouth picture
      See Also:
        Constant Field Values

    - #### EYES_LETTER

          public static final char EYES_LETTER

      HML/HNS-SiGML non-manual letter code for an eyes-related primitives (eye-gaze, eye-brows, eye-lids).
      See Also:
        Constant Field Values

    - #### MOUTH_GESTURE_LETTERS

          public static final java.lang.String MOUTH_GESTURE_LETTERS

      HML/HNS-SiGML non-manual letter codes for the different categories of mouth gesture: Teeth (D), Jaws, Lips, Cheeks, Tongue.
      See Also:
        Constant Field Values

    - #### NON_MOUTH_RELATED_LETTERS

          public static final java.lang.String NON_MOUTH_RELATED_LETTERS

      HML/HNS-SiGML non-manual letter codes for all categories except for the mouth-related ones: shoulders, body, head, eyes, nose.
      See Also:
        Constant Field Values

    - #### EYES_TAG_LISTS

          public static final java.lang.String[] EYES_TAG_LISTS

      Space-separated lists of tags for eye-related HNS non-manuals, with one list for each of the following articulators: eye-gaze, eye-brows, eye-lids; each tag is a string containing exactly two upper-case letters.

    - #### EYE_RELATED_HML_TAGS

          public static final java.lang.String[] EYE_RELATED_HML_TAGS

      The HML non-manual element tags for the following three articulators: eye-gaze, eye-brows, eye-lids.

    - #### NON_MOUTH_RELATED_HNM_TAGS

          public static final java.lang.String[] NON_MOUTH_RELATED_HNM_TAGS

      The HML non-manual element tags related to the following articulators: shoulders, body, head, eyes, nose -- but with a `null` entry for the eyes, for which there are three distinct tags, held in `EYE_RELATED_HML_TAGS`.

    - #### NON_MOUTH_TAG_LISTS

          public static final java.lang.String[] NON_MOUTH_TAG_LISTS

      Space-separated lists of tags for HNS non-manuals non-manuals, with one list for each of the following articulators: shoulders, body, head, eyes (gaze, brows and lids), nose; each tag is a string containing exactly two upper-case letters.

    - #### MOUTH_GESTURE_TAG_LIMITS

          public static final int[] MOUTH_GESTURE_TAG_LIMITS

      Counts of mouth-gesture non-manual in each of the following categories: Teeth (D), Jaws, Lips, Cheeks, Tongue.

  - ### Method Detail

    - #### checkAndNormalizeNMTag

          public static final java.lang.String checkAndNormalizeNMTag(java.lang.String nmtag)

      Checks that the given HNST non-manual primitive tag is valid: if so this method returns the tag itself in its normalized form; otherwise it returns `null`. The normalized form depends on the articulator, as follows:
      - Shoulder, Body, Head, Eyes (Gaze, Brows, Lids), Nose:
        `aTT` -- where `a` (lower-case) is the articulator letter, `TT` (upper-case) is the two-letter non-manual tag, as specified in Ch. 4 of ViSiCAST D5-1, i.e. the chapter on non-manuals in HamNoSys 4.
      - Mouth Gesture:
        `CNN` -- where `C` (upper-case) is the category letter (Teeth [D], Jaws, Lips, Cheeks, Tongue), and `NN` is the two-digit mouth-gesture code, as defined in Ch. 4 of ViSiCAST D5-1.
      - Mouth Picture: `mSS..` -- where `m` is itself, and `SS..` is a SAMPA string.
      - Extras: `XNN` -- where `X` (upper-case) is any letter not used above, and `NN` is a two-digit code.
        This class is not defined in ViSiCAST D5-1, but is included to provide a testbed for developers.

    - #### hnsNMElementTag

          public static final java.lang.String hnsNMElementTag(java.lang.String hnstnm)

      Returns the HML/HNS-SiGML non-manual element tag for the given HNST non-manual token, which is assumed to be valid.

    - #### hnsNMElementTagSafe

          public static final java.lang.String hnsNMElementTagSafe(java.lang.String hnstnm)

      Returns the HML/HNS-SiGML non-manual element tag for the given HNST non-manual token, which is not assumed to be valid.

    - #### hnsNMAttrName

          public static final java.lang.String hnsNMAttrName(java.lang.String hnstnm)

      Returns the HML/HNS-SiGML non-manual attribute tag for the given HNST non-manual token, which is assumed to be valid; for a mouth-picture token, the tag is `"picture"`, while in all other cases it is `"tag"`.

    - #### hnsNMAttrValue

          public static final java.lang.String hnsNMAttrValue(java.lang.String hnstnm)

      Returns the HML/HNS-SiGML non-manual attribute value for the given HNST non-manual token, which is assumed to be valid.

    - #### hnsNMAttrValueFull

          public static final java.lang.String hnsNMAttrValueFull(java.lang.String hnstnm)

      Returns the HML/HNS-SiGML non-manual attribute value for the given HNST non-manual token, which is not assumed to be valid. Values are not truncated.

    - #### xmlAttrValueString

          public static final java.lang.String xmlAttrValueString(java.lang.String aval)

      Converts an XML attribute value string to a correct form in which special characters -- '<', '&', etc. -- are replaced by the appropriate character entities.

    - #### hnsNMTokenForNMElement

          public static final java.lang.String hnsNMTokenForNMElement(java.lang.String nmeltag,
                                                                      org.xml.sax.Attributes nmattrs)

    - #### hnsNMTokenForNMElement

          public static final java.lang.String hnsNMTokenForNMElement(org.w3c.dom.Element nmtagel)

      Determines the HNSSign (or old HNST) non-manual token for a given HML/HNS-SiGML non-manual DOM element.