procope.data.petrinets
Class ToPNetGenerator

java.lang.Object
  extended by procope.data.petrinets.ToPNetGenerator

public class ToPNetGenerator
extends Object

Converts a Petri net to a ToPNet .places and .interactions file pair.

Note: This method will only work with the Petri nets generated by PetriNetCreator. ToPNet does not support labelled edges and certain attribute types which thus require special handling.

Author:
Jan Krumsiek
See Also:
PetriNetCreator

Constructor Summary
ToPNetGenerator()
           
 
Method Summary
static void convertToToPNet(File petrinet, File topnetPlaces, File topnetInteractions)
          Converts a given Petri net to ToPNet places and transitions
static void convertToToPNet(File petrinet, File topnetPlaces, File topnetInteractions, boolean additionalAnnotations)
          Converts a given Petri net to ToPNet places and transitions
static void convertToToPNet(InputStream petrinet, OutputStream topnetPlaces, OutputStream topnetInteractions)
          Converts a given Petri net to ToPNet places and transitions
static void convertToToPNet(InputStream petrinet, OutputStream topnetPlaces, OutputStream topnetInteractions, boolean additionalAnnotations)
          Converts a given Petri net to ToPNet places and transitions
static void convertToToPNet(String petrinet, String topnetPlaces, String topnetInteractions)
          Converts a given Petri net to ToPNet places and transitions
static void convertToToPNet(String petrinet, String topnetPlaces, String topnetInteractions, boolean additionalAnnotations)
          Converts a given Petri net to ToPNet places and transitions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToPNetGenerator

public ToPNetGenerator()
Method Detail

convertToToPNet

public static void convertToToPNet(String petrinet,
                                   String topnetPlaces,
                                   String topnetInteractions)
                            throws IOException
Converts a given Petri net to ToPNet places and transitions

Parameters:
petrinet - Petri net input file
topnetPlaces - ToPNet .places output file
topnetInteractions - ToPNet .interactions output file
Throws:
IOException - if an input/output error occured

convertToToPNet

public static void convertToToPNet(String petrinet,
                                   String topnetPlaces,
                                   String topnetInteractions,
                                   boolean additionalAnnotations)
                            throws IOException
Converts a given Petri net to ToPNet places and transitions

Parameters:
petrinet - Petri net input file
topnetPlaces - ToPNet .places output file
topnetInteractions - ToPNet .interactions output file
additionalAnnotations - flag defining whether any non-ToPNet-compatible annotations will be written to the output - this does not affect the actual ToPNet behaviour but might be used in further versions or plugins
Throws:
IOException - if an input/output error occured

convertToToPNet

public static void convertToToPNet(File petrinet,
                                   File topnetPlaces,
                                   File topnetInteractions)
                            throws IOException
Converts a given Petri net to ToPNet places and transitions

Parameters:
petrinet - Petri net input file
topnetPlaces - ToPNet .places output file
topnetInteractions - ToPNet .interactions output file
Throws:
IOException - if an input/output error occured

convertToToPNet

public static void convertToToPNet(File petrinet,
                                   File topnetPlaces,
                                   File topnetInteractions,
                                   boolean additionalAnnotations)
                            throws IOException
Converts a given Petri net to ToPNet places and transitions

Parameters:
petrinet - Petri net input file
topnetPlaces - ToPNet .places output file
topnetInteractions - ToPNet .interactions output file
additionalAnnotations - flag defining whether any non-ToPNet-compatible annotations will be written to the output - this does not affect the actual ToPNet behaviour but might be used in further versions or plugins
Throws:
IOException - if an input/output error occured

convertToToPNet

public static void convertToToPNet(InputStream petrinet,
                                   OutputStream topnetPlaces,
                                   OutputStream topnetInteractions)
Converts a given Petri net to ToPNet places and transitions

Parameters:
petrinet - inputstream to the Petri net
topnetPlaces - output stream to the ToPNet .places file
topnetInteractions - output stream to the ToPNet .interactions file

convertToToPNet

public static void convertToToPNet(InputStream petrinet,
                                   OutputStream topnetPlaces,
                                   OutputStream topnetInteractions,
                                   boolean additionalAnnotations)
Converts a given Petri net to ToPNet places and transitions

Parameters:
petrinet - inputstream to the Petri net
topnetPlaces - output stream to the ToPNet .places file
topnetInteractions - output stream to the ToPNet .interactions file
additionalAnnotations - flag defining whether any non-ToPNet-compatible annotations will be written to the output - this does not affect the actual ToPNet behaviour but might be used in further versions or plugins