org.processmining.exporting.petrinet.cpnexport
Class CpnExport20

java.lang.Object
  extended by org.processmining.exporting.petrinet.cpnexport.CpnExport20
All Implemented Interfaces:
ExportPlugin, Plugin

public class CpnExport20
extends java.lang.Object
implements ExportPlugin

Exports a given low-level Petri net or a ColoredPetriNet to a coloured Petri net representation that can be read by CPN Tools.

Author:
Anne Rozinat (a.rozinat@tm.tue.nl), Ronny Mans
See Also:
ColoredPetriNet, CpnExportSettings

Constructor Summary
CpnExport20()
           
 
Method Summary
 boolean accepts(ProvidedObject object)
          Determines whether a given object can be exported as a CPN.
 void export(ProvidedObject object, java.io.OutputStream output)
          Triggers the actual export, that is writes the given object as a CPN to the given output stream.
 java.lang.String getFileExtension()
          Specifies the file extension for the exported file.
 java.lang.String getHtmlDescription()
          Provides user documentation for the plug-in.
 java.lang.String getName()
          Specifies the name of the plug-in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CpnExport20

public CpnExport20()
Method Detail

getName

public java.lang.String getName()
Specifies the name of the plug-in. This is used for, e.g., labelling the corresponding menu item or the user documentation page.

Specified by:
getName in interface Plugin
Returns:
the name (and the supported version) of the exported file format

accepts

public boolean accepts(ProvidedObject object)
Determines whether a given object can be exported as a CPN.

Specified by:
accepts in interface ExportPlugin
Parameters:
object - the ProvidedObject which shall be tested for being a valid input to this export plug-in
Returns:
true if the given object is a PetriNet, false otherwise

export

public void export(ProvidedObject object,
                   java.io.OutputStream output)
            throws java.io.IOException
Triggers the actual export, that is writes the given object as a CPN to the given output stream.

Specified by:
export in interface ExportPlugin
Parameters:
object - the ProvidedObject which shall be exported as a CPN
output - the OutputStream specifying the target of the exported file
Throws:
java.io.IOException - in the case a problem is encountered while writing the file

getFileExtension

public java.lang.String getFileExtension()
Specifies the file extension for the exported file.

Specified by:
getFileExtension in interface ExportPlugin
Returns:
the file extension string, that is the part of a file name which is following the "." (fileName.fileExtension)

getHtmlDescription

public java.lang.String getHtmlDescription()
Provides user documentation for the plug-in.

Specified by:
getHtmlDescription in interface Plugin
Returns:
The Html body of the documentation page.