Class Extension
java.lang.Object
com.independentsoft.office.spreadsheet.extensions.Extension
Represents a future-feature data storage area (
ext element) 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
ConstructorsConstructorDescriptionInstantiates a new extension.Extension(InternalXMLStreamReader reader, ExtensionContentFactory factory)Instantiates a new extension.Extension(String uri, IExtensionContent content)Instantiates a new extension. -
Method Summary
-
Constructor Details
-
Extension
public Extension()Instantiates a new extension. -
Extension
Instantiates a new extension.- Parameters:
uri- the URI identifying the extensioncontent- the extension content
-
Extension
public Extension(InternalXMLStreamReader reader, ExtensionContentFactory factory) throws XMLStreamExceptionInstantiates a new extension.Enters positioned ON the
extstart element and leaves positioned ON its end element, so the caller's loop advances past it.- Parameters:
reader- the readerfactory- the content factory mapping child elements to typed models, or null to preserve every child as raw XML- Throws:
XMLStreamException- the XML stream exception
-
-
Method Details
-
clone
-
toString
-
getUri
Gets the URI identifying the extension.- Returns:
- the uri
-
setUri
Sets the URI identifying the extension.- Parameters:
uri- the new uri
-
getContents
Gets the extension contents. An extension typically holds exactly one child element.- Returns:
- the contents
-
getContent
Gets the first extension content, or null when the extension is empty.- Returns:
- the content
-