public class PnmlExport extends AbstractPnmlImportExport
This class is used for exporting a PNMLDocument object into a PNML file.
This class is open for extension.
log, newTypeFilePath
Constructor and Description |
---|
PnmlExport() |
PnmlExport(String filepath) |
Modifier and Type | Method and Description |
---|---|
static List<byte[]> |
chopBytes(byte[] src,
int len)
Chops a big byte array into chunks of the max size the specified length.
|
void |
exportObject(org.eclipse.emf.ecore.EObject object,
String filepath)
Same as
exportObject(HLAPIClass, String) but this time using a
root class (PetriNetDoc) typed as an EMF's EObject (native). |
void |
exportObject(org.eclipse.emf.ecore.EObject object,
String filepath,
boolean usePrettyPrint)
Same as
exportObject(HLAPIClass, String, boolean) but this using
a root class (PetriNetDoc) typed as an EMF's EObject (native). |
void |
exportObject(HLAPIClass object,
String filepath)
Creates a PNML file from a PetriNetDocHLAPI object.
|
void |
exportObject(HLAPIClass object,
String filepath,
boolean usePrettyPrint)
Creates a PNML file from a PetriNetDocHLAPI object.
|
disableGrammarValidation, disableOclChecking, enableGrammarValidation, enableOclChecking, isCheckOclEnabled, isGrammarValidationEnabled, oclChecking, rngGrammarValidation
public PnmlExport()
public PnmlExport(String filepath)
filepath
- the path to the custom plug in registration filepublic final void exportObject(HLAPIClass object, String filepath) throws UnhandledNetType, OCLValidationFailed, IOException, ValidationFailedException, BadFileFormatException, OtherException
ModelRepository
pretty printing
status.object
- the object to export.filepath
- the file path.UnhandledNetType
- if the net type is unknown.OCLValidationFailed
- if an ocl violation is detected.IOException
- if a problem occur with file.ValidationFailedException
- if the validation fail.OtherException
- .BadFileFormatException
- .public final void exportObject(HLAPIClass object, String filepath, boolean usePrettyPrint) throws UnhandledNetType, OCLValidationFailed, IOException, ValidationFailedException, BadFileFormatException, OtherException
object
- the object to export.filepath
- the file path.usePrettyPrint
- true if you want to use pretty print, false either.UnhandledNetType
- if the net type is unknown.OCLValidationFailed
- if an ocl violation is detected.IOException
- if a problem occur with file.ValidationFailedException
- if the validation fail.OtherException
- .BadFileFormatException
- .exportObject(HLAPIClass, String)
public void exportObject(org.eclipse.emf.ecore.EObject object, String filepath) throws UnhandledNetType, OCLValidationFailed, IOException, ValidationFailedException, BadFileFormatException, OtherException, InvocationFailedException
exportObject(HLAPIClass, String)
but this time using a
root class (PetriNetDoc) typed as an EMF's EObject (native).object
- filepath
- UnhandledNetType
OCLValidationFailed
IOException
ValidationFailedException
BadFileFormatException
OtherException
InvocationFailedException
exportObject(HLAPIClass, String)
public void exportObject(org.eclipse.emf.ecore.EObject object, String filepath, boolean usePrettyPrint) throws UnhandledNetType, OCLValidationFailed, IOException, ValidationFailedException, BadFileFormatException, OtherException, InvocationFailedException
exportObject(HLAPIClass, String, boolean)
but this using
a root class (PetriNetDoc) typed as an EMF's EObject (native). The
prettyPrinting is used according to the modelRepository pretty printing
status.object
- filepath
- usePrettyPrint
- UnhandledNetType
OCLValidationFailed
IOException
ValidationFailedException
BadFileFormatException
OtherException
InvocationFailedException
exportObject(EObject, String)
public static List<byte[]> chopBytes(byte[] src, int len)
src
- len
- Copyright © 2009–2016 Univ. Paris Ouest, and Univ. Pierre et Marie Curie / CNRS UMR 7606 (LIP6). All rights reserved.