Enum NID
- java.lang.Object
- java.lang.Enum<NID>
- com.iizix.urn.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:
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 Constant Description 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 Type Field Description 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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NID
from(java.lang.String nid)
Looks up aNID
Namespace IDentifier from a case sensitive string.static NID
valueOf(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.
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".
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 namejava.lang.NullPointerException
- if the argument is null