Class ImageMapFactory


  • @API(type=NOT_EXTENDABLE,
         src=PRIVATE)
    public class ImageMapFactory
    extends java.lang.Object
    Factory for image map implementations. Builds the necessary classes from the provided texts accordingly with the specified framework.
    • Method Detail

      • getInstance

        public static ImageMapFactory getInstance()
        Get the image map factory instance.
        Returns:
        Returns the instance.
      • getImageMap

        public IImageMapWrapper getImageMap​(SupportedFrameworks supportedFramework,
                                            AuthorAccess authorAccess,
                                            int nodeFontSize,
                                            java.net.URL baseURL,
                                            java.util.Map<java.lang.String,​java.lang.String> uri2ProxyMappings,
                                            java.lang.String... sources)
                                     throws javax.xml.bind.JAXBException,
                                            ImageMapNotSuportedException,
                                            java.net.MalformedURLException
        Get the image map.
        Parameters:
        supportedFramework - The supported framework.
        authorAccess - The author access.
        nodeFontSize - The size of the node's font as it is used in the author page that needs the image map to be rendered.
        baseURL - The base URL.
        uri2ProxyMappings - The URI to proxy mappings.
        sources - The sources for the image map components. Usually a single one, excepting XHTML which has two elements, one for image, one for map.
        Returns:
        The image map wrapper.
        Throws:
        javax.xml.bind.JAXBException - If the UnMarshall-ing fails.
        ImageMapNotSuportedException - If the image map has some arguments that are not supported by us.
        java.net.MalformedURLException - If the image URL cannot be computed.
      • getImageMap

        public IImageMapWrapper getImageMap​(SupportedFrameworks supportedFramework,
                                            AuthorAccess authorAccess,
                                            int nodeFontSize,
                                            java.net.URL baseURL,
                                            java.util.Map<java.lang.String,​java.lang.String> uri2ProxyMappings,
                                            boolean validate,
                                            java.lang.String... sources)
                                     throws javax.xml.bind.JAXBException,
                                            ImageMapNotSuportedException,
                                            java.net.MalformedURLException
        Get the image map.
        Parameters:
        supportedFramework - The supported framework.
        authorAccess - The author access.
        nodeFontSize - The size of the node's font as it is used in the author page that needs the image map to be rendered.
        baseURL - The base URL.
        uri2ProxyMappings - The URI to proxy mappings.
        validate - true to validate the XMl structure which is loaded. if any unknown elements are encountered an exception will be thrown.
        sources - The sources for the image map components. Usually a single one, excepting XHTML which has two elements, one for image, one for map.
        Returns:
        The image map wrapper.
        Throws:
        javax.xml.bind.JAXBException - If the UnMarshall-ing fails.
        ImageMapNotSuportedException - If the image map has some arguments that are not supported by us.
        java.net.MalformedURLException - If the image URL cannot be computed.
      • buildDITAWrapper

        public static ro.sync.ecss.imagemap.ImageMapWrapper buildDITAWrapper​(java.lang.String imageMapString,
                                                                             java.net.URL baseURL,
                                                                             AuthorAccess authorAccess,
                                                                             int nodeFontSize,
                                                                             boolean validate)
                                                                      throws javax.xml.bind.JAXBException,
                                                                             ImageMapNotSuportedException,
                                                                             java.net.MalformedURLException
        Build the DITA wrapper.
        Parameters:
        imageMapString - The string with the image map, in XML format.
        baseURL - The base URL (URL of the document usually).
        authorAccess - The author access.
        nodeFontSize - The size of the node's font as it is used in the author page that needs the image map to be rendered.
        validate - true to validate the input map.
        Returns:
        The DITA wrapper
        Throws:
        javax.xml.bind.JAXBException - If the UnMarshall-ing fails.
        ImageMapNotSuportedException - If the image map has some arguments that are not supported by us.
        java.net.MalformedURLException - If the image URL cannot be computed.