Package com.independentsoft.office.spreadsheet.extensions

# Class ExtensionContentFactory

java.lang.Object
com.independentsoft.office.spreadsheet.extensions.ExtensionContentFactory

public class ExtensionContentFactory extends Object
Maps the namespace and local name of an extension's child element to a typed model parser. Elements with no registration are preserved as `RawExtensionContent`.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static ExtensionContentFactory`
  `CELL`
  `static ExtensionContentFactory`
  `STYLE_SHEET`
  `static ExtensionContentFactory`
  `WORKBOOK`
  `static ExtensionContentFactory`
  `WORKSHEET`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `IExtensionContent`
  `create​(InternalXMLStreamReader reader)`
  Parses the element the reader is positioned on into a typed model when one is registered, otherwise into a `RawExtensionContent`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### WORKBOOK

    public static final ExtensionContentFactory WORKBOOK

  - ### WORKSHEET

    public static final ExtensionContentFactory WORKSHEET

  - ### STYLE_SHEET

    public static final ExtensionContentFactory STYLE_SHEET

  - ### CELL

    public static final ExtensionContentFactory CELL

- ## Method Details

  - ### create

    public IExtensionContent create​(InternalXMLStreamReader reader) throws XMLStreamException
    Parses the element the reader is positioned on into a typed model when one is registered, otherwise into a `RawExtensionContent`. In both cases the reader is left ON the element's end element, per codebase convention, so the caller's loop advances past it.
    Parameters:
      `reader` - the reader, positioned on the child start element
    Returns:
      the extension content
    Throws:
      `XMLStreamException` - the XML stream exception