public class Cmmn extends Object
Modifier and Type | Field and Description |
---|---|
static Cmmn |
INSTANCE
the singleton instance of
Cmmn . |
Modifier | Constructor and Description |
---|---|
protected |
Cmmn()
Register known types of the Cmmn model
|
public static Cmmn INSTANCE
public static CmmnModelInstance readModelFromFile(File file)
CmmnModelInstance
from a File.file
- the File
to read the CmmnModelInstance
fromCmmnModelException
- if the model cannot be readpublic static CmmnModelInstance readModelFromStream(InputStream stream)
CmmnModelInstance
from an InputStream
stream
- the InputStream
to read the CmmnModelInstance
fromModelParseException
- if the model cannot be readpublic static void writeModelToFile(File file, CmmnModelInstance modelInstance)
CmmnModelInstance
to a File. It will be
validated before writing.file
- the File
to write the CmmnModelInstance
tomodelInstance
- the CmmnModelInstance
to writeCmmnModelException
- if the model cannot be writtenModelValidationException
- if the model is not validpublic static void writeModelToStream(OutputStream stream, CmmnModelInstance modelInstance)
CmmnModelInstance
to an OutputStream
. It will be
validated before writing.stream
- the OutputStream
to write the CmmnModelInstance
tomodelInstance
- the CmmnModelInstance
to writeModelException
- if the model cannot be writtenModelValidationException
- if the model is not validpublic static String convertToString(CmmnModelInstance modelInstance)
CmmnModelInstance
to an String
. It will
be validated before conversion.modelInstance
- the model instance to convertpublic static void validateModel(CmmnModelInstance modelInstance)
modelInstance
- the CmmnModelInstance
to validateModelValidationException
- if the model is not validpublic static CmmnModelInstance createEmptyModel()
CmmnModelInstance
.protected CmmnModelInstance doReadModelFromFile(File file)
protected CmmnModelInstance doReadModelFromInputStream(InputStream is)
protected void doWriteModelToFile(File file, CmmnModelInstance modelInstance)
protected void doWriteModelToOutputStream(OutputStream os, CmmnModelInstance modelInstance)
protected String doConvertToString(CmmnModelInstance modelInstance)
protected void doValidateModel(CmmnModelInstance modelInstance)
protected CmmnModelInstance doCreateEmptyModel()
protected void doRegisterTypes(ModelBuilder modelBuilder)
public ModelBuilder getCmmnModelBuilder()
public void setCmmnModel(Model cmmnModel)
cmmnModel
- the cmmnModel to setCopyright © 2022. All rights reserved.