Package com.iizix.urn

Enum NID

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<NID>

    public enum NID
    extends java.lang.Enum<NID>
    Available Namespace IDentifiers (NID) for iizi resources. The NID string is case sensitive.

    iizi Uniform Resource Names (URN) are using the common standard.

    A URN normally looks like below, but you can read more at Uniform Resource Name.

    The iizi implementation for URN's to reference various parts in iizi is:

       "urn:NID:NSS:[?+r-component]][?=q-component][#fragment]".
     

    or, in the form of a syntax diagram, as:

    URN syntax diagram - namestring

    In the iizi case, the use of the some NID's also requires specifying an environment location ({@link NIDLocation}) where the data is stored, e.g. in a database, a server cluster, a server instance (for security), a user (chosen to be identified or not), a user identifier, an application, a specific user session or a specific user client session. In the case a location is used, the resource URL produced from the URN will be private to that particular location, e.g. a server, a user or its application/client session.

    Luckily, the abstraction of the final naming depends on so many things, but you don't have to worry about it. Just place it in the correct NID (Name space IDentifier) and leave the complexity to the framework.

    The iizi NID's are not registered with IANA, so they are all prefixed with "iz-" in this enum class.

    Author:
    Christopher Mindus
    • Enum Constant Summary

      Enum Constants 
      Enum ConstantDescription
      BARCODE
      Barcode with required type and string: "iz-barcode".
      FILE
      File (e.g.
      IMAGE
      Image in bitmap form: "iz-img".
      PROFILE_IMAGE
      Profile image: "iz-pimg".
      PROFILE_STRING
      Profile string (fullName, firstName, lastName, etc): "iz-pstr".
      SVG
      SVG image: "iz-svg".
      URL
      External (web) URL (typically http[s] or ftp[s]): "iz-url".
    • Field Summary

      Fields 
      Modifier and TypeFieldDescription
      java.lang.Stringnid
      The NID string, always starting with "iz-" because the NID is not registered with IANA, and is "private" to the iizi platform.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static NIDfrom​(java.lang.String nid)
      Looks up a NID Namespace IDentifier from a case sensitive string.
      static NIDvalueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static NID[]values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • BARCODE

        public static final NID BARCODE
        Barcode with required type and string: "iz-barcode".
      • IMAGE

        public static final NID IMAGE
        Image in bitmap form: "iz-img".
      • SVG

        public static final NID SVG
        SVG image: "iz-svg".
      • PROFILE_IMAGE

        public static final NID PROFILE_IMAGE
        Profile image: "iz-pimg".
      • PROFILE_STRING

        public static final NID PROFILE_STRING
        Profile string (fullName, firstName, lastName, etc): "iz-pstr".
      • URL

        public static final NID URL
        External (web) URL (typically http[s] or ftp[s]): "iz-url".
      • FILE

        public static final NID FILE
        File (e.g. a PDF accessible from server using file system): "iz-file".
    • Field Detail

      • nid

        public final java.lang.String nid
        The NID string, always starting with "iz-" because the NID is not registered with IANA, and is "private" to the iizi platform.
    • Method Detail

      • values

        public static NID[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (NID c : NID.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static NID valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • from

        public static NID from​(java.lang.String nid)
        Looks up a NID Namespace IDentifier from a case sensitive string.
        Parameters:
        nid - The NID string to find.
        Returns:
        The NID for the nid string, or null if not found.