Package jadex.bpmn.model.io
Class SBpmnModelWriter
java.lang.Object
jadex.bpmn.model.io.SBpmnModelWriter
Writer for BPMN models.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final StringgetIndent(int num) Generates indentation.getPoolActivities(MPool pool) Gets all activities in a pool.static final StringhandleNullStr(String input) Returns an empty string for null and null for an empty string.protected static final voidwriteActivitySemantics(PrintStream out, List<MActivity> activities, String evthandlerref, int baseind, List<MSequenceEdge> seqedges, List<MMessagingEdge> medges, List<MDataEdge> dataedges) Writes the activities of the semantics sections.protected static final voidwriteArguments(PrintStream out, int ind, boolean results, jadex.model.modelinfo.IArgument[] args) Writes the arguments or results.protected static final voidwriteConfigurations(PrintStream out, int ind, MBpmnModel mmodel, jadex.model.modelinfo.ConfigurationInfo[] configurations) Writes the configurations.protected static final voidwriteContextVariables(PrintStream out, int ind, MBpmnModel mmodel) Writes the context variables.protected static final voidwriteImports(PrintStream out, int ind, String[] imports) Writes the imports.protected static final voidWrites the initial XML boiler plate.protected static final voidwriteJadexModelInfo(PrintStream out, int ind, MBpmnModel mmodel) Writes the Jadex-specific model informationprotected static final voidwriteLaneSemantics(PrintStream out, int ind, List<MLane> lanes) Writes the lanes of the semantics sections.protected static final voidwriteMessagingEdgeSemantics(PrintStream out, List<MMessagingEdge> medges, int baseind) Writes the messaging edges of the semantics sections.static final voidwriteModel(File outputfile, MBpmnModel mmodel, IBpmnVisualModelWriter vmodelwriter) Writes a BPMN model.static final voidwriteModel(OutputStream os, MBpmnModel mmodel, IBpmnVisualModelWriter vmodelwriter) Writes a BPMN model.protected static final voidwritePoolExtensions(PrintStream out, int ind, List<MDataEdge> dataedges) Writes the pool extension elements (e.g.protected static final voidwritePoolSemantics(PrintStream out, int ind, List<MPool> pools) Writes the pools of the semantics sections.protected static final voidwriteSequenceEdgeSemantics(PrintStream out, List<MSequenceEdge> seqedges, int baseind) Writes the sequence edges of the semantics sections.protected static final voidwriteSubcomponents(PrintStream out, int ind, jadex.model.modelinfo.SubcomponentTypeInfo[] scti) Writes the subcomponents.
-
Field Details
-
BUILD
public static final int BUILDThe build number- See Also:
-
INDENT_STRING
The indentation string.- See Also:
-
START_EVENT_TAG
Tag for start events.- See Also:
-
INTERMEDIATE_EVENT_TAG
Tag for intermediate events.- See Also:
-
END_EVENT_TAG
Tag for end events.- See Also:
-
ACT_TYPE_MAPPING
Activity type mapping.
-
-
Constructor Details
-
SBpmnModelWriter
public SBpmnModelWriter()
-
-
Method Details
-
writeModel
public static final void writeModel(File outputfile, MBpmnModel mmodel, IBpmnVisualModelWriter vmodelwriter) throws IOException Writes a BPMN model.- Parameters:
outputfile- The output file.mmodel- The BPMN model.vmodelwriter- The visual model writer, can be null.- Throws:
IOException
-
writeModel
public static final void writeModel(OutputStream os, MBpmnModel mmodel, IBpmnVisualModelWriter vmodelwriter) throws IOException Writes a BPMN model.- Parameters:
os- The output stream.mmodel- The BPMN model.vmodelwriter- The visual model writer, can be null.- Throws:
IOException
-
writeInitialBoilerPlate
Writes the initial XML boiler plate.- Parameters:
out- The output.semid- The semantics ID.
-
writeJadexModelInfo
Writes the Jadex-specific model information- Parameters:
out- The output.ind- The indentation level.mmodel- The model.
-
writeImports
Writes the imports.- Parameters:
out- The output.ind- The indentation level.imports- The imports.
-
writeSubcomponents
protected static final void writeSubcomponents(PrintStream out, int ind, jadex.model.modelinfo.SubcomponentTypeInfo[] scti) Writes the subcomponents.- Parameters:
out- The output.ind- The indentation level.scti- The subcomponent type infos.
-
writeArguments
protected static final void writeArguments(PrintStream out, int ind, boolean results, jadex.model.modelinfo.IArgument[] args) Writes the arguments or results.- Parameters:
out- The output.ind- The indentation level.results- Set true for writing results.args- The arguments or results.
-
writeContextVariables
Writes the context variables.- Parameters:
out- The output.ind- The indentation level.mmodel- The BPMN model.
-
writeConfigurations
protected static final void writeConfigurations(PrintStream out, int ind, MBpmnModel mmodel, jadex.model.modelinfo.ConfigurationInfo[] configurations) Writes the configurations.- Parameters:
out- The output.ind- The indentation level.configurations- The configurations.
-
writePoolSemantics
Writes the pools of the semantics sections.- Parameters:
out- The output.ind- The indentation level.pools- The pools.
-
writePoolExtensions
protected static final void writePoolExtensions(PrintStream out, int ind, List<MDataEdge> dataedges) Writes the pool extension elements (e.g. data edges).- Parameters:
out- The output.ind- The indentation level.seqedges- The sequence edges.
-
writeLaneSemantics
Writes the lanes of the semantics sections.- Parameters:
out- The output.ind- The indentation level.lanes- The lanes.
-
writeActivitySemantics
protected static final void writeActivitySemantics(PrintStream out, List<MActivity> activities, String evthandlerref, int baseind, List<MSequenceEdge> seqedges, List<MMessagingEdge> medges, List<MDataEdge> dataedges) Writes the activities of the semantics sections.- Parameters:
out- The output.activities- The activities.
-
writeSequenceEdgeSemantics
protected static final void writeSequenceEdgeSemantics(PrintStream out, List<MSequenceEdge> seqedges, int baseind) Writes the sequence edges of the semantics sections.- Parameters:
out- The output.seqedges- The sequence edges.
-
writeMessagingEdgeSemantics
protected static final void writeMessagingEdgeSemantics(PrintStream out, List<MMessagingEdge> medges, int baseind) Writes the messaging edges of the semantics sections.- Parameters:
out- The output.seqedges- The messaging edges.
-
getPoolActivities
Gets all activities in a pool. TODO: Support nested lanes.- Parameters:
pool- The pool.- Returns:
- The contained activities.
-
getIndent
Generates indentation.- Parameters:
num- The indentation number.- Returns:
- Indentation string.
-
handleNullStr
Returns an empty string for null and null for an empty string.
-