Class CharacterCount

java.lang.Object
com.independentsoft.office.odf.fields.Field
com.independentsoft.office.odf.fields.CharacterCount
All Implemented Interfaces:
IContentElement, IParagraphContent

public class CharacterCount extends Field
Specifies the number of characters that an OpenDocument producer has counted for a document.
  • Constructor Details

    • CharacterCount

      public CharacterCount()
      Initializes a new instance of the CharacterCount class.
    • CharacterCount

      public CharacterCount(InternalXMLStreamReader reader) throws XMLStreamException
      Instantiates a new character count.
      Parameters:
      reader - the reader
      Throws:
      XMLStreamException - the xML stream exception
  • Method Details

    • getContentElements

      public List<IContentElement> getContentElements()
      Returns all content elements.
      Specified by:
      getContentElements in interface IContentElement
      Specified by:
      getContentElements in class Field
      Returns:
      A collection of content elements.
    • getParent

      public IContentElement getParent()
      Returns the parent content element.
      Specified by:
      getParent in interface IContentElement
      Overrides:
      getParent in class Field
      Returns:
      the parent
    • setParent

      public void setParent(IContentElement parent)
      Sets the parent content element.
      Specified by:
      setParent in interface IContentElement
      Overrides:
      setParent in class Field
      Parameters:
      parent - the new parent
    • clone

      public CharacterCount clone()
      Creates a new object that is a deep copy of the current instance.
      Specified by:
      clone in interface IContentElement
      Specified by:
      clone in interface IParagraphContent
      Specified by:
      clone in class Field
      Returns:
      A new object that is a copy of this instance.
    • toString

      public String toString()
      Converts the value of the current CharacterCount object to its equivalent string representation.
      Overrides:
      toString in class Object
      Returns:
      the string
    • getNumberFormat

      public String getNumberFormat()
      Specifies the numbering sequence. The defined values are: - 1: Hindu-Arabic number sequence starts with 1. - a: number sequence of lowercase Modern Latin basic alphabet characters starts with "a". - A: number sequence of uppercase Modern Latin basic alphabet characters starts with "A". - i: number sequence of lowercase Roman numerals starts with "i". - I: number sequence of uppercase Roman numerals start with "I".
      Returns:
      the number format
    • setNumberFormat

      public void setNumberFormat(String numberFormat)
      Specifies the numbering sequence. The defined values are: - 1: Hindu-Arabic number sequence starts with 1. - a: number sequence of lowercase Modern Latin basic alphabet characters starts with "a". - A: number sequence of uppercase Modern Latin basic alphabet characters starts with "A". - i: number sequence of lowercase Roman numerals starts with "i". - I: number sequence of uppercase Roman numerals start with "I".
      Parameters:
      numberFormat - the new number format
    • getValue

      public String getValue()
      Gets the number of characters that an OpenDocument producer has counted for a document.
      Returns:
      the value
    • setValue

      public void setValue(String value)
      Sets the number of characters that an OpenDocument producer has counted for a document.
      Parameters:
      value - the new value