Class HTMLEffigyFactory

    • Constructor Detail

      • HTMLEffigyFactory

        public HTMLEffigyFactory​(Workspace workspace)
        Create a factory in the specified workspace.
        Parameters:
        workspace - The workspace.
    • Method Detail

      • canCreateBlankEffigy

        public boolean canCreateBlankEffigy()
        Return false, indicating that this effigy factory is not capable of creating an effigy without a URL being specified. There is no point in creating an unmodifiable blank HTML page.
        Overrides:
        canCreateBlankEffigy in class EffigyFactory
        Returns:
        False.
      • createEffigy

        public Effigy createEffigy​(CompositeEntity container,
                                   java.net.URL base,
                                   java.net.URL input)
                            throws java.lang.Exception
        Create a new effigy in the given container by reading the specified URL. The extension of the URL must be ".htm" or ".html", or the content type must be "text/html" or "text/rtf". Otherwise, this returns null. It will also return null if there is no access to the network.
        Overrides:
        createEffigy in class EffigyFactory
        Parameters:
        container - The container for the effigy.
        base - The base for relative file references, or null if there are no relative file references. This is ignored in this class.
        input - The input URL.
        Returns:
        A new instance of HTMLEffigy, or null if one cannot be created.
        Throws:
        java.lang.Exception - If the URL cannot be read, or if the data is malformed in some way.