Package com.independentsoft.office.drawing

# Class Extension

java.lang.Object
com.independentsoft.office.drawing.Extension

public class Extension extends Object
Represents a single extension element (`a:ext` / `c:ext`) inside an `ExtensionList`: a `uri` that identifies the extension and its content. Known content elements parse into typed `IExtensionContent` classes; anything unrecognized is preserved through `RawExtensionContent`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Extension()`
  Instantiates a new extension.
  `Extension​(InternalXMLStreamReader reader)`
  Instantiates a new extension.
  `Extension​(String uri)`
  Instantiates a new extension.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Extension`
  `clone()`
  `List<IExtensionContent>`
  `getContent()`
  Gets the content of this extension.
  `String`
  `getUri()`
  Gets the extension identifier (the `uri` attribute).
  `void`
  `setUri​(String uri)`
  Sets the extension identifier (the `uri` attribute).
  `String`
  `toString()`
  `String`
  `toXml​(String qualifiedName)`
  To xml.

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

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

- ## Constructor Details

  - ### Extension

    public Extension()
    Instantiates a new extension.

  - ### Extension

    public Extension​(String uri)
    Instantiates a new extension.
    Parameters:
      `uri` - the extension identifier

  - ### Extension

    public Extension​(InternalXMLStreamReader reader) throws XMLStreamException
    Instantiates a new extension.
    Parameters:
      `reader` - the reader
    Throws:
      `XMLStreamException` - the XML stream exception

- ## Method Details

  - ### clone

    public Extension clone()
    Overrides:
      `clone` in class `Object`

  - ### toXml

    public String toXml​(String qualifiedName)
    To xml.
    Parameters:
      `qualifiedName` - the qualified element name to emit
    Returns:
      the string

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### getUri

    public String getUri()
    Gets the extension identifier (the `uri` attribute).
    Returns:
      the uri

  - ### setUri

    public void setUri​(String uri)
    Sets the extension identifier (the `uri` attribute).
    Parameters:
      `uri` - the new uri

  - ### getContent

    public List<IExtensionContent> getContent()
    Gets the content of this extension. Known extensions are typed (for example `DataModelExtension`); unrecognized content is a `RawExtensionContent`.
    Returns:
      the content