Class SVG_URNFactory

  • All Implemented Interfaces:
    IURNProvider

    public class SVG_URNFactory
    extends java.lang.Object
    implements IURNProvider
    SVG provider for iizi URN's.

    SVG URN's are encoded in iizi as:

    urn:iz-svg:SVG_ENCODED_DATA?=size:WIDTHxHEIGHT

    The "?=size:WIDTHxHEIGHT" specifies that the SVG should be scaled in size of logical pixel to WIDTH and HEIGHT.

    Author:
    Christopher Mindus
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static SVG_URNFactorygetInstance()
      Gets the singleton instance of the URL URN factory.
      NIDgetNID()
      Gets the Naming IDentifier of the provider.
      java.util.List<URNResourceType>getResourceTypes()
      Gets the location or locations supported by the provider.
      static voidinitialize​(URNFactory factory)
      Initializes the SVG URN factory.
      URNparse​(java.lang.String urnString, java.lang.String nss, java.lang.String req, java.lang.String query, java.lang.String fragment)
      Parses the URN after the NID specification, i.e.
      • Methods inherited from class java.lang.Object

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

      • initialize

        public static void initialize​(URNFactory factory)
        Initializes the SVG URN factory.
        Parameters:
        factory - The main URN factory.
      • getInstance

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

        public java.util.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​(java.lang.String urnString,
                         java.lang.String nss,
                         java.lang.String req,
                         java.lang.String query,
                         java.lang.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.