sigmlinlib

## Class SIDefs

- java.lang.Object
- - sigmlinlib.SIDefs

-     public class SIDefs
      extends java.lang.Object

  Definitions relating to the different formats of SiGML input and the associated SiGML input service TCP/IP and UDP ports, primarily for the benefit of `SiGMLInLib`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `BCAST_SIGML_PORT_OFFSET` Offset for the standard Broadcast SiGML input port, from `STD_SIGML_PORT_BASE`.
    `static int` | `BCAST_SIGML_PORT_TAG` Tag for Broadcast SiGML input port.
    `static int` | `COUNT_PORT_TAGS` The number of distinct kinds of SiGML input.
    `static int` | `HNS_PORT_TAG` Tag for HNS input port.
    `static int` | `HNST_PORT_TAG` Tag for HNST input port.
    `static int` | `SIGML_PORT_TAG` Tag for SiGML input port.
    `static int[]` | `STD_PORTS` Standard port numbers for the different forms of SiGML input; valid indices are `HNST_PORT_TAG`, `HNS_PORT_TAG`, `SIGML_PORT_TAG` and `BCAST_SIGML_PORT_TAG`.
    `static int` | `STD_SIGML_PORT_BASE` Standard SiGML input base port number.
    `static int` | `STOP_PORT_OFFSET` Offset for the standard SiGML input service termination port, from `STD_SIGML_PORT_BASE`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SIDefs()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `inPort(int kind, int inptgiven)` Returns the SiGML input port number determined by the given kind and port number values: if `inptgiven` is negative the result is the standard port for the given input `kind` as specified in `STD_PORTS`, but the result is `inptgiven` itself if that value is non-negative.
    `static boolean` | `isBroadcastSiGML(int kind)` Indicates whether or not the given SiGML input format is Broadcast SiGML.
    `static boolean` | `isHNS(int kind)` Indicates whether or not the given SiGML input format is HNS.
    `static boolean` | `isHNST(int kind)` Indicates whether or not the given SiGML input format is HNST.
    `static boolean` | `isSiGML(int kind)` Indicates whether or not the given SiGML input format is SiGML.
    `static boolean` | `isValid(int kind)` Indicates whether or not the given value is a valid SiGML input format tag.
    `static int` | `stopPort(int inptgiven, int sptgiven)` Returns the SiGML input service termination port number determined by the given input and termination port values: if `inptgiven` is non-negative the result is the given `sptgiven` termination port number, but if `inptgiven` is negative the result is the standard SiGML input service termination port number.

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

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

- - ### Field Detail

    - #### STD_SIGML_PORT_BASE

          public static final int STD_SIGML_PORT_BASE

      Standard SiGML input base port number.
      See Also:
        Constant Field Values

    - #### HNST_PORT_TAG

          public static final int HNST_PORT_TAG

      Tag for HNST input port.
      See Also:
        Constant Field Values

    - #### HNS_PORT_TAG

          public static final int HNS_PORT_TAG

      Tag for HNS input port.
      See Also:
        Constant Field Values

    - #### SIGML_PORT_TAG

          public static final int SIGML_PORT_TAG

      Tag for SiGML input port.
      See Also:
        Constant Field Values

    - #### BCAST_SIGML_PORT_TAG

          public static final int BCAST_SIGML_PORT_TAG

      Tag for Broadcast SiGML input port.
      See Also:
        Constant Field Values

    - #### COUNT_PORT_TAGS

          public static final int COUNT_PORT_TAGS

      The number of distinct kinds of SiGML input.
      See Also:
        Constant Field Values

    - #### STOP_PORT_OFFSET

          public static final int STOP_PORT_OFFSET

      Offset for the standard SiGML input service termination port, from `STD_SIGML_PORT_BASE`.
      See Also:
        Constant Field Values

    - #### BCAST_SIGML_PORT_OFFSET

          public static final int BCAST_SIGML_PORT_OFFSET

      Offset for the standard Broadcast SiGML input port, from `STD_SIGML_PORT_BASE`.
      See Also:
        Constant Field Values

    - #### STD_PORTS

          public static final int[] STD_PORTS

      Standard port numbers for the different forms of SiGML input; valid indices are `HNST_PORT_TAG`, `HNS_PORT_TAG`, `SIGML_PORT_TAG` and `BCAST_SIGML_PORT_TAG`.

  - ### Constructor Detail

    - #### SIDefs

          public SIDefs()

  - ### Method Detail

    - #### isValid

          public static final boolean isValid(int kind)

      Indicates whether or not the given value is a valid SiGML input format tag.

    - #### inPort

          public static final int inPort(int kind,
                                         int inptgiven)

      Returns the SiGML input port number determined by the given kind and port number values: if `inptgiven` is negative the result is the standard port for the given input `kind` as specified in `STD_PORTS`, but the result is `inptgiven` itself if that value is non-negative.

    - #### stopPort

          public static final int stopPort(int inptgiven,
                                           int sptgiven)

      Returns the SiGML input service termination port number determined by the given input and termination port values: if `inptgiven` is non-negative the result is the given `sptgiven` termination port number, but if `inptgiven` is negative the result is the standard SiGML input service termination port number.

    - #### isHNST

          public static final boolean isHNST(int kind)

      Indicates whether or not the given SiGML input format is HNST.

    - #### isHNS

          public static final boolean isHNS(int kind)

      Indicates whether or not the given SiGML input format is HNS.

    - #### isSiGML

          public static final boolean isSiGML(int kind)

      Indicates whether or not the given SiGML input format is SiGML.

    - #### isBroadcastSiGML

          public static final boolean isBroadcastSiGML(int kind)

      Indicates whether or not the given SiGML input format is Broadcast SiGML.