Package org.camunda.bpm.model.dmn
Class Dmn
java.lang.Object
org.camunda.bpm.model.dmn.Dmn
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringconvertToString(DmnModelInstance modelInstance) Allows the conversion of aDmnModelInstanceto anString.static DmnModelInstanceAllows creating an new, emptyDmnModelInstance.protected StringdoConvertToString(DmnModelInstance modelInstance) protected DmnModelInstanceprotected DmnModelInstancedoReadModelFromFile(File file) protected DmnModelInstanceprotected voiddoRegisterTypes(ModelBuilder modelBuilder) protected voiddoValidateModel(DmnModelInstance modelInstance) protected voiddoWriteModelToFile(File file, DmnModelInstance modelInstance) protected voiddoWriteModelToOutputStream(OutputStream os, DmnModelInstance modelInstance) static DmnModelInstancereadModelFromFile(File file) Allows reading aDmnModelInstancefrom a File.static DmnModelInstancereadModelFromStream(InputStream stream) Allows reading aDmnModelInstancefrom anInputStreamvoidsetDmnModel(Model dmnModel) static voidvalidateModel(DmnModelInstance modelInstance) Validate model DOM documentstatic voidwriteModelToFile(File file, DmnModelInstance modelInstance) Allows writing aDmnModelInstanceto a File.static voidwriteModelToStream(OutputStream stream, DmnModelInstance modelInstance) Allows writing aDmnModelInstanceto anOutputStream.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
Dmn
protected Dmn()Register known types of the Dmn model
-
-
Method Details
-
readModelFromFile
Allows reading aDmnModelInstancefrom a File.- Parameters:
file- theFileto read theDmnModelInstancefrom- Returns:
- the model read
- Throws:
DmnModelException- if the model cannot be read
-
readModelFromStream
Allows reading aDmnModelInstancefrom anInputStream- Parameters:
stream- theInputStreamto read theDmnModelInstancefrom- Returns:
- the model read
- Throws:
ModelParseException- if the model cannot be read
-
writeModelToFile
Allows writing aDmnModelInstanceto a File. It will be validated before writing.- Parameters:
file- theFileto write theDmnModelInstancetomodelInstance- theDmnModelInstanceto write- Throws:
DmnModelException- if the model cannot be writtenModelValidationException- if the model is not valid
-
writeModelToStream
Allows writing aDmnModelInstanceto anOutputStream. It will be validated before writing.- Parameters:
stream- theOutputStreamto write theDmnModelInstancetomodelInstance- theDmnModelInstanceto write- Throws:
ModelException- if the model cannot be writtenModelValidationException- if the model is not valid
-
convertToString
Allows the conversion of aDmnModelInstanceto 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- theDmnModelInstanceto 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
Modelinstance to use
-
getDmnModelBuilder
-
setDmnModel
- Parameters:
dmnModel- the cmmnModel to set
-