Class AbstractImportPlugin
- java.lang.Object
-
- org.processmining.framework.abstractplugins.AbstractImportPlugin
-
- All Implemented Interfaces:
ImportPlugin
public abstract class AbstractImportPlugin extends java.lang.Object implements 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
Constructors Constructor Description AbstractImportPlugin()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.io.File
getFile()
Returns the File object this plugin was instantiated with.protected java.io.InputStream
getInputStream(java.io.File file)
This method returns an inputStream for a file.java.lang.Object
importFile(PluginContext context, java.io.File f)
java.lang.Object
importFile(PluginContext context, java.lang.String filename)
java.lang.Object
importFile(PluginContext context, java.net.URI uri)
java.lang.Object
importFile(PluginContext context, java.net.URL url)
protected abstract java.lang.Object
importFromStream(PluginContext context, java.io.InputStream input, java.lang.String filename, long fileSizeInBytes)
This method is called by all plugin variants to do the actual importing.
-
-
-
Method Detail
-
getFile
public java.io.File getFile()
Description copied from interface:ImportPlugin
Returns the File object this plugin was instantiated with.- Specified by:
getFile
in interfaceImportPlugin
- Returns:
-
importFile
public java.lang.Object importFile(PluginContext context, java.lang.String filename) throws java.lang.Exception
- Specified by:
importFile
in interfaceImportPlugin
- Throws:
java.lang.Exception
-
importFile
public java.lang.Object importFile(PluginContext context, java.net.URI uri) throws java.lang.Exception
- Specified by:
importFile
in interfaceImportPlugin
- Throws:
java.lang.Exception
-
importFile
public java.lang.Object importFile(PluginContext context, java.net.URL url) throws java.lang.Exception
- Specified by:
importFile
in interfaceImportPlugin
- Throws:
java.lang.Exception
-
importFile
public java.lang.Object importFile(PluginContext context, java.io.File f) throws java.lang.Exception
- Specified by:
importFile
in interfaceImportPlugin
- Throws:
java.lang.Exception
-
getInputStream
protected java.io.InputStream getInputStream(java.io.File file) throws java.lang.Exception
This method returns an inputStream for a file. Note that the default implementation returns "new FileInputStream(file);"- Parameters:
file
-- Returns:
- Throws:
java.io.FileNotFoundException
java.lang.Exception
-
importFromStream
protected abstract java.lang.Object importFromStream(PluginContext context, java.io.InputStream input, java.lang.String filename, long fileSizeInBytes) throws java.lang.Exception
This method is called by all plugin variants to do the actual importing.- Parameters:
context
-input
-filename
-fileSizeInBytes
-- Returns:
- Throws:
java.lang.Exception
-
-