Package com.iizix.urn

Interface IURNProvider

All Known Subinterfaces:
IFileURNProvider, IImageURNProvider
All Known Implementing Classes:
BarcodeURNFactory, FileURNFactory, FileURNProvider, ImageURNFactory, ImageURNProvider, SVG_URNFactory, URL_URNFactory, UserProfileImageURNFactory, UserProfileStringURNFactory

public interface IURNProvider
Interface used to map a URN string to an external URL string to use by a device, accessing the iiziServer or the iiziGo Designer web server. The interface is used by the {@link URLFactory} for setup by URL providers and is then able to satisfy requests for different types of resources, e.g. strings, files or identifications referencing a database entry.

An IURNProvider could be a provider of PDF's, Barcodes's, etc.

Author:
Christopher Mindus
  • Method Details

    • getNID

      NID getNID()
      Gets the Naming IDentifier of the provider.
      Returns:
      The NID.
    • getResourceTypes

      List<URNResourceType> getResourceTypes()
      Gets the URN Resource Type supported by the provider.
      Returns:
      The supported resource type, empty list when not resource based.
    • parse

      URN parse(String urnString, String nss, String req, String query, String fragment) throws URNException
      Parses the URN after the NID specification, i.e. after "urn:NID:".
      Parameters:
      urnString - The full unparsed original URN string.
      nss - The NSS part of the string (before request/query/fragment).
      req - The decoded request String (without "?+"), null for none.
      query - The decoded query String (without "?="), null for none.
      fragment - The decoded fragment, null for none.
      Returns:
      The URN instance.
      Throws:
      URNException - For URN exceptions.
    • paramString0

      default String paramString0()
      Returns a parameter string part used to produce the "toString()" or "paramString()".
      Returns:
      A part of the string for the provider type.