Class RFC5892

java.lang.Object
com.networknt.schema.utils.RFC5892

public class RFC5892 extends Object
Encapsulates the rules determining whether a label conforms to the RFC 5892 specification.

In the context of RFC 5892. a label is a subcomponent of a DNS entry. For example, schema.networknt.com has three sub-components or labels: com, networknt and schema.

Each component (or label) must satisfy the constraints identified in RFC 5892.

  • Field Details

  • Constructor Details

    • RFC5892

      public RFC5892()
  • Method Details

    • isContextJ

      private static boolean isContextJ(int codepoint)
    • isContextO

      private static boolean isContextO(int codepoint)
    • isDisallowed

      private static boolean isDisallowed(int codepoint)
    • isUnassigned

      private static boolean isUnassigned(int codepoint)
    • testAllowedCharacter

      private static boolean testAllowedCharacter(String s, int i)
    • isValid

      public static boolean isValid(String value)
    • isACE

      private static boolean isACE(String value)
    • isCombiningMark

      private static boolean isCombiningMark(int codepoint)
    • testLTR

      private static boolean testLTR(String s, int i)
    • testRTL

      private static boolean testRTL(String s, int i)
    • testGreekLowerNumeralSign

      private static boolean testGreekLowerNumeralSign(String s, int i)
      Determines whether the GREEK LOWER NUMERAL SIGN (KERAIA) conforms to the RFC 5892 specification.
      Parameters:
      s - Must be a simple Unicode string; i.e., not ACE encoded
      i - the location of the KERAIA within the source label
      Returns:
      true if the KERAIA rule is valid at the given location or the character at the given position is not the KERAIA character.
    • testHebrewPuncuation

      private static boolean testHebrewPuncuation(String s, int i)
      Determines whether the HEBREW PUNCTUATION (GERESH or GERSHAYIM) conforms to the RFC 5892 specification.
      Parameters:
      s - Must be a simple Unicode string; i.e., not ACE encoded
      i - the location of the character within the source label
      Returns:
      true if the rule is valid at the given location or the character at the given position is not a GERESH or GERSHAYIM character.
    • testKatakanaMiddleDot

      private static boolean testKatakanaMiddleDot(String s, int i)
      Determines whether the KATAKANA MIDDLE DOT conforms to the RFC 5892 specification.
      Parameters:
      s - Must be a simple Unicode string; i.e., not ACE encoded
      i - the location of the character within the source label
      Returns:
      true if the rule is valid at the given location or the character at the given position is not a KATAKANA MIDDLE DOT character.
    • testeMiddleDotRule

      private static boolean testeMiddleDotRule(String s, int i)
      Determines whether the MIDDLE DOT conforms to the RFC 5892 specification.
      Parameters:
      s - Must be a simple Unicode string; i.e., not ACE encoded
      i - the location of the MIDDLE DOT within the source label
      Returns:
      true if the MIDDLE DOT rule is valid at the given location or the character at the given position is not the MIDDLE DOT character.
    • testZeroWidthJoiner

      private static boolean testZeroWidthJoiner(String s, int i)
      Determines whether the ZERO WIDTH JOINER conforms to the RFC 5892 specification.
      Parameters:
      s - Must be a simple Unicode string; i.e., not ACE encoded
      i - the location of the character within the source label
      Returns:
      true if the rule is valid at the given location or the character at the given position is not a ZERO WIDTH JOINER character.
    • testZeroWidthNonJoiner

      private static boolean testZeroWidthNonJoiner(String s, int i)
      Determines whether the ZERO WIDTH NON-OINER conforms to the RFC 5892 specification.
      Parameters:
      s - Must be a simple Unicode string; i.e., not ACE encoded
      i - the location of the character within the source label
      Returns:
      true if the rule is valid at the given location or the character at the given position is not a ZERO WIDTH NON-JOINER character.
    • testArabicIndicDigit

      private static boolean testArabicIndicDigit(String s, int i)
    • testExtendedArabicIndicDigit

      private static boolean testExtendedArabicIndicDigit(String s, int i)
    • loadDerivedProperties

      private static void loadDerivedProperties()