Class AbstractImportPlugin
java.lang.Object
org.processmining.framework.abstractplugins.AbstractImportPlugin
- All Implemented Interfaces:
ImportPlugin
Note that implementing classes of this baseclass should carry the
UIImportPlugin annotation
Subclasses of AbstractImportPlugin should use the @Plugin Annotation as
follows:
- Author:
- bfvdonge
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFile()
Returns the File object this plugin was instantiated with.protected InputStream
getInputStream
(File file) This method returns an inputStream for a file.importFile
(PluginContext context, File f) importFile
(PluginContext context, String filename) importFile
(PluginContext context, URI uri) importFile
(PluginContext context, URL url) protected abstract Object
importFromStream
(PluginContext context, InputStream input, String filename, long fileSizeInBytes) This method is called by all plugin variants to do the actual importing.
-
Constructor Details
-
AbstractImportPlugin
public AbstractImportPlugin()
-
-
Method Details
-
getFile
Description copied from interface:ImportPlugin
Returns the File object this plugin was instantiated with.- Specified by:
getFile
in interfaceImportPlugin
- Returns:
-
importFile
- Specified by:
importFile
in interfaceImportPlugin
- Throws:
Exception
-
importFile
- Specified by:
importFile
in interfaceImportPlugin
- Throws:
Exception
-
importFile
- Specified by:
importFile
in interfaceImportPlugin
- Throws:
Exception
-
importFile
- Specified by:
importFile
in interfaceImportPlugin
- Throws:
Exception
-
getInputStream
This method returns an inputStream for a file. Note that the default implementation returns "new FileInputStream(file);"- Parameters:
file
-- Returns:
- Throws:
FileNotFoundException
Exception
-
importFromStream
protected abstract Object importFromStream(PluginContext context, InputStream input, String filename, long fileSizeInBytes) throws Exception This method is called by all plugin variants to do the actual importing.- Parameters:
context
-input
-filename
-fileSizeInBytes
-- Returns:
- Throws:
Exception
-