Class NumUriValidator


  • public class NumUriValidator
    extends java.lang.Object
    Full validation of NUM URIs
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String NUM_PROTOCOL_PREFIX
      The expected NUM protocol prefix is present.
      static java.lang.String PROTOCOL_SEPARATOR
      Used to detect whether a URI includes the protocol or not.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ValidationResult validate​(@NonNull java.lang.String domain, int moduleNumber, @NonNull java.lang.String path)
      Build a NUM URI from the parts and validate it.
      static ValidationResult validate​(java.lang.String uri)
      Fully validate a NUM URI, including checks to make sure that the independent and hosted domain names are within the maximum length of a domain name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PROTOCOL_SEPARATOR

        public static final java.lang.String PROTOCOL_SEPARATOR
        Used to detect whether a URI includes the protocol or not.
        See Also:
        Constant Field Values
      • NUM_PROTOCOL_PREFIX

        public static final java.lang.String NUM_PROTOCOL_PREFIX
        The expected NUM protocol prefix is present. Defaults to this if not present.
        See Also:
        Constant Field Values
    • Method Detail

      • validate

        public static ValidationResult validate​(@NonNull
                                                @NonNull java.lang.String domain,
                                                int moduleNumber,
                                                @NonNull
                                                @NonNull java.lang.String path)
        Build a NUM URI from the parts and validate it.
        Parameters:
        domain - a non-null domain String
        moduleNumber - a non-negative module number int
        path - a non-null path String
        Returns:
        ValidationResult
      • validate

        public static ValidationResult validate​(java.lang.String uri)
        Fully validate a NUM URI, including checks to make sure that the independent and hosted domain names are within the maximum length of a domain name.

        Uses the other validators to help.

        Parameters:
        uri - String
        Returns:
        ValidationResult