Package org.camunda.bpm.model.dmn
Class Dmn
java.lang.Object
org.camunda.bpm.model.dmn.Dmn
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
convertToString
(DmnModelInstance modelInstance) Allows the conversion of aDmnModelInstance
to anString
.static DmnModelInstance
Allows creating an new, emptyDmnModelInstance
.protected String
doConvertToString
(DmnModelInstance modelInstance) protected DmnModelInstance
protected DmnModelInstance
doReadModelFromFile
(File file) protected DmnModelInstance
protected void
doRegisterTypes
(ModelBuilder modelBuilder) protected void
doValidateModel
(DmnModelInstance modelInstance) protected void
doWriteModelToFile
(File file, DmnModelInstance modelInstance) protected void
doWriteModelToOutputStream
(OutputStream os, DmnModelInstance modelInstance) static DmnModelInstance
readModelFromFile
(File file) Allows reading aDmnModelInstance
from a File.static DmnModelInstance
readModelFromStream
(InputStream stream) Allows reading aDmnModelInstance
from anInputStream
void
setDmnModel
(Model dmnModel) static void
validateModel
(DmnModelInstance modelInstance) Validate model DOM documentstatic void
writeModelToFile
(File file, DmnModelInstance modelInstance) Allows writing aDmnModelInstance
to a File.static void
writeModelToStream
(OutputStream stream, DmnModelInstance modelInstance) Allows writing aDmnModelInstance
to anOutputStream
.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
Dmn
protected Dmn()Register known types of the Dmn model
-
-
Method Details
-
readModelFromFile
Allows reading aDmnModelInstance
from a File.- Parameters:
file
- theFile
to read theDmnModelInstance
from- Returns:
- the model read
- Throws:
DmnModelException
- if the model cannot be read
-
readModelFromStream
Allows reading aDmnModelInstance
from anInputStream
- Parameters:
stream
- theInputStream
to read theDmnModelInstance
from- Returns:
- the model read
- Throws:
ModelParseException
- if the model cannot be read
-
writeModelToFile
Allows writing aDmnModelInstance
to a File. It will be validated before writing.- Parameters:
file
- theFile
to write theDmnModelInstance
tomodelInstance
- theDmnModelInstance
to write- Throws:
DmnModelException
- if the model cannot be writtenModelValidationException
- if the model is not valid
-
writeModelToStream
Allows writing aDmnModelInstance
to anOutputStream
. It will be validated before writing.- Parameters:
stream
- theOutputStream
to write theDmnModelInstance
tomodelInstance
- theDmnModelInstance
to write- Throws:
ModelException
- if the model cannot be writtenModelValidationException
- if the model is not valid
-
convertToString
Allows the conversion of aDmnModelInstance
to anString
. It will be validated before conversion.- Parameters:
modelInstance
- the model instance to convert- Returns:
- the XML string representation of the model instance
-
validateModel
Validate model DOM document- Parameters:
modelInstance
- theDmnModelInstance
to validate- Throws:
ModelValidationException
- if the model is not valid
-
createEmptyModel
Allows creating an new, emptyDmnModelInstance
.- Returns:
- the empty model.
-
doReadModelFromFile
-
doReadModelFromInputStream
-
doWriteModelToFile
-
doWriteModelToOutputStream
-
doConvertToString
-
doValidateModel
-
doCreateEmptyModel
-
doRegisterTypes
-
getDmnModel
- Returns:
- the
Model
instance to use
-
getDmnModelBuilder
-
setDmnModel
- Parameters:
dmnModel
- the cmmnModel to set
-