Class DefaultCommentConverter

  • All Implemented Interfaces:
    ConversionStrategy<org.apache.poi.ss.usermodel.Cell>

    public class DefaultCommentConverter
    extends AbstractConversionStrategy<org.apache.poi.ss.usermodel.Cell>
    Knows how to convert Excel cell comments into html attributes, generally for calling concordion commands. This can add attributes to not only the current HTML element, but parent elements, by prefixing the name in the excel comment.
    • name Adds to the current element
    • ../name Adds to the parent element
    • ../../name Adds to the parent's parent element (and so on)
    • (table)name Adds to the first parent element which is a table tag. (replace table with any tag)
    • /name Adds the attribute to the root element of the HTML doc.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void parseCommentString​(java.lang.String in, org.concordion.ext.excel.conversion.cellcontent.DefaultCommentConverter.Callback c)  
      void process​(org.apache.poi.ss.usermodel.Cell in, HTMLBuilder out)
      We use a regular expression to extract name="value" pairs from the Excel Cell comments.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultCommentConverter

        public DefaultCommentConverter()
    • Method Detail

      • process

        public void process​(org.apache.poi.ss.usermodel.Cell in,
                            HTMLBuilder out)
        We use a regular expression to extract name="value" pairs from the Excel Cell comments. This is because the comments are not always well-formed markup. This is probably going to be a bit unreliable.
      • parseCommentString

        protected void parseCommentString​(java.lang.String in,
                                          org.concordion.ext.excel.conversion.cellcontent.DefaultCommentConverter.Callback c)