Class XlsxWorksheetConverter


  • public class XlsxWorksheetConverter
    extends Object
    Converter for XLSX worksheets to DMN 1.1 decision tables.
    Author:
    Thorben Lindhauer, Holger Hagen
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.camunda.bpm.dmn.xlsx.DmnConversionContext dmnConversionContext  
      protected org.camunda.bpm.dmn.xlsx.api.SpreadsheetAdapter spreadsheetAdapter  
      protected org.camunda.bpm.dmn.xlsx.XlsxWorksheetContext worksheetContext  
    • Constructor Summary

      Constructors 
      Constructor Description
      XlsxWorksheetConverter​(org.camunda.bpm.dmn.xlsx.XlsxWorksheetContext worksheetContext, org.camunda.bpm.dmn.xlsx.api.SpreadsheetAdapter spreadsheetAdapter)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.camunda.bpm.model.dmn.DmnModelInstance convert​(StringBuilder serializedRules)  
      protected void convertInputsOutputs​(org.camunda.bpm.model.dmn.DmnModelInstance dmnModel, org.camunda.bpm.model.dmn.instance.DecisionTable decisionTable)  
      protected void convertRule​(org.camunda.bpm.model.dmn.DmnModelInstance dmnModel, org.camunda.bpm.model.dmn.instance.DecisionTable decisionTable, org.camunda.bpm.dmn.xlsx.api.SpreadsheetRow ruleRow, StringBuilder serializedRules)  
      protected void convertRules​(org.camunda.bpm.model.dmn.DmnModelInstance dmnModel, org.camunda.bpm.model.dmn.instance.DecisionTable decisionTable, List<org.camunda.bpm.dmn.xlsx.api.SpreadsheetRow> rulesRows, StringBuilder serializedRules)  
      protected org.camunda.bpm.model.dmn.instance.Description generateDescription​(org.camunda.bpm.model.dmn.DmnModelInstance dmnModel, String content)  
      <E extends org.camunda.bpm.model.dmn.instance.DmnElement>
      E
      generateElement​(org.camunda.bpm.model.dmn.DmnModelInstance modelInstance, Class<E> elementClass)  
      <E extends org.camunda.bpm.model.dmn.instance.DmnElement>
      E
      generateElement​(org.camunda.bpm.model.dmn.DmnModelInstance modelInstance, Class<E> elementClass, String id)  
      <E extends org.camunda.bpm.model.dmn.instance.NamedElement>
      E
      generateNamedElement​(org.camunda.bpm.model.dmn.DmnModelInstance modelInstance, Class<E> elementClass, String name)  
      protected org.camunda.bpm.model.dmn.instance.Text generateText​(org.camunda.bpm.model.dmn.DmnModelInstance dmnModel, String content)  
      protected String getDefaultCellContent()  
      protected org.camunda.bpm.model.dmn.DmnModelInstance initializeEmptyDmnModel()  
      protected void serializeRuleToStringBuilder​(org.camunda.bpm.model.dmn.instance.Rule rule, org.camunda.bpm.dmn.xlsx.api.SpreadsheetRow ruleRow, org.camunda.bpm.model.dmn.instance.Description description, StringBuilder serializedRules)  
      protected void setHitPolicy​(org.camunda.bpm.model.dmn.instance.DecisionTable decisionTable)  
    • Field Detail

      • worksheetContext

        protected org.camunda.bpm.dmn.xlsx.XlsxWorksheetContext worksheetContext
      • dmnConversionContext

        protected org.camunda.bpm.dmn.xlsx.DmnConversionContext dmnConversionContext
      • spreadsheetAdapter

        protected org.camunda.bpm.dmn.xlsx.api.SpreadsheetAdapter spreadsheetAdapter
    • Constructor Detail

      • XlsxWorksheetConverter

        public XlsxWorksheetConverter​(org.camunda.bpm.dmn.xlsx.XlsxWorksheetContext worksheetContext,
                                      org.camunda.bpm.dmn.xlsx.api.SpreadsheetAdapter spreadsheetAdapter)
    • Method Detail

      • convert

        public org.camunda.bpm.model.dmn.DmnModelInstance convert​(StringBuilder serializedRules)
      • generateNamedElement

        public <E extends org.camunda.bpm.model.dmn.instance.NamedElement> E generateNamedElement​(org.camunda.bpm.model.dmn.DmnModelInstance modelInstance,
                                                                                                  Class<E> elementClass,
                                                                                                  String name)
      • generateElement

        public <E extends org.camunda.bpm.model.dmn.instance.DmnElement> E generateElement​(org.camunda.bpm.model.dmn.DmnModelInstance modelInstance,
                                                                                           Class<E> elementClass,
                                                                                           String id)
      • generateElement

        public <E extends org.camunda.bpm.model.dmn.instance.DmnElement> E generateElement​(org.camunda.bpm.model.dmn.DmnModelInstance modelInstance,
                                                                                           Class<E> elementClass)
      • setHitPolicy

        protected void setHitPolicy​(org.camunda.bpm.model.dmn.instance.DecisionTable decisionTable)
      • convertInputsOutputs

        protected void convertInputsOutputs​(org.camunda.bpm.model.dmn.DmnModelInstance dmnModel,
                                            org.camunda.bpm.model.dmn.instance.DecisionTable decisionTable)
      • convertRules

        protected void convertRules​(org.camunda.bpm.model.dmn.DmnModelInstance dmnModel,
                                    org.camunda.bpm.model.dmn.instance.DecisionTable decisionTable,
                                    List<org.camunda.bpm.dmn.xlsx.api.SpreadsheetRow> rulesRows,
                                    StringBuilder serializedRules)
      • convertRule

        protected void convertRule​(org.camunda.bpm.model.dmn.DmnModelInstance dmnModel,
                                   org.camunda.bpm.model.dmn.instance.DecisionTable decisionTable,
                                   org.camunda.bpm.dmn.xlsx.api.SpreadsheetRow ruleRow,
                                   StringBuilder serializedRules)
      • serializeRuleToStringBuilder

        protected void serializeRuleToStringBuilder​(org.camunda.bpm.model.dmn.instance.Rule rule,
                                                    org.camunda.bpm.dmn.xlsx.api.SpreadsheetRow ruleRow,
                                                    org.camunda.bpm.model.dmn.instance.Description description,
                                                    StringBuilder serializedRules)
      • getDefaultCellContent

        protected String getDefaultCellContent()
      • initializeEmptyDmnModel

        protected org.camunda.bpm.model.dmn.DmnModelInstance initializeEmptyDmnModel()
      • generateText

        protected org.camunda.bpm.model.dmn.instance.Text generateText​(org.camunda.bpm.model.dmn.DmnModelInstance dmnModel,
                                                                       String content)
      • generateDescription

        protected org.camunda.bpm.model.dmn.instance.Description generateDescription​(org.camunda.bpm.model.dmn.DmnModelInstance dmnModel,
                                                                                     String content)