Class JaxoImportPlugin

    • Constructor Detail

      • JaxoImportPlugin

        public JaxoImportPlugin()
    • Method Detail

      • getCharsetName

        public java.lang.String getCharsetName()
        Returns the current charset name. Defaults to null, which means the system default encoding will be used for reading files.
        Returns:
        The current charset name.
      • setCharsetName

        public void setCharsetName​(java.lang.String name)
        Sets the charset name.
        Parameters:
        name - The charset to use. No check is done here whether the given charset name is valid or the corresponding Charset is supported. Set this to null to use the system default encoding.
      • importGraph

        public JaxoGraph importGraph​(java.lang.String fileName)
        Imports a graph from the given file.
        Parameters:
        fileName - The absolute path to the file to be imported
        Returns:
        The imported JaxoGraph or null, if no file was imported
      • importGraph

        public JaxoGraph importGraph​(java.io.File f)
        Imports a graph from the given file.
        Parameters:
        f - The file to be imported
        Returns:
        The imported JaxoGraph or null, if no file was imported
      • getConfigurationPanel

        public javax.swing.JComponent getConfigurationPanel()
        Returns a panel that allows to configure optional parameters of this import format. By default, an empty component is returned, implementing classes should override this to provide a custom component.
        Returns:
        an empty component by default.
      • commitConfiguration

        public void commitConfiguration()
        Apply the changes made in the configuration panel. By default does nothing, implementing classes should override this to provide a custom behavior.
      • importGraph

        protected abstract JaxoGraph importGraph​(java.io.InputStream inputStream)
                                          throws JaxoPluginExecutionException
        Import a graph from a Reader.
        Parameters:
        inputStream - An InputStream to supply the input data.
        Returns:
        The imported JaxoGraph or null, if importing failed.
        Throws:
        JaxoPluginExecutionException - if the graph could not be imported. Note that the message of the Exception should be an internationalized String.