Package com.iizix.urn.image
Class ImageURNFactory
- java.lang.Object
- com.iizix.urn.image.ImageURNFactory
- All Implemented Interfaces:
IURNProvider
public class ImageURNFactory extends java.lang.Object implements IURNProvider
Image provider for iizi URN's.Image URN's are encoded in iizi as: dasjdshkhdkjhkjahjkfhsjk hjkfhjkasd
urn:iz-img:SVG_ENCODED_DATA?=size:WIDTHxHEIGHTThe "?=size:WIDTHxHEIGHT" specifies that the SVG should be scaled in size of logical pixel to
WIDTHandHEIGHT.- Author:
- Christopher Mindus
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImageURNFactorygetInstance()Gets the singleton instance of the Image 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, IImageURNProvider provider)Initializes the File 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
Methods inherited from interface com.iizix.urn.IURNProvider
paramString0
Method Detail
initialize
public static void initialize(URNFactory factory, IImageURNProvider provider)
Initializes the File URN factory.- Parameters:
factory- The main URN factory.provider- The image provider.
getInstance
public static ImageURNFactory getInstance()
Gets the singleton instance of the Image URN factory.- Returns:
- The Image URN factory instance, or
nullif not yet initialized.
getNID
public NID getNID()
Gets the Naming IDentifier of the provider.- Specified by:
getNIDin interfaceIURNProvider- Returns:
- The
NID.IMAGE.
getResourceTypes
public java.util.List<URNResourceType> getResourceTypes()
Gets the location or locations supported by the provider.- Specified by:
getResourceTypesin interfaceIURNProvider- Returns:
- The supported locations: ALL.
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:
parsein interfaceIURNProvider- 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 "?+"),nullfor none.query- The decoded query String (without "?="),nullfor none.fragment- The decoded fragment,nullfor none.- Returns:
- The URN instance.
- Throws:
URNException- For URN exceptions.