Class PlotEffigy.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 ".plt", ".plot", or ".xml", then return null. If the extension is ".xml", then read the file and return null if it does not contain a line that starts with the string >!DOCTYPE plot PUBLIC "-//UC Berkeley//DTD PlotML within the first five lines. Note that as of this writing, the plotter parses any file you give it without complaint, so we cannot rely on the plotter to report that this file is not a plot file. Thus, we assume that if the extension matches, then it is.
        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 PlotEffigy, or null if the URL does not have a recognized extension.
        Throws:
        java.lang.Exception - If the URL cannot be read.