Class URL_URNFactory

java.lang.Object
com.iizix.urn.url.URL_URNFactory
All Implemented Interfaces:
IURNProvider

public class URL_URNFactory extends Object implements IURNProvider
URL provider for external URL's.
Author:
Christopher Mindus
  • Method Details

    • initialize

      public static void initialize(URNFactory factory)
      Initializes the URL URN factory.
      Parameters:
      factory - The URN factory instance.
    • getInstance

      public static URL_URNFactory getInstance()
      Gets the singleton instance of the URL URN factory.
      Returns:
      The URL URN factory instance.
    • getNID

      public NID getNID()
      Gets the Naming IDentifier of the provider.
      Specified by:
      getNID in interface IURNProvider
      Returns:
      The NID.URL.
    • getResourceTypes

      public List<URNResourceType> getResourceTypes()
      Gets the location or locations supported by the provider.
      Specified by:
      getResourceTypes in interface IURNProvider
      Returns:
      The supported locations: none, i.e. an empty list.
    • parse

      public 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:".
      Specified by:
      parse in interface IURNProvider
      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.