@Test public void testMetadata() { final ConversionResult result = new ConversionResult(); final List<DataListener> listeners = new ArrayList<DataListener>(); final GuidedDecisionTableGeneratorListener listener = new GuidedDecisionTableGeneratorListener(result, dmo); listeners.add(listener); final ExcelParser parser = new ExcelParser(listeners); final InputStream is = this.getClass().getResourceAsStream("Metadata.xls"); try { parser.parseFile(is); } finally { try { is.close(); } catch (IOException ioe) { fail(ioe.getMessage()); } } assertEquals(0, result.getMessages().size()); List<GuidedDecisionTable52> dtables = listener.getGuidedDecisionTables(); assertNotNull(dtables); assertEquals(1, dtables.size()); GuidedDecisionTable52 dtable = dtables.get(0); assertEquals("MetadataTest", dtable.getTableName()); assertEquals(GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY, dtable.getTableFormat()); List<BaseColumn> columns = dtable.getExpandedColumns(); assertNotNull(columns); assertEquals(4, columns.size()); assertTrue(columns.get(0) instanceof RowNumberCol52); assertTrue(columns.get(1) instanceof RuleNameColumn); assertTrue(columns.get(2) instanceof DescriptionCol52); assertTrue(columns.get(3) instanceof MetadataCol52); MetadataCol52 mdCol2 = ((MetadataCol52) columns.get(3)); assertEquals("cheese", mdCol2.getMetadata()); assertEquals(2, dtable.getData().size()); assertTrue(isRowEquivalent(new Object[]{1, "", "Rule 1", "cheddar"}, dtable.getData().get(0))); assertTrue(isRowEquivalent(new Object[]{2, "", "Rule 2", "edam"}, dtable.getData().get(1))); }
public List<GuidedDecisionTable52> getGuidedDecisionTables() { return _dtables; }
GuidedDecisionTableGeneratorListener implements
        RuleSheetListener { public List<GuidedDecisionTable52> getGuidedDecisionTables() { return _dtables; } }
GuidedDecisionTableGeneratorListener implements
        RuleSheetListener { public List<GuidedDecisionTable52> getGuidedDecisionTables() { return _dtables; } GuidedDecisionTableGeneratorListener(final ConversionResult conversionResult,
                                                final PackageDataModelOracle _dmo); }
GuidedDecisionTableGeneratorListener implements
        RuleSheetListener { public List<GuidedDecisionTable52> getGuidedDecisionTables() { return _dtables; } GuidedDecisionTableGeneratorListener(final ConversionResult conversionResult,
                                                final PackageDataModelOracle _dmo); CaseInsensitiveMap getProperties(); Package getRuleSet(); List<Import> getImports(); List<Global> getGlobals(); List<String> getFunctions(); List<String> getQueries(); List<String> getTypeDeclarations(); List<GuidedDecisionTable52> getGuidedDecisionTables(); void startSheet(final String name); void finishSheet(); void newRow(final int rowNumber,
                       final int columns); void newCell(final int row,
                        final int column,
                        final String value,
                        int mergedColStart); }
GuidedDecisionTableGeneratorListener implements
        RuleSheetListener { public List<GuidedDecisionTable52> getGuidedDecisionTables() { return _dtables; } GuidedDecisionTableGeneratorListener(final ConversionResult conversionResult,
                                                final PackageDataModelOracle _dmo); CaseInsensitiveMap getProperties(); Package getRuleSet(); List<Import> getImports(); List<Global> getGlobals(); List<String> getFunctions(); List<String> getQueries(); List<String> getTypeDeclarations(); List<GuidedDecisionTable52> getGuidedDecisionTables(); void startSheet(final String name); void finishSheet(); void newRow(final int rowNumber,
                       final int columns); void newCell(final int row,
                        final int column,
                        final String value,
                        int mergedColStart);  }