Class PropertiesSheetListener
java.lang.Object
org.drools.decisiontable.parser.xls.PropertiesSheetListener
- All Implemented Interfaces:
DataListener
Reads an Excel sheet as key-value properties.
Treats the first non-empty cell on a row as a key and any subsequent
non-empty cell as a value. Any cells defined after the second cell are
ignored as comments.
Could be easily adapted to accept multiple values per key but the semantics
were kept in line with Properties.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.drools.template.parser.DataListener
NON_MERGED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidReturn the key value pairs.voidvoidnewRow(int rowNumber, int columns) Enter a new row.voidstartSheet(String name)
-
Constructor Details
-
PropertiesSheetListener
public PropertiesSheetListener()
-
-
Method Details
-
getProperties
Return the key value pairs. If this is called before the sheet is finished, then it will build the properties map with what is known. Subsequent calls will update the properties map.- Returns:
- properties
-
startSheet
- Specified by:
startSheetin interfaceDataListener
-
finishSheet
public void finishSheet()- Specified by:
finishSheetin interfaceDataListener
-
newRow
public void newRow(int rowNumber, int columns) Enter a new row. This is ignored.- Specified by:
newRowin interfaceDataListener- Parameters:
rowNumber- The row number.columns- The Colum number.
-
newCell
- Specified by:
newCellin interfaceDataListener
-