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