Package jadex.bpmn.model.io
Class SBpmnModelWriter
- java.lang.Object
- 
- jadex.bpmn.model.io.SBpmnModelWriter
 
- 
 public class SBpmnModelWriter extends java.lang.ObjectWriter for BPMN models.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.util.Map<java.lang.String,java.lang.String>ACT_TYPE_MAPPINGActivity type mapping.static intBUILDThe build numberstatic java.lang.StringEND_EVENT_TAGTag for end events.static java.lang.StringINDENT_STRINGThe indentation string.static java.lang.StringINTERMEDIATE_EVENT_TAGTag for intermediate events.static java.lang.StringSTART_EVENT_TAGTag for start events.
 - 
Constructor SummaryConstructors Constructor Description SBpmnModelWriter()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetIndent(int num)Generates indentation.static java.util.List<MActivity>getPoolActivities(MPool pool)Gets all activities in a pool.static java.lang.StringhandleNullStr(java.lang.String input)Returns an empty string for null and null for an empty string.protected static voidwriteActivitySemantics(java.io.PrintStream out, java.util.List<MActivity> activities, java.lang.String evthandlerref, int baseind, java.util.List<MSequenceEdge> seqedges, java.util.List<MMessagingEdge> medges, java.util.List<MDataEdge> dataedges)Writes the activities of the semantics sections.protected static voidwriteArguments(java.io.PrintStream out, int ind, boolean results, IArgument[] args)Writes the arguments or results.protected static voidwriteConfigurations(java.io.PrintStream out, int ind, MBpmnModel mmodel, ConfigurationInfo[] configurations)Writes the configurations.protected static voidwriteContextVariables(java.io.PrintStream out, int ind, MBpmnModel mmodel)Writes the context variables.protected static voidwriteImports(java.io.PrintStream out, int ind, java.lang.String[] imports)Writes the imports.protected static voidwriteInitialBoilerPlate(java.io.PrintStream out)Writes the initial XML boiler plate.protected static voidwriteJadexModelInfo(java.io.PrintStream out, int ind, MBpmnModel mmodel)Writes the Jadex-specific model informationprotected static voidwriteLaneSemantics(java.io.PrintStream out, int ind, java.util.List<MLane> lanes)Writes the lanes of the semantics sections.protected static voidwriteMessagingEdgeSemantics(java.io.PrintStream out, java.util.List<MMessagingEdge> medges, int baseind)Writes the messaging edges of the semantics sections.static voidwriteModel(java.io.File outputfile, MBpmnModel mmodel, IBpmnVisualModelWriter vmodelwriter)Writes a BPMN model.static voidwriteModel(java.io.OutputStream os, MBpmnModel mmodel, IBpmnVisualModelWriter vmodelwriter)Writes a BPMN model.protected static voidwritePoolExtensions(java.io.PrintStream out, int ind, java.util.List<MDataEdge> dataedges)Writes the pool extension elements (e.g.protected static voidwritePoolSemantics(java.io.PrintStream out, int ind, java.util.List<MPool> pools)Writes the pools of the semantics sections.protected static voidwriteProvidedServices(java.io.PrintStream out, int ind, MBpmnModel mmodel)Writes the provided services.protected static voidwriteRequiredServices(java.io.PrintStream out, int ind, MBpmnModel mmodel)Writes the required services.protected static voidwriteSequenceEdgeSemantics(java.io.PrintStream out, java.util.List<MSequenceEdge> seqedges, int baseind)Writes the sequence edges of the semantics sections.protected static voidwriteSubcomponents(java.io.PrintStream out, int ind, SubcomponentTypeInfo[] scti)Writes the subcomponents.
 
- 
- 
- 
Field Detail- 
BUILDpublic static final int BUILD The build number- See Also:
- Constant Field Values
 
 - 
INDENT_STRINGpublic static final java.lang.String INDENT_STRING The indentation string.- See Also:
- Constant Field Values
 
 - 
START_EVENT_TAGpublic static final java.lang.String START_EVENT_TAG Tag for start events.- See Also:
- Constant Field Values
 
 - 
INTERMEDIATE_EVENT_TAGpublic static final java.lang.String INTERMEDIATE_EVENT_TAG Tag for intermediate events.- See Also:
- Constant Field Values
 
 - 
END_EVENT_TAGpublic static final java.lang.String END_EVENT_TAG Tag for end events.- See Also:
- Constant Field Values
 
 - 
ACT_TYPE_MAPPINGpublic static final java.util.Map<java.lang.String,java.lang.String> ACT_TYPE_MAPPING Activity type mapping.
 
- 
 - 
Method Detail- 
writeModelpublic static final void writeModel(java.io.File outputfile, MBpmnModel mmodel, IBpmnVisualModelWriter vmodelwriter) throws java.io.IOExceptionWrites a BPMN model.- Parameters:
- outputfile- The output file.
- mmodel- The BPMN model.
- vmodelwriter- The visual model writer, can be null.
- Throws:
- java.io.IOException
 
 - 
writeModelpublic static final void writeModel(java.io.OutputStream os, MBpmnModel mmodel, IBpmnVisualModelWriter vmodelwriter) throws java.io.IOExceptionWrites a BPMN model.- Parameters:
- os- The output stream.
- mmodel- The BPMN model.
- vmodelwriter- The visual model writer, can be null.
- Throws:
- java.io.IOException
 
 - 
writeInitialBoilerPlateprotected static final void writeInitialBoilerPlate(java.io.PrintStream out) Writes the initial XML boiler plate.- Parameters:
- out- The output.
- semid- The semantics ID.
 
 - 
writeJadexModelInfoprotected static final void writeJadexModelInfo(java.io.PrintStream out, int ind, MBpmnModel mmodel)Writes the Jadex-specific model information- Parameters:
- out- The output.
- ind- The indentation level.
- mmodel- The model.
 
 - 
writeImportsprotected static final void writeImports(java.io.PrintStream out, int ind, java.lang.String[] imports)Writes the imports.- Parameters:
- out- The output.
- ind- The indentation level.
- imports- The imports.
 
 - 
writeSubcomponentsprotected static final void writeSubcomponents(java.io.PrintStream out, int ind, SubcomponentTypeInfo[] scti)Writes the subcomponents.- Parameters:
- out- The output.
- ind- The indentation level.
- scti- The subcomponent type infos.
 
 - 
writeArgumentsprotected static final void writeArguments(java.io.PrintStream out, int ind, boolean results, 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.
 
 - 
writeContextVariablesprotected static final void writeContextVariables(java.io.PrintStream out, int ind, MBpmnModel mmodel)Writes the context variables.- Parameters:
- out- The output.
- ind- The indentation level.
- mmodel- The BPMN model.
 
 - 
writeProvidedServicesprotected static final void writeProvidedServices(java.io.PrintStream out, int ind, MBpmnModel mmodel)Writes the provided services.- Parameters:
- out- The output.
- mmodel- The BPMN model.
 
 - 
writeRequiredServicesprotected static final void writeRequiredServices(java.io.PrintStream out, int ind, MBpmnModel mmodel)Writes the required services.- Parameters:
- out- The output.
- mmodel- The BPMN model.
 
 - 
writeConfigurationsprotected static final void writeConfigurations(java.io.PrintStream out, int ind, MBpmnModel mmodel, ConfigurationInfo[] configurations)Writes the configurations.- Parameters:
- out- The output.
- ind- The indentation level.
- configurations- The configurations.
 
 - 
writePoolSemanticsprotected static final void writePoolSemantics(java.io.PrintStream out, int ind, java.util.List<MPool> pools)Writes the pools of the semantics sections.- Parameters:
- out- The output.
- ind- The indentation level.
- pools- The pools.
 
 - 
writePoolExtensionsprotected static final void writePoolExtensions(java.io.PrintStream out, int ind, java.util.List<MDataEdge> dataedges)Writes the pool extension elements (e.g. data edges).- Parameters:
- out- The output.
- ind- The indentation level.
- seqedges- The sequence edges.
 
 - 
writeLaneSemanticsprotected static final void writeLaneSemantics(java.io.PrintStream out, int ind, java.util.List<MLane> lanes)Writes the lanes of the semantics sections.- Parameters:
- out- The output.
- ind- The indentation level.
- lanes- The lanes.
 
 - 
writeActivitySemanticsprotected static final void writeActivitySemantics(java.io.PrintStream out, java.util.List<MActivity> activities, java.lang.String evthandlerref, int baseind, java.util.List<MSequenceEdge> seqedges, java.util.List<MMessagingEdge> medges, java.util.List<MDataEdge> dataedges)Writes the activities of the semantics sections.- Parameters:
- out- The output.
- activities- The activities.
 
 - 
writeSequenceEdgeSemanticsprotected static final void writeSequenceEdgeSemantics(java.io.PrintStream out, java.util.List<MSequenceEdge> seqedges, int baseind)Writes the sequence edges of the semantics sections.- Parameters:
- out- The output.
- seqedges- The sequence edges.
 
 - 
writeMessagingEdgeSemanticsprotected static final void writeMessagingEdgeSemantics(java.io.PrintStream out, java.util.List<MMessagingEdge> medges, int baseind)Writes the messaging edges of the semantics sections.- Parameters:
- out- The output.
- seqedges- The messaging edges.
 
 - 
getPoolActivitiespublic static final java.util.List<MActivity> getPoolActivities(MPool pool) Gets all activities in a pool. TODO: Support nested lanes.- Parameters:
- pool- The pool.
- Returns:
- The contained activities.
 
 - 
getIndentpublic static final java.lang.String getIndent(int num) Generates indentation.- Parameters:
- num- The indentation number.
- Returns:
- Indentation string.
 
 - 
handleNullStrpublic static final java.lang.String handleNullStr(java.lang.String input) Returns an empty string for null and null for an empty string.
 
- 
 
-