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(org.camunda.bpm.model.xml.ModelBuilder modelBuilder) protected voiddoValidateModel(DmnModelInstance modelInstance) protected voiddoWriteModelToFile(File file, DmnModelInstance modelInstance) protected voiddoWriteModelToOutputStream(OutputStream os, DmnModelInstance modelInstance) org.camunda.bpm.model.xml.Modelorg.camunda.bpm.model.xml.ModelBuilderstatic DmnModelInstancereadModelFromFile(File file) Allows reading aDmnModelInstancefrom a File.static DmnModelInstancereadModelFromStream(InputStream stream) Allows reading aDmnModelInstancefrom anInputStreamvoidsetDmnModel(org.camunda.bpm.model.xml.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:
org.camunda.bpm.model.xml.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 writtenorg.camunda.bpm.model.xml.ModelValidationException- 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:
org.camunda.bpm.model.xml.ModelException- if the model cannot be writtenorg.camunda.bpm.model.xml.ModelValidationException- 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:
org.camunda.bpm.model.xml.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
protected void doRegisterTypes(org.camunda.bpm.model.xml.ModelBuilder modelBuilder) -
getDmnModel
public org.camunda.bpm.model.xml.Model getDmnModel()- Returns:
- the
Modelinstance to use
-
getDmnModelBuilder
public org.camunda.bpm.model.xml.ModelBuilder getDmnModelBuilder() -
setDmnModel
public void setDmnModel(org.camunda.bpm.model.xml.Model dmnModel) - Parameters:
dmnModel- the cmmnModel to set
-