net.sf.okapi.lib.xliff2.core

## Class ExtContent

- java.lang.Object
- - net.sf.okapi.lib.xliff2.core.ExtContent

- All Implemented Interfaces:
    IExtChild

      public class ExtContent
      extends java.lang.Object
      implements IExtChild

  Represents an extension content object: a `IExtChild` object of type `ExtChildType.TEXT` or `ExtChildType.CDATA`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExtContent(ExtContent original)` Copy constructor.
    `ExtContent(java.lang.String text)` Creates a new `ExtContent` object.
    `ExtContent(java.lang.String text, boolean cdata)` Creates a new `ExtContent` object in CDATA mode or not.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `getCData()` Indicates if the content is to be represented as CDATA.
    `java.lang.String` | `getText()` Gets the content.
    `ExtChildType` | `getType()` Gets the type of child this object is (one of the `ExtChildType` values).
    `void` | `setCData(boolean cdata)` Sets the flag indicating if the content is to be represented as CDATA.
    `void` | `setText(java.lang.String text)` Sets the content.

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

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

- - ### Constructor Detail

    - #### ExtContent

          public ExtContent(ExtContent original)

      Copy constructor.
      Parameters:
        `original` - the original object to duplicate.

    - #### ExtContent

          public ExtContent(java.lang.String text)

      Creates a new `ExtContent` object.
      Parameters:
        `text` - the text of the content.

    - #### ExtContent

          public ExtContent(java.lang.String text,
                    boolean cdata)

      Creates a new `ExtContent` object in CDATA mode or not.
      Parameters:
        `text` - the text of the content.
        `cdata` - true if the content should be written in a CDATA section, false otherwise.

  - ### Method Detail

    - #### getType

          public ExtChildType getType()

      Description copied from interface: `IExtChild`
      Gets the type of child this object is (one of the `ExtChildType` values).
      Specified by:
        `getType` in interface `IExtChild`
      Returns:
        the type of child this object is.

    - #### getCData

          public boolean getCData()

      Indicates if the content is to be represented as CDATA.
      Returns:
        true if the content is to be represented as CDATA, false otherwise.

    - #### setCData

          public void setCData(boolean cdata)

      Sets the flag indicating if the content is to be represented as CDATA.
      Parameters:
        `cdata` - true to represent the content as CDATA.

    - #### getText

          public java.lang.String getText()

      Gets the content.
      Returns:
        the content.

    - #### setText

          public void setText(java.lang.String text)

      Sets the content.
      Parameters:
        `text` - the new content.