Class DocEffigy.Factory

    • 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.
        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. If the specified URL is null, or if the URL does not end with extension ".xml", or if it does end with ".xml" but the file does not contain a line that starts with the string "<!DOCTYPE doc PUBLIC "-//UC Berkeley//DTD DocML" within the first five lines, then return null.
        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 DocEffigy, or null if the URL does not have a doc file.
        Throws:
        java.lang.Exception - If the URL cannot be read.