Package com.iizix.urn.image
Class ImageURNFactory
java.lang.Object
com.iizix.urn.image.ImageURNFactory
- All Implemented Interfaces:
IURNProvider
Image provider for IIZI URN's.
Image URN's are encoded in IIZI as: dasjdshkhdkjhkjahjkfhsjk hjkfhjkasd
urn:iz-img: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
Modifier and TypeMethodDescriptionstatic ImageURNFactory
Gets the singleton instance of the Image URN factory.getNID()
Gets the Naming IDentifier of the provider.Gets the location or locations supported by the provider.static void
initialize
(URNFactory factory, IImageURNProvider provider) Initializes the File URN factory.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 Details
initialize
Initializes the File URN factory.- Parameters:
factory
- The main URN factory.provider
- The image provider.
getInstance
Gets the singleton instance of the Image URN factory.- Returns:
- The Image URN factory instance, or
null
if not yet initialized.
getNID
Gets the Naming IDentifier of the provider.- Specified by:
getNID
in interfaceIURNProvider
- Returns:
- The
NID.IMAGE
.
getResourceTypes
Gets the location or locations supported by the provider.- Specified by:
getResourceTypes
in interfaceIURNProvider
- Returns:
- The supported locations: ALL.
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 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 "?+"),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.